mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-09 12:38:27 -05:00
DOn't try to query memory balloon if guest isn't active
This commit is contained in:
@@ -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