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@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list