* KVM guest doesn't recongize its network with NAT mode
@ 2011-05-27 7:53 ` Ryan Wang
0 siblings, 0 replies; 2+ messages in thread
From: Ryan Wang @ 2011-05-27 7:53 UTC (permalink / raw)
To: kvm, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
Hi all,
I created one guest on Ubuntu 10.10 using the following command: (using
default network)
=============================
sudo virt-install --connect qemu:///system -n ubuntu-10.10-guest -r 1024
--vcpus=1 -c /tmp/ubuntu-10.10-desktop-i386.iso --os-type=linux
--disk=/var/lib/libvirt/images/ubuntu-10.10-guest.img,size=10 --vnc
--accelerate
After the installation done, I can see the virtual network adapters on host:
=============================
virbr0 Link encap:Ethernet HWaddr fe:54:00:43:f2:f2
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::9cfc:d9ff:fe82:f273/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:10802 (10.8 KB)
...
vnet0 Link encap:Ethernet HWaddr fe:54:00:43:f2:f2
inet6 addr: fe80::fc54:ff:fe43:f2f2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:9325 (9.3 KB)
sudo iptables -t nat -L
=================================
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE tcp -- 192.168.122.0/24 !192.168.122.0/24 masq
ports: 1024-65535
MASQUERADE udp -- 192.168.122.0/24 !192.168.122.0/24 masq
ports: 1024-65535
MASQUERADE all -- 192.168.122.0/24 !192.168.122.0/24
But on guest, I can only see the lo network and the guest cannot reach
outside.
Does anyone know how to configure KVM with NAT mode?
thanks,
[-- Attachment #2: Type: text/html, Size: 2405 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] KVM guest doesn't recongize its network with NAT mode
@ 2011-05-27 7:53 ` Ryan Wang
0 siblings, 0 replies; 2+ messages in thread
From: Ryan Wang @ 2011-05-27 7:53 UTC (permalink / raw)
To: kvm, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
Hi all,
I created one guest on Ubuntu 10.10 using the following command: (using
default network)
=============================
sudo virt-install --connect qemu:///system -n ubuntu-10.10-guest -r 1024
--vcpus=1 -c /tmp/ubuntu-10.10-desktop-i386.iso --os-type=linux
--disk=/var/lib/libvirt/images/ubuntu-10.10-guest.img,size=10 --vnc
--accelerate
After the installation done, I can see the virtual network adapters on host:
=============================
virbr0 Link encap:Ethernet HWaddr fe:54:00:43:f2:f2
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::9cfc:d9ff:fe82:f273/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:10802 (10.8 KB)
...
vnet0 Link encap:Ethernet HWaddr fe:54:00:43:f2:f2
inet6 addr: fe80::fc54:ff:fe43:f2f2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:9325 (9.3 KB)
sudo iptables -t nat -L
=================================
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE tcp -- 192.168.122.0/24 !192.168.122.0/24 masq
ports: 1024-65535
MASQUERADE udp -- 192.168.122.0/24 !192.168.122.0/24 masq
ports: 1024-65535
MASQUERADE all -- 192.168.122.0/24 !192.168.122.0/24
But on guest, I can only see the lo network and the guest cannot reach
outside.
Does anyone know how to configure KVM with NAT mode?
thanks,
[-- Attachment #2: Type: text/html, Size: 2405 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-27 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 7:53 KVM guest doesn't recongize its network with NAT mode Ryan Wang
2011-05-27 7:53 ` [Qemu-devel] " Ryan Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.