Projecte

General

Perfil

Actions

Virtualbox » Historial » Revisió 11

« Anterior | Revisió 11/18 (diferencies) | Següent »
Pau Escrich, 05-01-2013 02:24


Virtualbox

It is possible to emulate qMp with Virtual Box.

First of all open your virtualbox (VB) and create a new machine (type linux 2.6).
If you are using the VB wizard, do not select any storage device, we will do it latter.

Storage

To make the things easy it is better to use IDE instead of SATA.
Create a new IDE disk and browse between your foldersand select the qMp vdi image file.

The vdi file can be obtained here: http://fw.qmp.cat/testing with the name VBox-qMp_testing-factory-XXXXX.bin
It should be renamed to something such as VBox-qMp1.vd1

Network Configuration

First of all we create a virtual tun/tap device in the host machine.

ip tuntap add mode tap dev vbox 
ip link set vbox up
ip addr add 172.30.22.10/24 dev vbox

In VB machine configuration at least one network interface must be added.
It should be configured as bridged interface to our new "vbox" network device.
The driver "PCnet-PCI II" works fine.

Serial

A serial port is needed because OpenWRT expects it. So it should be added in the VB machine configuration.

It is possible to use it to connect with the qMp node from the host machine (useful for debug), but it is NOT NEEDED.
To do so you should configure the VB serial as host pipe.
Check the option "create pipe" and add the path "/tmp/vboxS0".
Then in the host machine execute:

socat UNIX-CONNECT:/tmp/vboxS0 TCP-LISTEN:7777 &
netcat localhost 7777

And you will get serial!

Start VM

At this point you can start your virtual machine with qMp, open a browser and go to http://172.30.22.1

If after the first reboot (automatic reboot) it does not boot (stays in "GRUB LOADING") reboot manually the VM.

Clone

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.
Select the option "regenerate MAC addresses", boot the new machine and then execute:

rm /qmp_configured
/etc/init.d/qmp_autoconf start

Then both nodes should see each other!

Actualitzat per Pau Escrich fa casi 12 anys · 11 revisions