Objective: I would like to install several virtual (emulated) Raspberry machines on the laptop, connect them to each other and to the laptop. Afterwards I would like to send tcp packets from virtual machines to mysql on host localhost (and back to machines).
Achieved: On Ubuntu 14.04 I virtualized Raspberry through mounting Raspbian on Qemu (i.e. running virtual machine) source: http://www.soslug.org/wiki/raspberry_pi_emulation.
I run the machine through entering
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -append "root=/dev/sda2 panic=1" -hda Occidentalis_v02.img & (note: Occidentalis is an alternative version of Raspbian)
so from different folders I am running different instances of QEMU.
MySQL is running.
Problem: Each instance has the same IP address 10.0.2.15, and can't ping the host IP or reverse.
Assumption: I assume that I need to create a new connection in the host computer (such as eth0, lo, br0, or etc.). I saw something regarding port forwarding, but I am not sure that its exactly what I need, because I would like to have constant connection between machines and host's "localhost".
If anyone could help me out:
- how to connect such a connection on host.
- how to configure raspbian machine (configuration of IP etc)
- how to connect machines to each other?
- anything else to establish this network scenario.