From 3b97f7db53064b10d9dd4bab95259e52cd8e9972 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 27 Mar 2009 14:57:51 +0000 Subject: [PATCH] DOn't try to query memory balloon if guest isn't active --- ChangeLog | 5 +++++ src/qemu_driver.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 03989a99b7..50d79ad6d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 27 11:44:22 GMT 2009 Daniel P. Berrange + + * src/qemu_driver.c: Don't try to query balloon if guest + isn't running + Fri Mar 27 11:44:22 GMT 2009 Daniel P. Berrange Support memory ballooning in QEMU diff --git a/src/qemu_driver.c b/src/qemu_driver.c index dda5fcf4f9..b2974bb47b 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2429,6 +2429,9 @@ static int qemudDomainGetMemoryBalloon(virConnectPtr conn, int ret = -1; char *offset; + if (!virDomainIsActive(vm)) + return 0; + if (qemudMonitorCommand(vm, "info balloon", &reply) < 0) { qemudReportError(conn, dom, NULL, VIR_ERR_OPERATION_FAILED, "%s", _("could not query memory balloon allocation"));