My ubuntu 11.04 guest is not able to connect to the internet when launched as -net user. Any help is much appreciated.
qemu command line ============== amitava@bonjovi:/var/vms$ qemu-system-x86_64 -m 512 -drive index=0,media=disk,if=virtio,file=ub2.qcow2,boot=on -vnc :0 -monitor stdio -net nic,model=virtio,vlan=1 -net user,vlan=1,hostname=ubuntu2 ifconfig output in guest ================= amitava@ubuntu2:~$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1984 (1.9 KB) TX bytes:1748 (1.7 KB) amitava@ubuntu2:~$ nslookup google Server: 10.0.2.3 Address: 10.0.2.3#53 Non-authoritative answer: Name: google.com Address: 74.125.115.104 Name: google.com Address: 74.125.115.106 Name: google.com Address: 74.125.115.105 Name: google.com Address: 74.125.115.147 Name: google.com Address: 74.125.115.103 Name: google.com Address: 74.125.115.99 amitava@ubuntu2:~$ traceroute google.com traceroute to google.com (74.125.115.99), 30 hops max, 60 byte packets 1 10.0.2.2 (10.0.2.2) 0.469 ms 0.457 ms 0.453 ms 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * * * 12 * * * 13 * * * 14 * * * 15 * * * 16 * * * 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * Here's the host info ============== amitava@bonjovi:~$ uname -a Linux bonjovi 2.6.32-32-server #62-Ubuntu SMP Wed Apr 20 22:07:43 UTC 2011 x86_64 GNU/Linux amitava@bonjovi:~$ qemu-system-x86_64 --version QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3), Copyright (c) 2003-2008 Fabrice Bellard Thank you, Amitava