I just tried to setup another domain on a server running 1 domain. When i try to start the domain it gives me an error Error: Device 0 (vif) could not be connected. Backend device not found. The entry in my xen config file for the disks is disk [''phy:/dev/xen001/xen2-fun,sda1,w'',''phy:/dev/xen001/xen2-fun-swap,sda2,w''] Looking at /var/log/xend.log, i found something strange [2006-05-22 00:13:02 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) XendDomainInfo.create([''vm'', [''name'', ''xen3''], [''memory'', 128], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-xen-xensrv''], [''ramdisk'', ''/boot/initrd-2.6.16-xen-xensrv.img''], [''ip'', ''x.x.x.x: 1.2.3.4:y.y.y.y:255.255.255.240::eth0:off''], [''root'', ''/dev/sda1 ro''], [''args'', ''selinux=0'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/xen001/xen2-fun''], [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/xen001/xen2-fun-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', ''x.x.x.x''], [''mac'', ''AA:00:00:18:98:FD''], [''vifname'', ''vm03'']]]]) [2006-05-22 00:13:02 xend.XendDomainInfo] DEBUG (XendDomainInfo:284) parseConfig: config is [''vm'', [''name'', ''xen3''], [''memory'', 128], [''vcpus'', 1], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16-xen-xensrv''], [''ramdisk'', ''/boot/initrd-2.6.16-xen-xensrv.img''], [''ip'', ''x.x.x.x: 1.2.3.4:y.y.y.y:255.255.255.240::eth0:off''], [''root'', ''/dev/sda1 ro''], [''args'', ''selinux=0'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/xen001/xen2-fun''], [''dev'', ''sda1''], [''mode'', ''w'']]], [''device'', [''vbd'', [''uname'', ''phy:/dev/xen001/xen2-fun-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]], [''device'', [''vif'', [''ip'', ''x.x.x.x''], [''mac'', ''AA:00:00:18:98:FD''], [''vifname'', ''vm03'']]]] [2006-05-22 00:13:02 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-xen-xensrv''], [''ramdisk'', ''/boot/initrd-2.6.16-xen-xensrv.img''], [''ip'', ''x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.240::eth0:off''], [''root'', ''/dev/sda1 ro''], [''args'', ''selinux=0'']], ''on_poweroff'': None, ''cpus'': None, ''name'': ''xen3'', ''backend'': [], ''vcpus'': 1, ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 128, ''device'': [(''vbd'', [''vbd'', [''uname'', ''phy:/dev/xen001/xen2-fun''], [''dev'', ''sda1''], [''mode'', ''w'']]), (''vbd'', [''vbd'', [''uname'', ''phy:/dev/xen001/xen2-fun-swap''], [''dev'', ''sda2''], [''mode'', ''w'']]), (''vif'', [''vif'', [''ip'', ''x.x.x.x''], [''mac'', ''AA:00:00:18:98:FD''], [''vifname'', ''vm03'']])], ''bootloader'': None, ''cpu'': None, ''maxmem'': None} [2006-05-22 00:13:02 xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct: None 0 [2006-05-22 00:13:02 xend.XendDomainInfo] DEBUG (XendDomainInfo:1196) XendDomainInfo.initDomain: 11 1.0 [2006-05-22 00:13:02 xend] DEBUG (balloon:126) Balloon: free 426; need 129; done. [2006-05-22 00:13:02 xend] INFO (image:135) buildDomain os=linux dom=11 vcpus=1 [2006-05-22 00:13:02 xend] DEBUG (image:173) dom = 11 [2006-05-22 00:13:02 xend] DEBUG (image:174) image = /boot/vmlinuz- 2.6.16-xen-xensrv [2006-05-22 00:13:02 xend] DEBUG (image:175) store_evtchn = 1 [2006-05-22 00:13:02 xend] DEBUG (image:176) console_evtchn = 2 [2006-05-22 00:13:02 xend] DEBUG (image:177) cmdline = ip=x.x.x.x: 1.2.3.4:y.y.y.y:255.255.255.240::eth0:off root=/dev/sda1 ro selinux=0 [2006-05-22 00:13:02 xend] DEBUG (image:178) ramdisk = /boot/initrd- 2.6.16-xen-xensrv.img [2006-05-22 00:13:02 xend] DEBUG (image:179) vcpus = 1 [2006-05-22 00:13:02 xend] DEBUG (image:180) features [2006-05-22 00:13:03 xend] DEBUG (blkif:24) exception looking up device number for sda1: [Errno 2] No such file or directory: ''/dev/sda1'' [2006-05-22 00:13:03 xend] DEBUG (DevController:103) DevController: writing {''virtual-device'': ''2049'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vbd/11/2049''} to /local/domain/11/device/vbd/2049. [2006-05-22 00:13:03 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''xen3'', ''frontend'': ''/local/domain/11/device/vbd/2049'', ''dev'': ''sda1'', ''state'': ''1'', ''params'': ''/dev/xen001/xen2-fun'', ''mode'': ''w'', ''frontend-id'': ''11'', ''type'': ''phy''} to /local/domain/0/backend/vbd/11/2049. [2006-05-22 00:13:03 xend] DEBUG (blkif:24) exception looking up device number for sda2: [Errno 2] No such file or directory: ''/dev/sda2'' [2006-05-22 00:13:03 xend] DEBUG (DevController:103) DevController: writing {''virtual-device'': ''2050'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vbd/11/2050''} to /local/domain/11/device/vbd/2050. [2006-05-22 00:13:03 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''xen3'', ''frontend'': ''/local/domain/11/device/vbd/2050'', ''dev'': ''sda2'', ''state'': ''1'', ''params'': ''/dev/xen001/xen2-fun-swap'', ''mode'': ''w'', ''frontend-id'': ''11'', ''type'': ''phy''} to /local/domain/0/backend/vbd/11/2050. [2006-05-22 00:13:03 xend] DEBUG (DevController:103) DevController: writing {''backend-id'': ''0'', ''mac'': ''AA:00:00:18:98:FD'', ''handle'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vif/11/0''} to /local/domain/11/device/vif/0. [2006-05-22 00:13:03 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''xen3'', ''handle'': ''0'', ''script'': ''/etc/xen/scripts/vif-route2'', ''ip'': ''x.x.x.x'', ''state'': ''1'', ''frontend'': ''/local/domain/11/device/vif/0'', ''mac'': ''AA:00:00:18:98:FD'', ''vifname'': ''vm03'', ''frontend-id'': ''11''} to /local/domain/0/backend/vif/11/0. [2006-05-22 00:13:03 xend.XendDomainInfo] DEBUG (XendDomainInfo:671) Storing VM details: {''ssidref'': ''0'', ''uuid'': ''772962af-a18f-c8d9-623a-303d0ec50175'', ''on_reboot'': ''restart'', ''start_time'': ''1148236983.14'', ''on_poweroff'': ''destroy'', ''name'': ''xen3'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''memory'': ''128'', ''on_crash'': ''restart'', ''image'': "(linux (kernel /boot/vmlinuz- 2.6.16-xen-xensrv) (ramdisk /boot/initrd-2.6.16-xen-xensrv.img) (ip x.x.x.x: 1.2.3.4:y.y.y.y:255.255.255.240::eth0:off) (root ''/dev/sda1 ro'') (args ''selinux=0''))", ''maxmem'': ''128''} [2006-05-22 00:13:03 xend.XendDomainInfo] DEBUG (XendDomainInfo:696) Storing domain details: {''console/ring-ref'': ''92531'', ''console/port'': ''2'', ''name'': ''xen3'', ''console/limit'': ''1048576'', ''vm'': ''/vm/772962af-a18f-c8d9-623a-303d0ec50175'', ''domid'': ''11'', ''cpu/0/availability'': ''online'', ''memory/target'': ''131072'', ''store/ring-ref'': ''92532'', ''store/port'': ''1''} [2006-05-22 00:13:03 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch [2006-05-22 00:13:03 xend] DEBUG (DevController:132) Waiting for devices vif. [2006-05-22 00:13:03 xend] DEBUG (DevController:138) Waiting for 0. [2006-05-22 00:13:03 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/11/0/hotplug-status. [2006-05-22 00:13:05 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/11/0/hotplug-status. [2006-05-22 00:13:05 xend] DEBUG (DevController:417) hotplugStatusCallback 2. [2006-05-22 00:13:05 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy: domid=11 [2006-05-22 00:13:05 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) XendDomainInfo.destroyDomain(11) Noticing the following: [2006-05-22 00:13:03 xend] DEBUG (blkif:24) exception looking up device number for sda1: [Errno 2] No such file or directory: ''/dev/sda1'' [2006-05-22 00:13:03 xend] DEBUG (blkif:24) exception looking up device number for sda2: [Errno 2] No such file or directory: ''/dev/sda2'' I checked the image and it has /dev/sda1 and /dev/sda2 in it. Any ideas on why it is giving this error ? Just on a side note the existing domain which is running also has /dev/sda1 and /dev/sda2 used in it for main image and swap (does that make a difference ?? I tried to make it /dev/sda3 and /dev/sda4 for the new domain however the same error persists) Any help on this would be appreciated. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-May-21 23:46 UTC
[Xen-users] Re: exception looking up device number for sda1
I checked up the xend.log and see that the /dev/sda not found errors are also present for the domain which is already in production. confused.... If i shutdown the first domain, the second one starts without any modifications in the config file. Here is the config for both of them first domain (running successfully in production) kernel = "/boot/vmlinuz-2.6.16-xen-xensrv" ramdisk = "/boot/initrd-2.6.16-xen-xensrv.img" memory = 512 name = "xen1" dhcp ="off" vif = [''mac=AA:00:00:18:98:FB, ip=x.x.x.x, vifname=vm01''] cpus = "0,1,2,3" vcpus = 4 ip="x.x.x.x" netmask="255.255.255.240" gateway="y.y.y.y" extra="selinux=0" disk = [''phy:/dev/xen001/xen1,sda1,w'',''phy:/dev/xen001/xen1-swap,sda2,w''] root = "/dev/sda1 ro" Second Domain kernel = "/boot/vmlinuz-2.6.16-xen-xensrv" ramdisk = "/boot/initrd-2.6.16-xen-xensrv.img" memory = 128 name = "xen3" vif = [''mac=AA:00:00:18:98:FD, ip=x.x.x.x, vifname=vm03''] ip="x.x.x.x" netmask="255.255.255.240" gateway="y.y.y.y" extra="selinux=0" disk [''phy:/dev/xen001/xen2-fun,sda1,w'',''phy:/dev/xen001/xen2-fun-swap,sda2,w''] root = "/dev/sda1 ro" Both the images i have proper fstab setup and /dev/sda exists in both. The second one only starts if i shutdown the first one. Can anyone shed some light on this what could be the cause of this problem ? -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anand Gupta
2006-May-21 23:58 UTC
[Xen-users] Re: exception looking up device number for sda1
I have a custom script which i use to start the domU. It seems that my router is not able to direct traffic for the additional ips i have allocated to the first domU (i am running a routed network), hence the custom script. ping -b -c 1 255.255.255.255 arp -s x.x.x.x z:z:z:z:z:z pub ip route add x.x.x.x dev vm03 src y.y.y.y Above x.x.x.x is my domU ip and y.y.y.y is my dom0 ip. The above enables me to get ping on the additional ips i have on my domU''s. z:z:z:z:z:z is the macid for my nic. Now when i remove these additional lines and just use xm create to start the domU, the second domU also starts up. After the second domU starts up i issue the above commands and the second domU is still working properly. What in the above commands could be the cause of problems with starting up second domU. Thanks. -- regards, Anand Gupta _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users