0114.html 3.7 KB

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