Sto cercando di emulare un Raspberry Pi sul mio Ubuntu 13.04. Ho installato qemu e funziona bene tranne per la rete.
Ho seguito questa procedura . Sulla macchina virtuale, il file /etc/network/interface
è simile al seguente
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.20.106 # your IP
gateway 192.168.20.1 # IP of the Router
netmask 255.255.255.0 # Network mask
Lancio qemu in questo modo sudo qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -append "root=/dev/sda2" -hda 2013-09-25-wheezy-raspbian.img -kernel kernel-qemu -redir tcp:5022::22
.
Su Ubuntu, quando faccio un ifconfig
, ho questo risultato:
br0 Link encap:Ethernet HWaddr 8e:0f:b1:ad:1c:18
inet adr:10.10.10.2 Bcast:10.255.255.255 Masque:255.0.0.0
adr inet6: fe80::8c0f:b1ff:fead:1c18/64 Scope:Lien
UP BROADCAST MULTICAST MTU:1500 Metric:1
Packets reçus:8 erreurs:0 :8 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
Octets reçus:792 (792.0 B) Octets transmis:5092 (5.0 KB)
eth0 Link encap:Ethernet HWaddr 90:2b:34:39:b4:1d
UP BROADCAST MULTICAST MTU:1500 Metric:1
Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:65536 Metric:1
Packets reçus:12770 erreurs:0 :0 overruns:0 frame:0
TX packets:12770 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
Octets reçus:2121321 (2.1 MB) Octets transmis:2121321 (2.1 MB)
wlan1 Link encap:Ethernet HWaddr ac:f1:df:79:01:80
inet adr:192.168.20.106 Bcast:192.168.20.255 Masque:255.255.255.0
adr inet6: fe80::aef1:dfff:fe79:180/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Packets reçus:5283 erreurs:0 :48 overruns:0 frame:0
TX packets:5252 errors:0 dropped:5 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:2806386 (2.8 MB) Octets transmis:1461531 (1.4 MB)
sulla macchina virtuale, ping 192.168.20.106
funziona perché è l'indirizzo locale ma ping 192.168.20.1
non funziona. Ho anche cercato di impostare un indirizzo diverso per la macchina reale e virtuale.
Cosa posso fare?
-redir
opzione.