0114.html 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install OpenWRT in VirtualBox VM</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="OpenWRT,VirtualBox,Virtual Machine,Virtual Router,X86,Linux,Home Lab,Home Lab Ideas,Hypervisor,Install Guide,Can You Virtualize OpenWRT,OpenWRT Virtual Machine,OpenWRT VirtualBox,OpenWRT VM,Homelab Ideas,Homelab,Networking,Virtualize OpenWRT Router,Virtualize OpenWRT,Virtualization,VirtualBox VM,Router,VM Router,Free Software,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install OpenWRT in VirtualBox VM">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="04/05/2022 08:35:33 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Install OpenWRT in VirtualBox VM</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <ol>
  26. <li>Download OpenWRT x86 Image<a href="https://downloads.openwrt.org/releases/19.07.6/targets/x86/64/" target="_blank"> Download</a></li>
  27. <li>Extract the OpenWRT image</li>
  28. <li>Convert OpenWRT Image to VDI
  29. <div class="codeBlock">cd %programfiles%/Oracle/Virtualbox<br />
  30. vboxmanage.exe convertdd &quot;%userprofile%\downloads\openwrt-19.07.6-x86-64-combined-ext4.img&quot; &quot;%userprofile%\downloads\openwrt.vdi&quot;</div>
  31. </li>
  32. <li>Resize the VDI File
  33. <div class="codeBlock">vboxmanage.exe modifyhd --resize 512 &quot;%userprofile%\downloads\openwrt.vdi&quot;</div>
  34. </li>
  35. <li>Launch Virtualbox</li>
  36. <li>Create a New VM by selecting Machine &gt; New
  37. <p>Name: OpenWRT<br />
  38. Machine Folder: C:\VMs<br />
  39. Type: Linux<br />
  40. Version: 2.6 / 3.x / 4.x (64-bit)<br />
  41. Memory Size: 128 MB<br />
  42. Hard disk: Do not add a virtual hard disk</p>
  43. </li>
  44. <li>Click Create</li>
  45. <li>Move the openwrt.vdi file from downloads into C:\VMs\OpenWRT</li>
  46. <li>Select the VM and Click Settings</li>
  47. <li>Select Storage</li>
  48. <li>Click Add Storage Attachment &gt; Add Hard Disk &gt; Choose existing disk</li>
  49. <li>Click Add and browse to C:\VMs\OpenWRT\openwrt.vdi</li>
  50. <li>Click OK</li>
  51. <li>Select Network</li>
  52. <li>Set Adapter 1 Attached to: Bridged</li>
  53. <li>Click the Adapter 2 tab</li>
  54. <li>Check the Enable Network Adapter box</li>
  55. <li>Set Adapter 2 Attached to: Bridged</li>
  56. <li>Click OK</li>
  57. <li>Make sure the OpenWRT VM is selected and click Start &gt; Normal</li>
  58. <li>Wait for the text to stop scrolling and press Enter</li>
  59. <li>Run the following command to change/set the root password
  60. <div class="codeBlock">passwd</div>
  61. </li>
  62. <li>Type a new root password twice to set it</li>
  63. <li>Continue the configuration by running the following commands
  64. <div class="codeBlock"># set the lan ip address<br />
  65. uci set network.lan.ipaddr=&#39;192.168.0.251&#39;<br />
  66. # restart network services<br />
  67. service network restart<br />
  68. # update openwrt packages<br />
  69. opkg update<br />
  70. # install the luci web ui<br />
  71. opkg install luci</div>
  72. </li>
  73. <li>Open a web browser and navigate to http://IPofVM, http://192.168.0.251 in the example</li>
  74. <li>At the login screen, enter the username root and the password set above &gt; Click the Login button</li>
  75. <li>Enjoy OpenWRT running in VirtualBox</li>
  76. </ol>
  77. <p>Further reading <a href="https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm" target="_blank">https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm</a></p>
  78. </div>
  79. </div>
  80. </body>
  81. </html>