Virtualbox » Historial » Versió 11
Pau Escrich, 05-01-2013 02:24
| 1 | 1 | Pau Escrich | h1. Virtualbox |
|---|---|---|---|
| 2 | |||
| 3 | It is possible to emulate qMp with Virtual Box. |
||
| 4 | |||
| 5 | 5 | Pau Escrich | First of all open your virtualbox (VB) and create a new machine (type linux 2.6). |
| 6 | 6 | Pau Escrich | If you are using the VB wizard, do not select any storage device, we will do it latter. |
| 7 | 5 | Pau Escrich | |
| 8 | 3 | Pau Escrich | h3. Storage |
| 9 | 1 | Pau Escrich | |
| 10 | 10 | Pau Escrich | To make the things easy it is better to use IDE instead of SATA. |
| 11 | Create a new IDE disk and browse between your foldersand select the qMp vdi image file. |
||
| 12 | |||
| 13 | 11 | Pau Escrich | The vdi file can be obtained here: http://fw.qmp.cat/testing with the name VBox-qMp_testing-factory-XXXXX.bin |
| 14 | It should be renamed to something such as VBox-qMp1.vd1 |
||
| 15 | 3 | Pau Escrich | |
| 16 | 2 | Pau Escrich | h3. Network Configuration |
| 17 | 1 | Pau Escrich | |
| 18 | First of all we create a virtual tun/tap device in the host machine. |
||
| 19 | 3 | Pau Escrich | |
| 20 | 8 | Pau Escrich | <pre>ip tuntap add mode tap dev vbox |
| 21 | 1 | Pau Escrich | ip link set vbox up |
| 22 | ip addr add 172.30.22.10/24 dev vbox |
||
| 23 | 3 | Pau Escrich | </pre> |
| 24 | 1 | Pau Escrich | |
| 25 | 3 | Pau Escrich | In VB machine configuration at least one network interface must be added. |
| 26 | 1 | Pau Escrich | It should be configured as bridged interface to our new "vbox" network device. |
| 27 | The driver "PCnet-PCI II" works fine. |
||
| 28 | |||
| 29 | |||
| 30 | h3. Serial |
||
| 31 | 3 | Pau Escrich | |
| 32 | A serial port is needed because OpenWRT expects it. So it should be added in the VB machine configuration. |
||
| 33 | |||
| 34 | It is possible to use it to connect with the qMp node from the host machine (useful for debug), but it is NOT NEEDED. |
||
| 35 | To do so you should configure the VB serial as host pipe. |
||
| 36 | 1 | Pau Escrich | Check the option "create pipe" and add the path "/tmp/vboxS0". |
| 37 | 3 | Pau Escrich | Then in the host machine execute: |
| 38 | 8 | Pau Escrich | <pre>socat UNIX-CONNECT:/tmp/vboxS0 TCP-LISTEN:7777 & |
| 39 | 3 | Pau Escrich | netcat localhost 7777 |
| 40 | </pre> |
||
| 41 | |||
| 42 | And you will get serial! |
||
| 43 | 9 | Pau Escrich | |
| 44 | h3. Start VM |
||
| 45 | |||
| 46 | At this point you can start your virtual machine with qMp, open a browser and go to http://172.30.22.1 |
||
| 47 | |||
| 48 | If after the first reboot (automatic reboot) it does not boot (stays in "GRUB LOADING") reboot manually the VM. |
||
| 49 | |||
| 50 | h3. Clone |
||
| 51 | |||
| 52 | Ok, but just one node is quite boring so let's go to create more of them. Just switch-off the virtual machine, right click and Clone it. |
||
| 53 | Select the option "regenerate MAC addresses", boot the new machine and then execute: |
||
| 54 | |||
| 55 | <pre>rm /qmp_configured |
||
| 56 | /etc/init.d/qmp_autoconf start |
||
| 57 | </pre> |
||
| 58 | |||
| 59 | Then both nodes should see each other! |