Jens Nachtigall
2006-Jun-18 18:29 UTC
[Xen-users] Error: Device 0 (vif) could not be connected. Backend device not found.
Hi all, I setup Xen3 for the first time using debian etch packages as described at debian-administration.org/articles/396 . That is I used the Debian xen-create-image to set up a Xen image. This all went fine, without errors (I can also mount and chroot into the image without problems). But when I run # xm create gerd.cfg -c Using config file "/etc/xen/gerd.cfg". Error: Device 0 (vif) could not be connected. Backend device not found. I do not know what causes this. After some fiddling and searching it seems to me like a problem in /etc/xen/scripts/vif-bridge But I miss the knowhow to tell what exactly goes wrong. Here is the from daemon.log when I run "xm create gerd.cfg -c" : /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/2049 /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/2050 /etc/xen/scripts/vif-bridge: online XENBUS_PATH=backend/vif/4/0 /etc/xen/scripts/vif-bridge: Writing backend/vif/4/0/hotplug-status error to xenstore. /etc/xen/scripts/vif-bridge: Could not find bridge, and none was specified /etc/xen/scripts/vif-bridge: offline XENBUS_PATH=backend/vif/4/0 /etc/xen/scripts/vif-bridge: Writing backend/vif/4/0/hotplug-status error to xenstore. /etc/xen/scripts/vif-bridge: Could not find bridge, and none was specified /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vif/4/0 /etc/xen/scripts/block: Writing backend/vbd/4/2049/node /dev/loop1 to xenstore. /etc/xen/scripts/block: Writing backend/vbd/4/2049/physical-device 7:1 to xenstore. /etc/xen/scripts/block: Writing backend/vbd/4/2049/hotplug-status connected to xenstore. /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/4/2049 /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/4/2049 /etc/xen/scripts/block: Writing backend/vbd/4/2050/node /dev/loop1 to xenstore. /etc/xen/scripts/block: Writing backend/vbd/4/2050/physical-device 7:1 to xenstore. /etc/xen/scripts/block: Writing backend/vbd/4/2050/hotplug-status connected to xenstore. /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/4/2050 /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/4/2050 Here is what xend.log says when I run "xm create gerd.cfg -c" : [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) XendDomainInfo.create([''vm'', [''name'', ''gerd''], [''memory'', 196], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 ro'']]], [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', ''192.168.10.70'']]]]) [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:284) parseConfig: config is [''vm'', [''name'', ''gerd''], [''memory'', 196], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 ro'']]], [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', ''192.168.10.70'']]]] [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:380) parseConfig: result is {''ssidref'': None, ''uuid'': None, ''on_crash'': None, ''on_reboot'': None, ''image'': [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 ro'']], ''on_poweroff'': None, ''cpus'': None, ''name'': ''gerd'', ''backend'': [], ''vcpus'': 1, ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 196, ''device'': [(''vbd'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]), (''vbd'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], [''dev'', ''sda2''], [''mode'', ''w'']]), (''vif'', [''vif'', [''ip'', ''192.168.10.70'']])], ''bootloader'': None, ''cpu'': None, ''maxmem'': None} [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct: None 0 [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:1196) XendDomainInfo.initDomain: 5 1.0 [2006-06-18 20:25:39 xend] DEBUG (balloon:126) Balloon: free 197; need 197; done. [2006-06-18 20:25:39 xend] INFO (image:135) buildDomain os=linux dom=5 vcpus=1 [2006-06-18 20:25:39 xend] DEBUG (image:173) dom = 5 [2006-06-18 20:25:39 xend] DEBUG (image:174) image = /boot/vmlinuz-2.6.16-2-xen-686 [2006-06-18 20:25:39 xend] DEBUG (image:175) store_evtchn = 1 [2006-06-18 20:25:39 xend] DEBUG (image:176) console_evtchn = 2 [2006-06-18 20:25:39 xend] DEBUG (image:177) cmdline = root=/dev/sda1 ro [2006-06-18 20:25:39 xend] DEBUG (image:178) ramdisk = /boot/initrd.img-2.6.16-2-xen-686 [2006-06-18 20:25:39 xend] DEBUG (image:179) vcpus = 1 [2006-06-18 20:25:39 xend] DEBUG (image:180) features [2006-06-18 20:25:39 xend] DEBUG (blkif:24) exception looking up device number for sda1: [Errno 2] No such file or directory: ''/dev/sda1'' [2006-06-18 20:25:39 xend] DEBUG (DevController:103) DevController: writing {''virtual-device'': ''2049'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vbd/5/2049''} to /local/domain/5/device/vbd/2049. [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''gerd'', ''frontend'': ''/local/domain/5/device/vbd/2049'', ''dev'': ''sda1'', ''state'': ''1'', ''params'': ''/home/xen/domains/gerd/disk.img'', ''mode'': ''w'', ''frontend-id'': ''5'', ''type'': ''file''} to /local/domain/0/backend/vbd/5/2049. [2006-06-18 20:25:39 xend] DEBUG (blkif:24) exception looking up device number for sda2: [Errno 2] No such file or directory: ''/dev/sda2'' [2006-06-18 20:25:39 xend] DEBUG (DevController:103) DevController: writing {''virtual-device'': ''2050'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vbd/5/2050''} to /local/domain/5/device/vbd/2050. [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''gerd'', ''frontend'': ''/local/domain/5/device/vbd/2050'', ''dev'': ''sda2'', ''state'': ''1'', ''params'': ''/home/xen/domains/gerd/swap.img'', ''mode'': ''w'', ''frontend-id'': ''5'', ''type'': ''file''} to /local/domain/0/backend/vbd/5/2050. [2006-06-18 20:25:39 xend] DEBUG (DevController:103) DevController: writing {''backend-id'': ''0'', ''mac'': ''00:16:3e:1d:35:5a'', ''handle'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vif/5/0''} to /local/domain/5/device/vif/0. [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''gerd'', ''handle'': ''0'', ''script'': ''/etc/xen/scripts/vif-bridge'', ''ip'': ''192.168.10.70'', ''state'': ''1'', ''frontend'': ''/local/domain/5/device/vif/0'', ''mac'': ''00:16:3e:1d:35:5a'', ''frontend-id'': ''5''} to /local/domain/0/backend/vif/5/0. [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:671) Storing VM details: {''ssidref'': ''0'', ''uuid'': ''324c5b66-049e-b6c0-28d7-35a3b4a94817'', ''on_reboot'': ''restart'', ''start_time'': ''1150655139.67'', ''on_poweroff'': ''destroy'', ''name'': ''gerd'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''memory'': ''196'', ''on_crash'': ''restart'', ''image'': "(linux (kernel /boot/vmlinuz-2.6.16-2-xen-686) (ramdisk /boot/initrd.img-2.6.16-2-xen-686) (root ''/dev/sda1 ro''))", ''maxmem'': ''196''} [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:696) Storing domain details: {''console/ring-ref'': ''197261'', ''console/port'': ''2'', ''name'': ''gerd'', ''console/limit'': ''1048576'', ''vm'': ''/vm/324c5b66-049e-b6c0-28d7-35a3b4a94817'', ''domid'': ''5'', ''cpu/0/availability'': ''online'', ''memory/target'': ''200704'', ''store/ring-ref'': ''197262'', ''store/port'': ''1''} [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch [2006-06-18 20:25:39 xend] DEBUG (DevController:132) Waiting for devices vif. [2006-06-18 20:25:39 xend] DEBUG (DevController:138) Waiting for 0. [2006-06-18 20:25:39 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/5/0/hotplug-status. [2006-06-18 20:25:39 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/5/0/hotplug-status. [2006-06-18 20:25:39 xend] DEBUG (DevController:417) hotplugStatusCallback 2. [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy: domid=5 [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) XendDomainInfo.destroyDomain(5) Sorry, but that is a bit too much for a Xen beginner ;-) Your help is very much appreciated. Jens _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
Jens Nachtigall
2006-Jun-18 18:49 UTC
SOLVED: Re: [Xen-users] Error: Device 0 (vif) could not be connected. Backend device not found.
I found this at julien.danjou.info/xen.html Set up the bridge =-=-=-=-=-=-=-=-=-=-=-=- By default the Debian Xen package does not modify your network configuration. You will have to add a bridge to your /etc/network/interfaces file. auto br-xen iface br-xen inet static address 192.168.12.25 netmask 255.255.255.0 gateway 192.168.12.1 bridge_ports eth0 # optional bridge_maxwait 0 Doing an "ifup br-xen" it I can boot my xen image. Strange seems to be a bug that this is not handled automatically by xen-tools. Am Sonntag, 18. Juni 2006 20:29 schrieb Jens Nachtigall:> Hi all, > > I setup Xen3 for the first time using debian etch packages as described at > debian-administration.org/articles/396 . That is I used the > Debian xen-create-image to set up a Xen image. > > This all went fine, without errors (I can also mount and chroot into the > image without problems). But when I run > > # xm create gerd.cfg -c > Using config file "/etc/xen/gerd.cfg". > Error: Device 0 (vif) could not be connected. Backend device not found. > > > I do not know what causes this. After some fiddling and searching it > seems to me like a problem in /etc/xen/scripts/vif-bridge > But I miss the knowhow to tell what exactly goes wrong. > > Here is the from daemon.log when I run "xm create gerd.cfg -c" : > > /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/2049 > /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/2050 > /etc/xen/scripts/vif-bridge: online XENBUS_PATH=backend/vif/4/0 > /etc/xen/scripts/vif-bridge: Writing backend/vif/4/0/hotplug-status error > to xenstore. /etc/xen/scripts/vif-bridge: Could not find bridge, and none > was specified /etc/xen/scripts/vif-bridge: offline > XENBUS_PATH=backend/vif/4/0 > /etc/xen/scripts/vif-bridge: Writing backend/vif/4/0/hotplug-status error > to xenstore. /etc/xen/scripts/vif-bridge: Could not find bridge, and none > was specified /etc/xen/scripts/xen-hotplug-cleanup: > XENBUS_PATH=backend/vif/4/0 > /etc/xen/scripts/block: Writing backend/vbd/4/2049/node /dev/loop1 to > xenstore. /etc/xen/scripts/block: Writing > backend/vbd/4/2049/physical-device 7:1 to xenstore. /etc/xen/scripts/block: > Writing backend/vbd/4/2049/hotplug-status connected to xenstore. > /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/4/2049 > /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/4/2049 > /etc/xen/scripts/block: Writing backend/vbd/4/2050/node /dev/loop1 to > xenstore. /etc/xen/scripts/block: Writing > backend/vbd/4/2050/physical-device 7:1 to xenstore. /etc/xen/scripts/block: > Writing backend/vbd/4/2050/hotplug-status connected to xenstore. > /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/4/2050 > /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/4/2050 > > Here is what xend.log says when I run "xm create gerd.cfg -c" : > > [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) > XendDomainInfo.create([''vm'', [''name'', ''gerd''], [''memory'', 196], [''vcpus'', > 1], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], > [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 > ro'']]], [''device'', [''vbd'', [''uname'', > ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]], > [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], > [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', > ''192.168.10.70'']]]]) [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG > (XendDomainInfo:284) parseConfig: config is [''vm'', [''name'', ''gerd''], > [''memory'', 196], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', > ''/boot/vmlinuz-2.6.16-2-xen-686''], [''ramdisk'', > ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 ro'']]], > [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/disk.img''], > [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', > ''file:/home/xen/domains/gerd/swap.img''], [''dev'', ''sda2''], [''mode'', ''w'']]], > [''device'', [''vif'', [''ip'', ''192.168.10.70'']]]] [2006-06-18 20:25:39 > xend.XendDomainInfo] DEBUG (XendDomainInfo:380) parseConfig: result is > {''ssidref'': None, ''uuid'': None, ''on_crash'': None, ''on_reboot'': None, > ''image'': [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], > [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 > ro'']], ''on_poweroff'': None, ''cpus'': None, ''name'': ''gerd'', ''backend'': [], > ''vcpus'': 1, ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 196, > ''device'': [(''vbd'', [''vbd'', [''uname'', > ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]), > (''vbd'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], [''dev'', > ''sda2''], [''mode'', ''w'']]), (''vif'', [''vif'', [''ip'', ''192.168.10.70'']])], > ''bootloader'': None, ''cpu'': None, ''maxmem'': None} [2006-06-18 20:25:39 > xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct: > None 0 [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG > (XendDomainInfo:1196) XendDomainInfo.initDomain: 5 1.0 [2006-06-18 20:25:39 > xend] DEBUG (balloon:126) Balloon: free 197; need 197; done. [2006-06-18 > 20:25:39 xend] INFO (image:135) buildDomain os=linux dom=5 vcpus=1 > [2006-06-18 20:25:39 xend] DEBUG (image:173) dom = 5 > [2006-06-18 20:25:39 xend] DEBUG (image:174) image > /boot/vmlinuz-2.6.16-2-xen-686 [2006-06-18 20:25:39 xend] DEBUG (image:175) > store_evtchn = 1 > [2006-06-18 20:25:39 xend] DEBUG (image:176) console_evtchn = 2 > [2006-06-18 20:25:39 xend] DEBUG (image:177) cmdline = > root=/dev/sda1 ro [2006-06-18 20:25:39 xend] DEBUG (image:178) ramdisk > = /boot/initrd.img-2.6.16-2-xen-686 [2006-06-18 20:25:39 xend] DEBUG > (image:179) vcpus = 1 > [2006-06-18 20:25:39 xend] DEBUG (image:180) features > [2006-06-18 20:25:39 xend] DEBUG (blkif:24) exception looking up device > number for sda1: [Errno 2] No such file or directory: ''/dev/sda1'' > [2006-06-18 20:25:39 xend] DEBUG (DevController:103) DevController: writing > {''virtual-device'': ''2049'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > ''/local/domain/0/backend/vbd/5/2049''} to /local/domain/5/device/vbd/2049. > [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing > {''domain'': ''gerd'', ''frontend'': ''/local/domain/5/device/vbd/2049'', ''dev'': > ''sda1'', ''state'': ''1'', ''params'': ''/home/xen/domains/gerd/disk.img'', ''mode'': > ''w'', ''frontend-id'': ''5'', ''type'': ''file''} to > /local/domain/0/backend/vbd/5/2049. [2006-06-18 20:25:39 xend] DEBUG > (blkif:24) exception looking up device number for sda2: [Errno 2] No such > file or directory: ''/dev/sda2'' [2006-06-18 20:25:39 xend] DEBUG > (DevController:103) DevController: writing {''virtual-device'': ''2050'', > ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > ''/local/domain/0/backend/vbd/5/2050''} to /local/domain/5/device/vbd/2050. > [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing > {''domain'': ''gerd'', ''frontend'': ''/local/domain/5/device/vbd/2050'', ''dev'': > ''sda2'', ''state'': ''1'', ''params'': ''/home/xen/domains/gerd/swap.img'', ''mode'': > ''w'', ''frontend-id'': ''5'', ''type'': ''file''} to > /local/domain/0/backend/vbd/5/2050. [2006-06-18 20:25:39 xend] DEBUG > (DevController:103) DevController: writing {''backend-id'': ''0'', ''mac'': > ''00:16:3e:1d:35:5a'', ''handle'': ''0'', ''state'': ''1'', ''backend'': > ''/local/domain/0/backend/vif/5/0''} to /local/domain/5/device/vif/0. > [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing > {''domain'': ''gerd'', ''handle'': ''0'', ''script'': ''/etc/xen/scripts/vif-bridge'', > ''ip'': ''192.168.10.70'', ''state'': ''1'', ''frontend'': > ''/local/domain/5/device/vif/0'', ''mac'': ''00:16:3e:1d:35:5a'', ''frontend-id'': > ''5''} to /local/domain/0/backend/vif/5/0. [2006-06-18 20:25:39 > xend.XendDomainInfo] DEBUG (XendDomainInfo:671) Storing VM details: > {''ssidref'': ''0'', ''uuid'': ''324c5b66-049e-b6c0-28d7-35a3b4a94817'', > ''on_reboot'': ''restart'', ''start_time'': ''1150655139.67'', ''on_poweroff'': > ''destroy'', ''name'': ''gerd'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''memory'': > ''196'', ''on_crash'': ''restart'', ''image'': "(linux (kernel > /boot/vmlinuz-2.6.16-2-xen-686) (ramdisk /boot/initrd.img-2.6.16-2-xen-686) > (root ''/dev/sda1 ro''))", ''maxmem'': ''196''} [2006-06-18 20:25:39 > xend.XendDomainInfo] DEBUG (XendDomainInfo:696) Storing domain details: > {''console/ring-ref'': ''197261'', ''console/port'': ''2'', ''name'': ''gerd'', > ''console/limit'': ''1048576'', ''vm'': > ''/vm/324c5b66-049e-b6c0-28d7-35a3b4a94817'', ''domid'': ''5'', > ''cpu/0/availability'': ''online'', ''memory/target'': ''200704'', > ''store/ring-ref'': ''197262'', ''store/port'': ''1''} [2006-06-18 20:25:39 > xend.XendDomainInfo] DEBUG (XendDomainInfo:877) > XendDomainInfo.handleShutdownWatch [2006-06-18 20:25:39 xend] DEBUG > (DevController:132) Waiting for devices vif. [2006-06-18 20:25:39 xend] > DEBUG (DevController:138) Waiting for 0. [2006-06-18 20:25:39 xend] DEBUG > (DevController:403) hotplugStatusCallback > /local/domain/0/backend/vif/5/0/hotplug-status. [2006-06-18 20:25:39 xend] > DEBUG (DevController:403) hotplugStatusCallback > /local/domain/0/backend/vif/5/0/hotplug-status. [2006-06-18 20:25:39 xend] > DEBUG (DevController:417) hotplugStatusCallback 2. [2006-06-18 20:25:39 > xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy: > domid=5 [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG > (XendDomainInfo:1335) XendDomainInfo.destroyDomain(5) > > > Sorry, but that is a bit too much for a Xen beginner ;-) Your help is very > much appreciated. > > Jens > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > lists.xensource.com/xen-users-- jabber-chat: nachtigall@amessage.de _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
pak333@comcast.net
2006-Jun-19 04:29 UTC
Re: [Xen-users] Error: Device 0 (vif) could not be connected. Backend device not found.
I am having the same problem, however on RHEL 2.6.16. I have tried setting up the bridge manually but it does now work. Can someone give some clues on what we should do to solve this problem in RHEL Thanks P. Krishna -------------- Original message -------------- From: Jens Nachtigall <nachtigall@web.de>> I found this at julien.danjou.info/xen.html > > Set up the bridge > =-=-=-=-=-=-=-=-=-=-=-=- > By default the Debian Xen package does not modify your network configuration. > You will have to add a bridge to your /etc/network/interfaces file. > auto br-xen > iface br-xen inet static > address 192.168.12.25 > netmask 255.255.255.0 > gateway 192.168.12.1 > bridge_ports eth0 > # optional > bridge_maxwait 0 > > Doing an "ifup br-xen" it I can boot my xen image. Strange seems to be a bug > that this is not handled automatically by xen-tools. > > Am Sonntag, 18. Juni 2006 20:29 schrieb Jens Nachtigall: > > Hi all, > > > > I setup Xen3 for the first time using debian etch packages as described at > > debian-administration.org/articles/396 . That is I used the > > Debian xen-create-image to set up a Xen image. > > > > This all went fine, without errors (I can also mount and chroot into the > > image without problems). But when I run > > > > # xm create gerd.cfg -c > > Using config file "/etc/xen/gerd.cfg". > > Error: Device 0 (vif) could not be connected. Backend device not found. > > > > > > I do not know what causes this. After some fiddling and searching it > > seems to me like a problem in /etc/xen/scripts/vif-bridge > > But I miss the knowhow to tell what exactly goes wrong. > > > > Here is the from daemon.log when I run "xm create gerd.cfg -c" : > > > > /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/2049 > > /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/2050 > > /etc/xen/scripts/vif-bridge: online XENBUS_PATH=backend/vif/4/0 > > /etc/xen/scripts/vif-bridge: Writing backend/vif/4/0/hotplug-status error > > to xenstore. /etc/xen/scripts/vif-bridge: Could not find bridge, and none > > was specified /etc/xen/scripts/vif-bridge: offline > > XENBUS_PATH=backend/vif/4/0 > > /etc/xen/scripts/vif-bridge: Writing backend/vif/4/0/hotplug-status error > > to xenstore. /etc/xen/scripts/vif-bridge: Could not find bridge, and none > > was specified /etc/xen/scripts/xen-hotplug-cleanup: > > XENBUS_PATH=backend/vif/4/0 > > /etc/xen/scripts/block: Writing backend/vbd/4/2049/node /dev/loop1 to > > xenstore. /etc/xen/scripts/block: Writing > > backend/vbd/4/2049/physical-device 7:1 to xenstore. /etc/xen/scripts/block: > > Writing backend/vbd/4/2049/hotplug-status connected to xenstore. > > /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/4/2049 > > /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/4/2049 > > /etc/xen/scripts/block: Writing backend/vbd/4/2050/node /dev/loop1 to > > xenstore. /etc/xen/scripts/block: Writing > > backend/vbd/4/2050/physical-device 7:1 to xenstore. /etc/xen/scripts/block: > > Writing backend/vbd/4/2050/hotplug-status connected to xenstore. > > /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/4/2050 > > /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/4/2050 > > > > Here is what xend.log says when I run "xm create gerd.cfg -c" : > > > > [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) > > XendDomainInfo.create([''vm'', [''name'', ''gerd''], [''memory'', 196], [''vcpus'', > > 1], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], > > [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 > > ro'']]], [''device'', [''vbd'', [''uname'', > > ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]], > > [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], > > [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', > > ''192.168.10.70'']]]]) [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG > > (XendDomainInfo:284) parseConfig: config is [''vm'', [''name'', ''gerd''], > > [''memory'', 196], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', > > ''/boot/vmlinuz-2.6.16-2-xen-686''], [''ramdisk'', > > ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 ro'']]], > > [''device'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/disk.img''], > > [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', > > ''file:/home/xen/domains/gerd/swap.img''], [''dev'', ''sda2''], [''mode'', ''w'']]], > > [''device'', [''vif'', [''ip'', ''192.168.10.70'']]]] [2006-06-18 20:25:39 > > xend.XendDomainInfo] DEBUG (XendDomainInfo:380) parseConfig: result is > > {''ssidref'': None, ''uuid'': None, ''on_crash'': None, ''on_reboot'': None, > > ''image'': [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-2-xen-686''], > > [''ramdisk'', ''/boot/initrd.img-2.6.16-2-xen-686''], [''root'', ''/dev/sda1 > > ro'']], ''on_poweroff'': None, ''cpus'': None, ''name'': ''gerd'', ''backend'': [], > > ''vcpus'': 1, ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 196, > > ''device'': [(''vbd'', [''vbd'', [''uname'', > > ''file:/home/xen/domains/gerd/disk.img''], [''dev'', ''sda1''], [''mode'', ''w'']]), > > (''vbd'', [''vbd'', [''uname'', ''file:/home/xen/domains/gerd/swap.img''], [''dev'', > > ''sda2''], [''mode'', ''w'']]), (''vif'', [''vif'', [''ip'', ''192.168.10.70'']])], > > ''bootloader'': None, ''cpu'': None, ''maxmem'': None} [2006-06-18 20:25:39 > > xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct: > > None 0 [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG > > (XendDomainInfo:1196) XendDomainInfo.initDomain: 5 1.0 [2006-06-18 20:25:39 > > xend] DEBUG (balloon:126) Balloon: free 197; need 197; done. [2006-06-18 > > 20:25:39 xend] INFO (image:135) buildDomain os=linux dom=5 vcpus=1 > > [2006-06-18 20:25:39 xend] DEBUG (image:173) dom = 5 > > [2006-06-18 20:25:39 xend] DEBUG (image:174) image = > > /boot/vmlinuz-2.6.16-2-xen-686 [2006-06-18 20:25:39 xend] DEBUG (image:175) > > store_evtchn = 1 > > [2006-06-18 20:25:39 xend] DEBUG (image:176) console_evtchn = 2 > > [2006-06-18 20:25:39 xend] DEBUG (image:177) cmdline = > > root=/dev/sda1 ro [2006-06-18 20:25:39 xend] DEBUG (image:178) ramdisk > > = /boot/initrd.img-2.6.16-2-xen-686 [2006-06-18 20:25:39 xend] DEBUG > > (image:179) vcpus = 1 > > [2006-06-18 20:25:39 xend] DEBUG (image:180) features = > > [2006-06-18 20:25:39 xend] DEBUG (blkif:24) exception looking up device > > number for sda1: [Errno 2] No such file or directory: ''/dev/sda1'' > > [2006-06-18 20:25:39 xend] DEBUG (DevController:103) DevController: writing > > {''virtual-device'': ''2049'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > > ''/local/domain/0/backend/vbd/5/2049''} to /local/domain/5/device/vbd/2049. > > [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing > > {''domain'': ''gerd'', ''frontend'': ''/local/domain/5/device/vbd/2049'', ''dev'': > > ''sda1'', ''state'': ''1'', ''params'': ''/home/xen/domains/gerd/disk.img'', ''mode'': > > ''w'', ''frontend-id'': ''5'', ''type'': ''file''} to > > /local/domain/0/backend/vbd/5/2049. [2006-06-18 20:25:39 xend] DEBUG > > (blkif:24) exception looking up device number for sda2: [Errno 2] No such > > file or directory: ''/dev/sda2'' [2006-06-18 20:25:39 xend] DEBUG > > (DevController:103) DevController: writing {''virtual-device'': ''2050'', > > ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > > ''/local/domain/0/backend/vbd/5/2050''} to /local/domain/5/device/vbd/2050. > > [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing > > {''domain'': ''gerd'', ''frontend'': ''/local/domain/5/device/vbd/2050'', ''dev'': > > ''sda2'', ''state'': ''1'', ''params'': ''/home/xen/domains/gerd/swap.img'', ''mode'': > > ''w'', ''frontend-id'': ''5'', ''type'': ''file''} to > > /local/domain/0/backend/vbd/5/2050. [2006-06-18 20:25:39 xend] DEBUG > > (DevController:103) DevController: writing {''backend-id'': ''0'', ''mac'': > > ''00:16:3e:1d:35:5a'', ''handle'': ''0'', ''state'': ''1'', ''backend'': > > ''/local/domain/0/backend/vif/5/0''} to /local/domain/5/device/vif/0. > > [2006-06-18 20:25:39 xend] DEBUG (DevController:105) DevController: writing > > {''domain'': ''gerd'', ''handle'': ''0'', ''script'': ''/etc/xen/scripts/vif-bridge'', > > ''ip'': ''192.168.10.70'', ''state'': ''1'', ''frontend'': > > ''/local/domain/5/device/vif/0'', ''mac'': ''00:16:3e:1d:35:5a'', ''frontend-id'': > > ''5''} to /local/domain/0/backend/vif/5/0. [2006-06-18 20:25:39 > > xend.XendDomainInfo] DEBUG (XendDomainInfo:671) Storing VM details: > > {''ssidref'': ''0'', ''uuid'': ''324c5b66-049e-b6c0-28d7-35a3b4a94817'', > > ''on_reboot'': ''restart'', ''start_time'': ''1150655139.67'', ''on_poweroff'': > > ''destroy'', ''name'': ''gerd'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''memory'': > > ''196'', ''on_crash'': ''restart'', ''image'': "(linux (kernel > > /boot/vmlinuz-2.6.16-2-xen-686) (ramdisk /boot/initrd.img-2.6.16-2-xen-686) > > (root ''/dev/sda1 ro''))", ''maxmem'': ''196''} [2006-06-18 20:25:39 > > xend.XendDomainInfo] DEBUG (XendDomainInfo:696) Storing domain details: > > {''console/ring-ref'': ''197261'', ''console/port'': ''2'', ''name'': ''gerd'', > > ''console/limit'': ''1048576'', ''vm'': > > ''/vm/324c5b66-049e-b6c0-28d7-35a3b4a94817'', ''domid'': ''5'', > > ''cpu/0/availability'': ''online'', ''memory/target'': ''200704'', > > ''store/ring-ref'': ''197262'', ''store/port'': ''1''} [2006-06-18 20:25:39 > > xend.XendDomainInfo] DEBUG (XendDomainInfo:877) > > XendDomainInfo.handleShutdownWatch [2006-06-18 20:25:39 xend] DEBUG > > (DevController:132) Waiting for devices vif. [2006-06-18 20:25:39 xend] > > DEBUG (DevController:138) Waiting for 0. [2006-06-18 20:25:39 xend] DEBUG > > (DevController:403) hotplugStatusCallback > > /local/domain/0/backend/vif/5/0/hotplug-status. [2006-06-18 20:25:39 xend] > > DEBUG (DevController:403) hotplugStatusCallback > > /local/domain/0/backend/vif/5/0/hotplug-status. [2006-06-18 20:25:39 xend] > > DEBUG (DevController:417) hotplugStatusCallback 2. [2006-06-18 20:25:39 > > xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy: > > domid=5 [2006-06-18 20:25:39 xend.XendDomainInfo] DEBUG > > (XendDomainInfo:1335) XendDomainInfo.destroyDomain(5) > > > > > > Sorry, but that is a bit too much for a Xen beginner ;-) Your help is very > > much appreciated. > > > > Jens > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > lists.xensource.com/xen-users > > -- > jabber-chat: nachtigall@amessage.de > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
Jens Nachtigall
2006-Jun-20 09:03 UTC
now really solved Re: [Xen-users] Error: Device 0 (vif) could not be connected. Backend device not found.
Am Montag, 19. Juni 2006 06:29 schrieb pak333@comcast.net:> I am having the same problem, however on RHEL 2.6.16. > I have tried setting up the bridge manually but it does now work. > Can someone give some clues on what we should do to solve this problem in > RHELPlease ignore my previous mail, here is how to do it without modifying /etc/network/interfaces: I read /usr/share/doc/xen-utils-3.0/README.Debian.gz> * About networking: > > By default Xen modifies your networking configuration, creating a > bridge. To avoid breaking a machine''s connection to the network the debian > package doesn''t touch the network configuration unless requested. On the > other hand xen needs to connect the guest domains somewhere, in order for > them to have networking, and expects that the xen bridge exists. You should > hand-tune your networking configuration by editing /etc/xen/xend-config.sxp > and possibly /etc/network/interfaces to decide how to connect your domains > to the network.Maybe this is the same on Red Hat? I had to comment out #(network-script network-dummy) and change it to (network-script network-bridge)> * About loop devices: > > If you plan hosting virtual domains with file backed block devices (ie. > the ones xen-tools creates by default) be careful about two issues: > > 1. Maximum number of loop devices > By default the loop driver supports a maximum of 8 loop devices. Of > course since every xen domain uses at least two (one for the data and > one for the swap) this number is absolutely insufficient. You should > increase it by adding a file named local-loop in /etc/modprobe.d containing > the string "options loop max_loop=128", if the loop driver is compiled as a > module, or by appending the string max_loop=128 to your kernel parameters > if the driver is in-kernel. Of course you can increase or decrease the > number 128 as you see fit.I created this file with options loop max_loop=128. Do a "ls -l /dev/loop*", if there are only a few loop devices and /var/log/daemon.log says logger: /etc/xen/scripts/block: Failed to find an unused loop device Then you should do this as well as what comes here:> > 2. Driver loading (only if loop is compiled as a module) > Normally the loop driver gets loaded when the first loop device is > accessed. When using udev, though, the loop devices get created only > after the driver gets loaded. This means that xen will fail if the > loop driver is not already loaded when it tries to start a file-backed > virtual domain. To fix this just add "loop" in your /etc/modules file, > thus forcing it to be loaded at boot time.This could all also be necessary on RH, so give it a try. Maybe RH also has such a README? HTH, Jens _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users