Estou tentando emular um raspberry pi no meu ubuntu 13.04. Eu instalei o qemu e ele funciona bem, exceto na rede.
Eu segui esse procedimento . Na máquina virtual, o arquivo se /etc/network/interface
parece com isso
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
Eu inicio o qemu assim 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
.
No ubuntu, quando faço a ifconfig
, tenho este resultado:
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)
na máquina virtual, ping 192.168.20.106
funciona porque é o endereço local, mas ping 192.168.20.1
não funciona. Também tentei definir um endereço diferente para a máquina real e virtual.
O que eu posso fazer?
-redir
opção.