Bug 636160 - RFE: quit API: Support a domain quit API
RFE: quit API: Support a domain quit API
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
Depends On:
Blocks: libvirtTodoHV
  Show dependency treegraph
Reported: 2010-09-21 11:17 EDT by Daniel Berrange
Modified: 2015-01-15 07:21 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-01-15 07:21:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2010-09-21 11:17:25 EDT
Description of problem:
Support an API for shutting down a guest which is less drastic than virDomainDestroy, but more forceful than virDomainShutdown. This lets QEMU safely flush out any pending data & cleanly shutdown.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Daniel Berrange 2015-01-15 07:21:38 EST
commit 72f8a7f19753506ed957b78ad800c0f3892c9304
Author: Laine Stump <laine@laine.org>
Date:   Fri Jan 27 13:28:23 2012 -0500

    qemu: new GRACEFUL flag for virDomainDestroy w/ QEMU support
    When libvirt's virDomainDestroy API is shutting down the qemu process,
    it first sends SIGTERM, then waits for 1.6 seconds and, if it sees the
    process still there, sends a SIGKILL.
    There have been reports that this behavior can lead to data loss
    because the guest running in qemu doesn't have time to flush its disk
    cache buffers before it's unceremoniously whacked.
    This patch maintains that default behavior, but provides a new flag
    VIR_DOMAIN_DESTROY_GRACEFUL to alter the behavior. If this flag is set
    in the call to virDomainDestroyFlags, SIGKILL will never be sent to
    the qemu process; instead, if the timeout is reached and the qemu
    process still exists, virDomainDestroy will return an error.
    Once this patch is in, the recommended method for applications to call
    virDomainDestroyFlags will be with VIR_DOMAIN_DESTROY_GRACEFUL
    included. If that fails, then the application can decide if and when
    to call virDomainDestroyFlags again without
    VIR_DOMAIN_DESTROY_GRACEFUL (to force the issue with SIGKILL).
    (Note that this does not address the issue of existing applications
    that have not yet been modified to use VIR_DOMAIN_DESTROY_GRACEFUL.
    That is a separate patch.)

Note You need to log in before you can comment on or make changes to this bug.