Grant McWilliams
2009-Dec-16 08:20 UTC
[Xen-users] Hotplug failure when running DomU from ramdisk
I got this brilliant idea to try to run a DomU from ramdisk. Since I''m just calling the disk image from a hard drive it seemed like if I put it in a ramdisk it would boot much faster. However, the boot fails and worse yet after it fails no other DomU will start. The Ramdisk DomU and the other non-modified DomUs die with a hotplug problem. Here''s the relevant lines of the xend.log. [2009-12-16 00:12:49 4273] DEBUG (XendDomainInfo:92)> XendDomainInfo.create([''vm'', [''name'', ''student038''], [''memory'', ''300''], > [''on_reboot'', ''restart''], [''on_crash'', ''restart''], [''vcpus'', 1], > [''on_xend_start'', ''ignore''], [''on_xend_stop'', ''shutdown''], [''bootloader'', > ''/usr/bin/pygrub''], [''bootloader_args'', ''''], [''image'', [''linux'', > [''videoram'', 4]]], [''s3_integrity'', 1], [''device'', [''tap'', [''uname'', > ''tap:aio:/media/ramdisk/student038.img''], [''dev'', ''xvda''], [''mode'', ''w'']]], > [''device'', [''tap'', [''uname'', ''tap:aio:/srv/xen/student038-sdb.img''], [''dev'', > ''sdb''], [''mode'', ''w'']]], [''device'', [''vif'', [''bridge'', ''classnet0''], [''mac'', > ''00:16:3e:00:00:38'']]]]) > [2009-12-16 00:12:49 4273] DEBUG (XendDomainInfo:2296) > XendDomainInfo.constructDomain > [2009-12-16 00:12:49 4273] DEBUG (balloon:166) Balloon: 315164 KiB free; > need 4096; done. > [2009-12-16 00:12:49 4273] DEBUG (XendDomain:452) Adding Domain: 21 > [2009-12-16 00:12:49 4273] DEBUG (XendDomainInfo:2497) > XendDomainInfo.initDomain: 21 256 > [2009-12-16 00:12:49 12655] DEBUG (XendBootloader:113) Launching bootloader > as [''/usr/bin/pygrub'', ''--output=/var/run/xend/boot/xenbl.12024'', > ''/media/ramdisk/student038.img'']. > [2009-12-16 00:12:54 4273] DEBUG (XendDomainInfo:2521) > _initDomain:shadow_memory=0x0, memory_static_max=0x12c00000, > memory_static_min=0x0. > [2009-12-16 00:12:54 4273] DEBUG (balloon:166) Balloon: 315052 KiB free; > need 309248; done. > [2009-12-16 00:12:54 4273] INFO (image:173) buildDomain os=linux dom=21 > vcpus=1 > [2009-12-16 00:12:54 4273] DEBUG (image:659) domid = 21 > [2009-12-16 00:12:54 4273] DEBUG (image:660) memsize = 300 > [2009-12-16 00:12:54 4273] DEBUG (image:661) image > /var/run/xend/boot/boot_kernel.lDjkNL > [2009-12-16 00:12:54 4273] DEBUG (image:662) store_evtchn = 1 > [2009-12-16 00:12:54 4273] DEBUG (image:663) console_evtchn = 2 > [2009-12-16 00:12:54 4273] DEBUG (image:664) cmdline = ro > root=/dev/VolGroup00/LogVol00 console=xvc0 > [2009-12-16 00:12:54 4273] DEBUG (image:665) ramdisk > /var/run/xend/boot/boot_ramdisk.baaFxA > [2009-12-16 00:12:54 4273] DEBUG (image:666) vcpus = 1 > [2009-12-16 00:12:54 4273] DEBUG (image:667) features > [2009-12-16 00:12:54 4273] DEBUG (image:668) flags = 0 > [2009-12-16 00:12:54 4273] INFO (XendDomainInfo:2160) createDevice: tap : > {''bootable'': 1, ''uname'': ''tap:aio:/media/ramdisk/student038.img'', ''mode'': > ''w'', ''dev'': ''xvda'', ''uuid'': ''3580acaf-6e6b-2111-0327-d983ed9a7775''} > [2009-12-16 00:12:54 4273] DEBUG (DevController:95) DevController: writing > {''virtual-device'': ''51712'', ''device-type'': ''disk'', ''protocol'': ''x86_64-abi'', > ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > ''/local/domain/0/backend/tap/21/51712''} to > /local/domain/21/device/vbd/51712. > [2009-12-16 00:12:54 4273] DEBUG (DevController:97) DevController: writing > {''domain'': ''student038'', ''frontend'': ''/local/domain/21/device/vbd/51712'', > ''uuid'': ''3580acaf-6e6b-2111-0327-d983ed9a7775'', ''bootable'': ''1'', ''dev'': > ''xvda'', ''state'': ''1'', ''params'': ''aio:/media/ramdisk/student038.img'', ''mode'': > ''w'', ''online'': ''1'', ''frontend-id'': ''21'', ''type'': ''tap''} to > /local/domain/0/backend/tap/21/51712. > [2009-12-16 00:12:54 4273] INFO (XendDomainInfo:2160) createDevice: tap : > {''bootable'': 0, ''uname'': ''tap:aio:/srv/xen/student038-sdb.img'', ''mode'': ''w'', > ''dev'': ''sdb'', ''uuid'': ''3b6979ff-50c9-ef28-2544-6320970fb2c2''} > [2009-12-16 00:12:54 4273] DEBUG (DevController:95) DevController: writing > {''virtual-device'': ''2064'', ''device-type'': ''disk'', ''protocol'': ''x86_64-abi'', > ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > ''/local/domain/0/backend/tap/21/2064''} to /local/domain/21/device/vbd/2064. > [2009-12-16 00:12:54 4273] DEBUG (DevController:97) DevController: writing > {''domain'': ''student038'', ''frontend'': ''/local/domain/21/device/vbd/2064'', > ''uuid'': ''3b6979ff-50c9-ef28-2544-6320970fb2c2'', ''bootable'': ''0'', ''dev'': > ''sdb'', ''state'': ''1'', ''params'': ''aio:/srv/xen/student038-sdb.img'', ''mode'': > ''w'', ''online'': ''1'', ''frontend-id'': ''21'', ''type'': ''tap''} to > /local/domain/0/backend/tap/21/2064. > [2009-12-16 00:12:55 4273] INFO (XendDomainInfo:2160) createDevice: vif : > {''bridge'': ''classnet0'', ''mac'': ''00:16:3e:00:00:38'', ''uuid'': > ''56b5c2ad-9490-e6f3-7267-a3ae848b5ce4''} > [2009-12-16 00:12:55 4273] DEBUG (DevController:95) DevController: writing > {''mac'': ''00:16:3e:00:00:38'', ''handle'': ''0'', ''protocol'': ''x86_64-abi'', > ''backend-id'': ''0'', ''state'': ''1'', ''backend'': > ''/local/domain/0/backend/vif/21/0''} to /local/domain/21/device/vif/0. > [2009-12-16 00:12:55 4273] DEBUG (DevController:97) DevController: writing > {''bridge'': ''classnet0'', ''domain'': ''student038'', ''handle'': ''0'', ''uuid'': > ''56b5c2ad-9490-e6f3-7267-a3ae848b5ce4'', ''script'': > ''/etc/xen/scripts/vif-bridge'', ''mac'': ''00:16:3e:00:00:38'', ''frontend-id'': > ''21'', ''state'': ''1'', ''online'': ''1'', ''frontend'': > ''/local/domain/21/device/vif/0''} to /local/domain/0/backend/vif/21/0. > [2009-12-16 00:12:55 4273] DEBUG (XendDomainInfo:3052) Storing VM details: > {''on_xend_stop'': ''shutdown'', ''shadow_memory'': ''0'', ''uuid'': > ''d297fda1-d5fe-e7a6-4925-f7aa8a706bd3'', ''on_reboot'': ''restart'', > ''start_time'': ''1260951175.05'', ''on_poweroff'': ''destroy'', ''bootloader_args'': > '''', ''on_xend_start'': ''ignore'', ''on_crash'': ''restart'', ''xend/restart_count'': > ''0'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''bootloader'': ''/usr/bin/pygrub'', > ''image'': "(linux (kernel ) (videoram 4) (notes (FEATURES > ''writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'') > (VIRT_BASE 18446744071562067968) (GUEST_VERSION 2.6) (PADDR_OFFSET > 18446744071562067968) (GUEST_OS linux) (HYPERCALL_PAGE 18446744071564189696) > (LOADER generic) (ENTRY 18446744071564165120) (XEN_VERSION xen-3.0)))", > ''name'': ''student038''} > [2009-12-16 00:12:55 4273] DEBUG (XendDomainInfo:1622) Storing domain > details: {''console/ring-ref'': ''431020'', ''image/entry'': > ''18446744071564165120'', ''console/port'': ''2'', ''store/ring-ref'': ''431021'', > ''image/loader'': ''generic'', ''vm'': ''/vm/d297fda1-d5fe-e7a6-4925-f7aa8a706bd3'', > ''control/platform-feature-multiprocessor-suspend'': ''1'', ''image/guest-os'': > ''linux'', ''image/features/writable-descriptor-tables'': ''1'', > ''image/virt-base'': ''18446744071562067968'', ''memory/target'': ''307200'', > ''image/guest-version'': ''2.6'', ''image/features/supervisor-mode-kernel'': ''1'', > ''console/limit'': ''1048576'', ''image/paddr-offset'': ''18446744071562067968'', > ''image/hypercall-page'': ''18446744071564189696'', ''cpu/0/availability'': > ''online'', ''image/features/pae-pgdir-above-4gb'': ''1'', > ''image/features/writable-page-tables'': ''1'', ''console/type'': ''xenconsoled'', > ''image/features/auto-translated-physmap'': ''1'', ''name'': ''student038'', > ''domid'': ''21'', ''image/xen-version'': ''xen-3.0'', ''store/port'': ''1''} > [2009-12-16 00:12:55 4273] DEBUG (DevController:95) DevController: writing > {''protocol'': ''x86_64-abi'', ''state'': ''1'', ''backend-id'': ''0'', ''backend'': > ''/local/domain/0/backend/console/21/0''} to > /local/domain/21/device/console/0. > [2009-12-16 00:12:55 4273] DEBUG (DevController:97) DevController: writing > {''domain'': ''student038'', ''frontend'': ''/local/domain/21/device/console/0'', > ''uuid'': ''71ef139a-a1a1-f633-813a-3bd97435d291'', ''frontend-id'': ''21'', > ''state'': ''1'', ''location'': ''2'', ''online'': ''1'', ''protocol'': ''vt100''} to > /local/domain/0/backend/console/21/0. > [2009-12-16 00:12:55 4273] DEBUG (XendDomainInfo:1709) > XendDomainInfo.handleShutdownWatch > [2009-12-16 00:12:55 4273] DEBUG (DevController:139) Waiting for devices > vif. > [2009-12-16 00:12:55 4273] DEBUG (DevController:144) Waiting for 0. > [2009-12-16 00:12:55 4273] DEBUG (DevController:629) hotplugStatusCallback > /local/domain/0/backend/vif/21/0/hotplug-status. > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2724) > XendDomainInfo.destroy: domid=21 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2199) Destroying device > model > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2206) Releasing devices > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2219) Removing vif/0 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:1134) > XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2219) Removing vbd/51712 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:1134) > XendDomainInfo.destroyDevice: deviceClass = tap, device = vbd/51712 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2219) Removing vbd/2064 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:1134) > XendDomainInfo.destroyDevice: deviceClass = tap, device = vbd/2064 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2219) Removing console/0 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:1134) > XendDomainInfo.destroyDevice: deviceClass = console, device = console/0 > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2204) No device model > [2009-12-16 00:13:09 4273] DEBUG (XendDomainInfo:2206) Releasing devices >Any ideas why I can''t run a DomU off a ramdisk? And even if that isn''t possible why doesn''t it muck up the rest of the DomUs? This is the message I get after it returns me to the command prompt. [root@server ~]# Error: Device 0 (vif) could not be connected. Hotplug> scripts not working. >Grant McWilliams Some people, when confronted with a problem, think "I know, I''ll use Windows." Now they have two problems. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Grant McWilliams
2009-Dec-16 15:49 UTC
[Xen-users] Re: Hotplug failure when running DomU from ramdisk
On Wed, Dec 16, 2009 at 12:20 AM, Grant McWilliams < grantmasterflash@gmail.com> wrote:> I got this brilliant idea to try to run a DomU from ramdisk. Since I''m just > calling the disk image from a hard drive it seemed like if I put it in a > ramdisk it would boot much faster. However, the boot fails and worse yet > after it fails no other DomU will start. The Ramdisk DomU and the other > non-modified DomUs die with a hotplug problem. Here''s the relevant lines of > the xend.log. > > >> > Any ideas why I can''t run a DomU off a ramdisk? And even if that isn''t > possible why doesn''t it muck up the rest of the DomUs? This is the message I > get after it returns me to the command prompt. > > [root@server ~]# Error: Device 0 (vif) could not be connected. Hotplug >> scripts not working. >> > > > Grant McWilliams > > Some people, when confronted with a problem, think "I know, I''ll use > Windows." > Now they have two problems. > >Oh for those who need to know this is with Xen 3.4.1 x86_64 from the gitco repos with a CentOS 5.4 Dom0 and CentOS 5.3 DomUs. In addition the only way to fix this that I''ve found was a reboot of the Dom0. The more I try to do things outside of the norm (like using qcow2) the more bugs I find in xen. I know I''m just idealizing KVM but it''s starting to feel that my battle will become more and more uphill with Xen. I''ve invested 3 years of my life with Xen and just running no frills PV or HVM DomUs works great but anything weird (like having a script that starts all DomUs at once) and the thing freaks out. Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-17 02:21 UTC
Re: [Xen-users] Hotplug failure when running DomU from ramdisk
On Wed, Dec 16, 2009 at 3:20 PM, Grant McWilliams <grantmasterflash@gmail.com> wrote:> I got this brilliant idea to try to run a DomU from ramdisk. Since I''m just > calling the disk image from a hard drive it seemed like if I put it in a > ramdisk it would boot much faster. However, the boot fails and worse yet > after it fails no other DomU will start. The Ramdisk DomU and the other > non-modified DomUs die with a hotplug problem. Here''s the relevant lines of > the xend.log.> >> [''device'', [''tap'', [''uname'', >> ''tap:aio:/media/ramdisk/student038.img''], [''dev'', ''xvda''], [''mode'', ''w'']]], >> [''device'', [''tap'', [''uname'', ''tap:aio:/srv/xen/student038-sdb.img''], [''dev'', >> ''sdb''], [''mode'', ''w'']]]looks to me that you''re still using disks instead of ramdisk.>> [root@server ~]# Error: Device 0 (vif) could not be connected. Hotplug >> scripts not working.is udevd running on dom0? Is there a bridge called classnet0? FWIW, I have some test setup with busybox and initramfs, no disks attach to domU, and it works fine. The domU config is something like this # cat busybox-2.6.29-xen #===============================================================def name_check(var, val): if val == None: raise ValueError return val xm_vars.var(''vmname'', use="Virtual machine name. String.", check=name_check) xm_vars.check() name = "%s" % vmname memory = "500" maxmem = "8000" vcpus=8 vcpu_avail=1 cpus="1-7" vif = [ ''bridge=virbr0, vifname=%s-eth0'' % vmname , ] kernel="/etc/xen/kernel/vmlinuz-2.6.29.6-xen" ramdisk="/etc/xen/initrd/busybox.img" extra="console=xvc0" #=============================================================== and I start it with something like this xm create busybox-2.6.29-xen vmname=test01 -c That way I can use a single domU config file to create as many domUs as needed, with a simple change to "vmname" variable on command line. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-17 07:00 UTC
Re: [Xen-users] Re: Hotplug failure when running DomU from ramdisk
On Wed, Dec 16, 2009 at 10:49 PM, Grant McWilliams <grantmasterflash@gmail.com> wrote:> Oh for those who need to know this is with Xen 3.4.1 x86_64 from the gitco > repos with a CentOS 5.4 Dom0 and CentOS 5.3 DomUs.similar dom0 setup here.> > In addition the only way to fix this that I''ve found was a reboot of the > Dom0. The more I try to do things outside of the norm (like using qcow2) the > more bugs I find in xen.I haven''t been able to get qcow2 to work :D There were always some bug here and there, which is why I use LVM or zfs snapshot/clone.> I know I''m just idealizing KVM but it''s starting to > feel that my battle will become more and more uphill with Xen. I''ve invested > 3 years of my life with Xen and just running no frills PV or HVM DomUs works > great but anything weird (like having a script that starts all DomUs at > once) and the thing freaks out.To tell the truth, I haven''t tried starting all domUs at once (never had the need to). I did, however, run a scalability test by starting lots of the above initramfs-based domU config using only 16MB memory each. With that setup, I was able to run over 300 domUs simultaneously. At that point, xenstored uses 100% CPU on dom0, and starting another domU takes over 10 seconds, so I stopped it there. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users