mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
DOn't try to query memory balloon if guest isn't active
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user