[libvirt] bug: libvirt hang while restore a domain

Hi, i try to restore a domain without a valid disk (I deleted the diskfile before restoring it ...). Normally, this must always produce an error. ** The first time, an error occurred - OK: [root@xen03 srv]# virsh restore /srv/save libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /srv/save ** But the second time, the command hang: [root@xen03 srv]# virsh restore /srv/save ^C [root@xen03 srv]# virsh list ^C [root@xen03 srv]# I can't use libvirt now, until restarting the daemon.... *** The domain looks like this (/tmp/winxp100 does NOT exist) <domain type='kvm' id='3'> <name>winxp100</name> <uuid>4e991a91-5db6-0584-3750-6a288ae01ee4</uuid> <memory>256000</memory> <currentMemory>256000</currentMemory> <vcpu>1</vcpu> <os> <type arch='i686' machine='pc'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/kvm/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <driver name='qemu'/> <source dev='/tmp/winxp100'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> <mac address='52:54:00:cf:3e:66'/> <source bridge='br0'/> <script path='/etc/kvm/kvm-qemu-ipup.sh'/> <target dev='vnet1'/> <model type='e1000'/> </interface> <serial type='pty'> <source path='/dev/pts/6'/> <target port='0'/> </serial> <console type='pty' tty='/dev/pts/6'> <source path='/dev/pts/6'/> <target port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5901' autoport='yes'/> </devices> </domain> Is this a bug ? regards Danny ------------------------------------------------------------------- DT Netsolution GmbH - Taläckerstr. 30 - D-70437 Stuttgart Geschäftsführer: Daniel Schwager, Stefan Hörz - HRB Stuttgart 19870 Tel: +49-711-849910-32, Fax: -932 - Mailto:daniel.schwager@dtnet.de

** But the second time, the command hang: [root@xen03 srv]# virsh restore /srv/save
Update: qemu will not stop writing errors "Read failed" to the logfile /var/log/libvirt/qemu/winxp100.log. So, it is an qemu problem... LC_ALL=C LD_LIBRARY_PATH=/usr/local/staf/lib: PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/root USER=root LOGNAME=root /usr/kvm/bin/qemu-system-x86_64 -S -M pc -m 250 -smp 1 -name winxp100 -uuid 4e991a91-5db6-0584-3750-6a288ae01ee4 -monitor pty -pidfile /var/run/libvirt/qemu//winxp100.pid -boot c -drive file=/tmp/winxp100,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:cf:3e:66,vlan=0,model=e1000 -net tap,fd=21,script=,vlan=0,ifname=vnet1 -serial pty -parallel none -usb -usbdevice tablet -vnc 0.0.0.0:1 -incoming exec:cat qemu: could not open disk image /tmp/winxp100 Read failed Read failed Read failed Read failed Read failed Read failed Read failed Read failed .....

On Fri, Jan 30, 2009 at 01:14:57AM +0100, Daniel Schwager wrote:
** But the second time, the command hang: [root@xen03 srv]# virsh restore /srv/save
And libvirt daemon runs with 100% CPU load .. This is not good ..
I know about this problem & am working on a fix - the refactored startup code was not taking account of some failure scenarios, and ending up in an infinite loop Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Daniel P. Berrange
-
Daniel Schwager