0114.html 3.6 KB

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