summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-09-04 15:25:22 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-09-04 15:36:06 +0100
commitcc4b3139d17b98d734d98286bb698bb3b105da05 (patch)
treec052743c56754493768575b63c799e8df90e50df
parent05beac65e58ef20899c7a50888a2854c07f83db9 (diff)
downloadlibguestfs-cc4b3139d17b98d734d98286bb698bb3b105da05.tar.gz
libguestfs-cc4b3139d17b98d734d98286bb698bb3b105da05.tar.xz
libguestfs-cc4b3139d17b98d734d98286bb698bb3b105da05.zip
launch: libvirt: Add VIR_DOMAIN_DESTROY_GRACEFUL flag.
We want libvirt to report failures when destroying the guest. See: https://bugzilla.redhat.com/show_bug.cgi?id=853369#c12
-rw-r--r--src/launch-libvirt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 37c1af47..04431641 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1150,8 +1150,7 @@ shutdown_libvirt (guestfs_h *g)
*/
if (dom != NULL) {
- /* XXX Need to be graceful? */
- if (virDomainDestroyFlags (dom, 0) == -1) {
+ if (virDomainDestroyFlags (dom, VIR_DOMAIN_DESTROY_GRACEFUL) == -1) {
libvirt_error (g, _("could not destroy libvirt domain"));
ret = -1;
}