Hi guys,
I''m trying xen with Fedora (Xen 4.1.2 + Linux 3.1.0-5.fc16.x86_64), but
hit some issue with getting dhcp ip for PV DomUs.
[1] host setup is like this (MACs and ip are substituted due to privacy):
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-em1
DEVICE="em1"
HWADDR="02:23:7D:1A:2B:16"
BRIDGE=xenbr1
BOOTPROTO="dhcp"
ONBOOT="yes"
NM_CONTROLLED="no"
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-xenbr1
DEVICE=xenbr1
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
so I get the bridge topo as:
[root@localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
xenbr1 8000.02237d1a2b16 no em1
[root@localhost ~]# ifconfig -a
em1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16
inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:220585 errors:0 dropped:0 overruns:0 frame:0
TX packets:65020 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21377675 (20.3 MiB) TX bytes:12133827 (11.5 MiB)
Interrupt:20 Memory:fe400000-fe420000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7596 (7.4 KiB) TX bytes:7596 (7.4 KiB)
xenbr1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16
inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:218102 errors:0 dropped:0 overruns:0 frame:0
TX packets:61087 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17253427 (16.4 MiB) TX bytes:11510311 (10.9 MiB)
[2] after I started a centos 5 pv guest:
[root@localhost ~]# cat /etc/xen/centos-5-pv
name = "centos-5-pv"
maxmem = 1024
memory = 1024
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "preserve"
vfb = [ ''type=vnc,vncunused=1,keymap=en-us,vnclisten=0.0.0.0''
]
disk = [ "tap:aio:/var/lib/xen/images/centos-5-pv.img,xvda,w" ]
vif = [ "mac=00:16:36:1e:2d:01,bridge=xenbr1,script=vif-bridge" ]
serial = "pty"
[root@localhost ~]# xl create -c /etc/xen/centos-5-pv
[root@localhost ~]# xl list
Name ID Mem VCPUs State
Time(s)
Domain-0 0 4638 4
r----- 403.0
centos-5-pv 1 1024 1
-b---- 166.8
I got the network interfaces like this:
[root@localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
xenbr1 8000.02237d1a2b16 no em1
[root@localhost ~]# ifconfig -a
em1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16
inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:220585 errors:0 dropped:0 overruns:0 frame:0
TX packets:65020 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21377675 (20.3 MiB) TX bytes:12133827 (11.5 MiB)
Interrupt:20 Memory:fe400000-fe420000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7596 (7.4 KiB) TX bytes:7596 (7.4 KiB)
vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1046 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:339763 (331.7 KiB) TX bytes:7308 (7.1 KiB)
xenbr1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16
inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:218102 errors:0 dropped:0 overruns:0 frame:0
TX packets:61087 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17253427 (16.4 MiB) TX bytes:11510311 (10.9 MiB)
After the PV guest boot up, it can''t get ip from dhcp, I tried to
capture the dhcp packets on the interfaces of em1, xenbr1 and vif1.0 by:
[root@localhost ~]# tcpdump -i em1 port 67 or port 68
I can only see dhcp request packets on vif1.0, no request packets
visible on em1 or xenb1. (selinux and iptables are disabled in both Dom0
and DomU).
[3] Then I started a HVM guest (DomId = 3), it can get ip successfully
on the same host. I only see it''s different that there are tap3.0 and
vif3.0 interfaces created for the HVM guest, and tap3.0 is added in the
bridge:
[root@localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
xenbr1 8000.02237d1a2b16 no em1
tap3.0
Could someone tell me what I need to do further or explain to me how xen
setup the network interfaces for PV guests compare to the HVM guests
when using bridge mode?
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
I have fixed it by adding the PV DomU''s vifX.0 interface to the bridge manually. Could anybody tell which script/code should be responsible for doing this? then I can do further investigate. # brctl addif xenbr1 vif1.0 On Tue, Nov 1, 2011 at 2:19 PM, X Waple <xwaple@gmail.com> wrote:> Hi guys, > > I''m trying xen with Fedora (Xen 4.1.2 + Linux 3.1.0-5.fc16.x86_64), but > hit some issue with getting dhcp ip for PV DomUs. > > [1] host setup is like this (MACs and ip are substituted due to privacy): > > [root@localhost ~]# cat /etc/sysconfig/network-**scripts/ifcfg-em1 > DEVICE="em1" > HWADDR="02:23:7D:1A:2B:16" > BRIDGE=xenbr1 > BOOTPROTO="dhcp" > ONBOOT="yes" > NM_CONTROLLED="no" > [root@localhost ~]# cat /etc/sysconfig/network-**scripts/ifcfg-xenbr1 > DEVICE=xenbr1 > TYPE=Bridge > BOOTPROTO=dhcp > ONBOOT=yes > > so I get the bridge topo as: > > [root@localhost ~]# brctl show > bridge name bridge id STP enabled interfaces > xenbr1 8000.02237d1a2b16 no em1 > > [root@localhost ~]# ifconfig -a > em1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16 > inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:220585 errors:0 dropped:0 overruns:0 frame:0 > TX packets:65020 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:21377675 (20.3 MiB) TX bytes:12133827 (11.5 MiB) > Interrupt:20 Memory:fe400000-fe420000 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > inet6 addr: ::1/128 Scope:Host > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:107 errors:0 dropped:0 overruns:0 frame:0 > TX packets:107 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:7596 (7.4 KiB) TX bytes:7596 (7.4 KiB) > > xenbr1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16 > inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0 > inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:218102 errors:0 dropped:0 overruns:0 frame:0 > TX packets:61087 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:17253427 (16.4 MiB) TX bytes:11510311 (10.9 MiB) > > [2] after I started a centos 5 pv guest: > > [root@localhost ~]# cat /etc/xen/centos-5-pv > name = "centos-5-pv" > maxmem = 1024 > memory = 1024 > vcpus = 1 > bootloader = "/usr/bin/pygrub" > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "preserve" > vfb = [ ''type=vnc,vncunused=1,keymap=**en-us,vnclisten=0.0.0.0'' ] > disk = [ "tap:aio:/var/lib/xen/images/**centos-5-pv.img,xvda,w" ] > vif = [ "mac=00:16:36:1e:2d:01,bridge=**xenbr1,script=vif-bridge" ] > serial = "pty" > > [root@localhost ~]# xl create -c /etc/xen/centos-5-pv > > [root@localhost ~]# xl list > Name ID Mem VCPUs State > Time(s) > Domain-0 0 4638 4 r----- > 403.0 > centos-5-pv 1 1024 1 -b---- > 166.8 > > I got the network interfaces like this: > > [root@localhost ~]# brctl show > bridge name bridge id STP enabled interfaces > xenbr1 8000.02237d1a2b16 no em1 > > [root@localhost ~]# ifconfig -a > em1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16 > inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:220585 errors:0 dropped:0 overruns:0 frame:0 > TX packets:65020 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:21377675 (20.3 MiB) TX bytes:12133827 (11.5 MiB) > Interrupt:20 Memory:fe400000-fe420000 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > inet6 addr: ::1/128 Scope:Host > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:107 errors:0 dropped:0 overruns:0 frame:0 > TX packets:107 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:7596 (7.4 KiB) TX bytes:7596 (7.4 KiB) > > vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:1046 errors:0 dropped:0 overruns:0 frame:0 > TX packets:26 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:32 > RX bytes:339763 (331.7 KiB) TX bytes:7308 (7.1 KiB) > > xenbr1 Link encap:Ethernet HWaddr 02:23:7D:1A:2B:16 > inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0 > inet6 addr: fe80::4637:e6ff:fe6a:7bed/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:218102 errors:0 dropped:0 overruns:0 frame:0 > TX packets:61087 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:17253427 (16.4 MiB) TX bytes:11510311 (10.9 MiB) > > After the PV guest boot up, it can''t get ip from dhcp, I tried to capture > the dhcp packets on the interfaces of em1, xenbr1 and vif1.0 by: > [root@localhost ~]# tcpdump -i em1 port 67 or port 68 > > I can only see dhcp request packets on vif1.0, no request packets visible > on em1 or xenb1. (selinux and iptables are disabled in both Dom0 and DomU). > > [3] Then I started a HVM guest (DomId = 3), it can get ip successfully on > the same host. I only see it''s different that there are tap3.0 and vif3.0 > interfaces created for the HVM guest, and tap3.0 is added in the bridge: > > [root@localhost ~]# brctl show > bridge name bridge id STP enabled interfaces > xenbr1 8000.02237d1a2b16 no em1 > tap3.0 > > Could someone tell me what I need to do further or explain to me how xen > setup the network interfaces for PV guests compare to the HVM guests when > using bridge mode? >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users