DOn't try to query memory balloon if guest isn't active

This commit is contained in:
Daniel P. Berrange 2009-03-27 14:57:51 +00:00
parent cb7593bd19
commit 3b97f7db53
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Fri Mar 27 11:44:22 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
* 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 <berrange@redhat.com>
Support memory ballooning in QEMU

View File

@ -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"));