[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [patch] xen udev rule interfering with openvpn



On Mon, May 21, 2012 at 9:04 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Mon, 2012-05-21 at 13:51 +0100, Teck Choon Giam wrote:
>
>> > How does case #7 fail? Do you get both devices created but not placed on
>> > the bridge or something else?
>>
>> I am not sure just in #7 fail to create.  The error as below:
>>
>> # xm create hvmdomaintest-vifname.cfg
>> Using config file "./hvmdomaintest-vifname.cfg".
>> Error: Device 0 (vif) could not be connected. ip link set vif1.0-emu
>> name b1-emu failed
>
> So am I correct that you use vifname="b1"? I wonder if there was any
> output from this command. Did anything appear in
> var/log/xen/xen-hotplug.log ?

Related hvmdomain-vifname.cfg as below:

# cat hvmdomaintest-vifname.cfg
#kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
# Shadow pagetable memory for the domain, in MB.
# If not explicictly set, xend will pick an appropriate value.
# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
shadow_memory = 32
memory = 3072
maxmem = 3072
name = "hvmdomaintest"
vif = [ 'vifname=b1,type=ioemu,mac=EDITOUT,bridge=xenbr0,ip=EDITOUT',
'vifname=b2,type=ioemu,mac=EDITOUT,bridge=xenbr1,ip=EDITOUT' ]
disk = [ 'phy:/dev/XenGroup/hvmdomaintest,ioemu:hda,w',
'file:/home/xen/images/X17-59463_Windows_7_Ultimate_Service_Pack_1_x86_ISO_32-bit.iso,hdc:cdrom,r'
]
vmid=1
vcpus=4
ne2000=0
boot='cd'
sdl=0
vncviewer=0
vncpasswd='EDITOUT'
vnclisten="XXX.XXX.XXX.XXX"
vnc=1
vncdisplay=1
vncunused=0
usbdevice='tablet'
#acpi=0
viridian=1
#-----------------------------------------------------------------------------
#   enable sound card support, [sb16|es1370|all|..,..], default none
#soundhw='sb16'
#-----------------------------------------------------------------------------
#    set the real time clock to local time [default=0 i.e. set to utc]
#localtime=0
localtime=1
#-----------------------------------------------------------------------------
#    set the real time clock offset in seconds [default=0 i.e. same as dom0]
#rtc_timeoffset=28800
#rtc_timeoffset=0
#on_poweroff = 'destroy'
#on_reboot   = 'restart'
#on_crash    = 'restart'


Related xen-hotplug.log as below:

RTNETLINK answers: Operation not supported
RTNETLINK answers: Device or resource busy
RTNETLINK answers: Operation not supported
RTNETLINK answers: Device or resource busy


>
>> >
>> > What names do the devices end up with? ("ifconfig -a", while guest is
>> > running, "brctl show" also useful)
>>
>> Can't even create the hvmdomain with vifname set.
>>   If you mean trying
>> to capture the ifconfig -a output while xm create hvmdomain with
>> vifname set... the interval for xm create hvmdomain with vifname set
>> is too short for me to issue ifconfig -a and brctl show output in
>> another terminal :(
>
> Yes, that's something of a problem.
>
> One approach you could try is to add the commands to the vif-bridge
> script and re-direct to a file. One useful place to do that might be in
> vif-common.sh just before the
>        do_or_die ip link set "$dev" name "$vifname"
> calls. e.g. add
>        ( ifconfig -a ; brctl show ) >> /tmp/hotplug.dbg.log
> or something. You might also want to add ">> /tmp/hotplug.dbg.log" to
> the door_die so that it's output can also be logged.

I actually done that as below:

(ifconfig -a && brctl show) >> /root/test-output.log
printenv >> /root/test-output.log
above the line: do_or_die ip link set "$dev" name "$vifname"

And the appending output as below about /root/test-output.log:

# cat ../test-output.log
b1        Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

b2        Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr 00:25:90:3D:0D:12
          inet6 addr: fe80::225:90ff:fe3d:d12/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14589 errors:0 dropped:61 overruns:0 frame:0
          TX packets:1167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:957339 (934.9 KiB)  TX bytes:228032 (222.6 KiB)
          Memory:fba80000-fbb00000

eth1      Link encap:Ethernet  HWaddr 00:25:90:3D:0D:13
          inet6 addr: fe80::225:90ff:fe3d:d13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3454 errors:0 dropped:60 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:298974 (291.9 KiB)  TX bytes:3130 (3.0 KiB)
          Memory:fb980000-fba00000

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vif5.0-emu Link encap:Ethernet  HWaddr 1A:58:5C:16:5C:02
          inet6 addr: fe80::1858:5cff:fe16:5c02/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:280 (280.0 b)

vif5.1-emu Link encap:Ethernet  HWaddr 6A:A7:BB:1E:A6:95
          inet6 addr: fe80::68a7:bbff:fe1e:a695/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:222 (222.0 b)

xenbr0    Link encap:Ethernet  HWaddr 00:25:90:3D:0D:12
          inet addr:203.175.161.8  Bcast:203.175.161.255  Mask:255.255.255.0
          inet6 addr: fe80::225:90ff:fe3d:d12/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13978 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:702446 (685.9 KiB)  TX bytes:226828 (221.5 KiB)

xenbr1    Link encap:Ethernet  HWaddr 00:25:90:3D:0D:13
          inet addr:192.168.100.18  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::225:90ff:fe3d:d13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2506 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:121776 (118.9 KiB)  TX bytes:1926 (1.8 KiB)

bridge name     bridge id               STP enabled     interfaces
xenbr0          8000.0025903d0d12       no              b1
                                                        eth0
                                                        vif5.0-emu
xenbr1          8000.0025903d0d13       no              b2
                                                        eth1
                                                        vif5.1-emu
b1        Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

b2        Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr 00:25:90:3D:0D:12
          inet6 addr: fe80::225:90ff:fe3d:d12/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14589 errors:0 dropped:61 overruns:0 frame:0
          TX packets:1167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:957339 (934.9 KiB)  TX bytes:228032 (222.6 KiB)
          Memory:fba80000-fbb00000

eth1      Link encap:Ethernet  HWaddr 00:25:90:3D:0D:13
          inet6 addr: fe80::225:90ff:fe3d:d13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3454 errors:0 dropped:60 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:298974 (291.9 KiB)  TX bytes:3130 (3.0 KiB)
          Memory:fb980000-fba00000

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vif5.0-emu Link encap:Ethernet  HWaddr 1A:58:5C:16:5C:02
          inet6 addr: fe80::1858:5cff:fe16:5c02/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:280 (280.0 b)

vif5.1-emu Link encap:Ethernet  HWaddr 6A:A7:BB:1E:A6:95
          inet6 addr: fe80::68a7:bbff:fe1e:a695/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:222 (222.0 b)

xenbr0    Link encap:Ethernet  HWaddr 00:25:90:3D:0D:12
          inet addr:203.175.161.8  Bcast:203.175.161.255  Mask:255.255.255.0
          inet6 addr: fe80::225:90ff:fe3d:d12/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13978 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:702446 (685.9 KiB)  TX bytes:226828 (221.5 KiB)

xenbr1    Link encap:Ethernet  HWaddr 00:25:90:3D:0D:13
          inet addr:192.168.100.18  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::225:90ff:fe3d:d13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2506 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:121776 (118.9 KiB)  TX bytes:1926 (1.8 KiB)

bridge name     bridge id               STP enabled     interfaces
xenbr0          8000.0025903d0d12       no              b1
                                                        eth0
                                                        vif5.0-emu
xenbr1          8000.0025903d0d13       no              b2
                                                        eth1
                                                        vif5.1-emu
NET_MATCHID=
SUBSYSTEM=net
DEVPATH=/devices/virtual/net/vif5.0-emu
PATH=/usr/bin:/usr/sbin:/usr/lib/xen/bin:/usr/lib64/xen/bin:/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
ACTION=add
UDEV_LOG=3
PWD=/
LANG=POSIX
SHLVL=1
IFINDEX=24
INTERFACE=vif5.0-emu
SEQNUM=2521
_=/usr/bin/printenv
NET_MATCHID=
SUBSYSTEM=net
DEVPATH=/devices/virtual/net/vif5.1-emu
PATH=/usr/bin:/usr/sbin:/usr/lib/xen/bin:/usr/lib64/xen/bin:/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
ACTION=add
UDEV_LOG=3
PWD=/
LANG=POSIX
SHLVL=1
IFINDEX=25
INTERFACE=vif5.1-emu
SEQNUM=2524
_=/usr/bin/printenv


>
>> Just to confirm... are we going to "throw away" xm in 4.2 and use only xl?
>
> Not yet, they will both existing in 4.2 but xl will now be considered
> the default. We hope to be able to get rid of xm in the 4.3 time frame,
> but that depends on a variety of factors.

Ok.  Thanks for letting me know ;)

Thanks.

Kindest regards,
Giam Teck Choon


>
>>
>> Thanks.
>>
>> Kindest regards,
>> Giam Teck Choon
>>
>>
>> >
>> > Ian.
>> >
>
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.