
On Thu, Aug 07, 2014 at 08:18:54AM +0200, Thomas Bechtold wrote:
Hi,
during debugging a problem[1] of Openstack Nova I recognized the following:
Doing a reboot (from inside of the VM with "reboot" command) on a kvm VM doesn't send any lifecycle events (events debugged with [2]). Doing the same thing with a xen VM leads to 2 events: First a VIR_DOMAIN_EVENT_STOPPED and then a VIR_DOMAIN_EVENT_STARTED event. The problem here is that for the xen case it doesn't seem to be possible to recognize that a reboot is ongoing. For that reason the OpenStack Nova component just forces the domain to stop after receiving the VIR_DOMAIN_EVENT_STOPPED event.
Is it expected that the 2 drivers send different events for the same action or a bug in qemu/xen/libvirt?
The lifecycle events reflect changes in the state of the machine hardware. When a guest OS reboots in QEMU, the actual hardware does not do a running -> shutoff -> running transition. Hence it is not appropriate to emit a STOPPED/STARTED event in this case. I have a feeling that in Xen though, the actual Xen domain is torn down & created again, though perhaps that is actually different for PV vs HVM domains. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|