Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:guide-user:virtualization:virtualbox-vm [2021/07/23 14:43] – [VM setup] someothertime | docs:guide-user:virtualization:virtualbox-vm [2023/10/20 01:46] (current) – [VM setup] atownlede | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| * '' | * '' | ||
| - | In the guide we'll use // | + | In the guide we'll use // |
| - | * Download a stable release of the // | + | * Download a stable release of the // |
| - | * Uncompress the gziped img file. On Linux use the command '' | + | * Uncompress the gziped img file. On Linux use the command '' |
| === Custom Images === | === Custom Images === | ||
| Line 23: | Line 23: | ||
| ==== Convert openwrt.img to VBox drive ==== | ==== Convert openwrt.img to VBox drive ==== | ||
| * Open a terminal and go in the folder where you have downloaded the file (sorry, the tool has only a command line interface) | * Open a terminal and go in the folder where you have downloaded the file (sorry, the tool has only a command line interface) | ||
| - | * Convert it to native VBox format by writing this in command line (the same for Windows, macOS and Linux. Sadly this tool does not have graphical user interface): '' | + | * Convert it to native VBox format by writing this in command line (the same for Windows, macOS and Linux. Sadly this tool does not have graphical user interface): '' |
| === Error === | === Error === | ||
| Line 135: | Line 135: | ||
| - **reboot** | - **reboot** | ||
| - Now your VM should be accessible from SSH, user **root** (no password) address **192.168.56.2** | - Now your VM should be accessible from SSH, user **root** (no password) address **192.168.56.2** | ||
| - | - After you have logged in successfully, | + | - After you have logged in successfully, |
| set network.mng=interface | set network.mng=interface | ||
| set network.mng.type=' | set network.mng.type=' | ||
| Line 146: | Line 146: | ||
| set network.wan=interface | set network.wan=interface | ||
| set network.wan.ifname=' | set network.wan.ifname=' | ||
| + | set network.wan.proto=' | ||
| + | EOF</ | ||
| + | set network.mng=interface | ||
| + | set network.mng.device=' | ||
| + | set network.mng.proto=' | ||
| + | set network.mng.ipaddr=' | ||
| + | set network.mng.netmask=' | ||
| + | set firewall.@zone[0].network=' | ||
| + | set firewall.@zone[0].name=' | ||
| + | delete network.lan | ||
| + | delete network.wan6 | ||
| + | set network.wan=interface | ||
| + | set network.wan.device=' | ||
| set network.wan.proto=' | set network.wan.proto=' | ||
| EOF</ | EOF</ | ||
| - | - now write **uci changes** to check if the setting configuration was loaded correctly. If you see the following (the **network.mng** entries MUST be the same as the ones shown here, the **network.wan** might be slightly different), everything went well\\ < | + | - now write **uci changes** to check if the setting configuration was loaded correctly. If you see the following |
| network.mng=' | network.mng=' | ||
| network.mng.type=' | network.mng.type=' | ||
| Line 157: | Line 170: | ||
| -network.lan | -network.lan | ||
| -network.wan6 | -network.wan6 | ||
| - | network.wan=' | + | network.wan=' |
| + | firewall.cfg02dc81.network=' | ||
| + | firewall.cfg02dc81.name=' | ||
| + | network.mng=' | ||
| + | network.mng.device=' | ||
| + | network.mng.proto=' | ||
| + | network.mng.ipaddr=' | ||
| + | network.mng.netmask=' | ||
| + | -network.lan | ||
| + | -network.wan6 | ||
| + | </ | ||
| - if all is well, save config with **uci commit && reboot**, if all is NOT well, write **reboot** to erase the temporary changes and find a way to set the above configuration manually. | - if all is well, save config with **uci commit && reboot**, if all is NOT well, write **reboot** to erase the temporary changes and find a way to set the above configuration manually. | ||
| - close and open again the SSH terminal when the VM has restarted, with same connection parameters (user **root** and **192.168.56.2**) | - close and open again the SSH terminal when the VM has restarted, with same connection parameters (user **root** and **192.168.56.2**) | ||
| - now you should have both internet access (try a **opkg update**) AND a management interface with a static address you can connect your SSH client program to even if your PC is disconnected from a local network. | - now you should have both internet access (try a **opkg update**) AND a management interface with a static address you can connect your SSH client program to even if your PC is disconnected from a local network. | ||
| - | - the optional **Bridged Adapter** on **Adapter 3** isn't crucial for basic functionality and is also specific for your own local network parameters. In my own network (and in most home networks) it will work fine if you write < | + | - the optional **Bridged Adapter** on **Adapter 3** isn't crucial for basic functionality and is also specific for your own local network parameters. In my own network (and in most home networks) it will work fine for 22.03 and earlier |
| set network.lan=interface | set network.lan=interface | ||
| set network.lan.ifname=' | set network.lan.ifname=' | ||
| set network.lan.proto=' | set network.lan.proto=' | ||
| EOF | EOF | ||
| - | uci commit</ | + | uci commit</ |
| + | set network.lan=interface | ||
| + | set network.lan.device=' | ||
| + | set network.lan.proto=' | ||
| + | EOF | ||
| + | uci commit | ||
| + | service network restart | ||
| + | </ | ||
| - you can now install packages to this images as normal, you will probably want to install luci, write **opkg update && opkg install luci**, then you can connect to the VM's luci by typing 192.168.56.2 in your browser address bar or [[http:// | - you can now install packages to this images as normal, you will probably want to install luci, write **opkg update && opkg install luci**, then you can connect to the VM's luci by typing 192.168.56.2 in your browser address bar or [[http:// | ||