[libvirt] [PATCH] qemu: Allow graceful domain destroy

Eric Blake eblake at redhat.com
Mon Aug 22 15:29:56 UTC 2011


On 08/22/2011 09:21 AM, Daniel P. Berrange wrote:
> If we had a separate API for sending 'quit' on the monitor, then the
> mgmt app can decide how long to wait for the graceful shutdown of QEMU
> before resorting to the hard virDomainDestroy command. If the app knows
> that there is high I/O load, then it might want to wait for 'quit' to
> complete longer than normal to allow enough time for I/O flush.

Indeed - that is exactly what I was envisioning with a 
virDomainShutdownFlags() call with a flag to request to use the quit 
monitor command instead of the default ACPI injection.  The 
virDomainShutdownFlags() would have no timeout (it blocks until 
successful, or returns failure with no 'quit' command attempted), and 
the caller can inject their own unconditional virDomainDestroy() at 
whatever timeout they think is appropriate.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list