]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Keep track of guest paused state after disk IO / watchdog events
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 16 Feb 2010 12:07:49 +0000 (12:07 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 1 Apr 2010 11:35:46 +0000 (12:35 +0100)
commitcd2404a3c377072114353c59385883a7a5378bc5
tree9e43291af5cb0522a2fe61870bfc3a3d3126a9c4
parentd13eb9fc95873d11779f0ff1a5c0df65c3b42a8f
Keep track of guest paused state after disk IO / watchdog events

When a watchdog/IO error occurs, one of the possible actions that
QEMU might take is to pause the guest. In this scenario libvirt
needs to update its internal state for the VM, and emit a
lifecycle event:

  VIR_DOMAIN_EVENT_SUSPENDED

with a detail being one of:

  VIR_DOMAIN_EVENT_SUSPENDED_IOERROR
  VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG

To future proof against possible QEMU support for multiple monitor
consoles, this patch also hooks into the 'STOPPED' event in QEMU
and emits a generic VIR_DOMAIN_EVENT_SUSPENDED_PAUSED event

* include/libvirt/libvirt.h.in: Add VIR_DOMAIN_EVENT_SUSPENDED_IOERROR
* src/qemu/qemu_driver.c: Update VM state to paused when IO error
  or watchdog events occurrs
* src/qemu/qemu_monitor_json.c: Fix typo in disk IO event name
include/libvirt/libvirt.h.in
src/qemu/qemu_driver.c
src/qemu/qemu_monitor_json.c