提交 48d44efc 编写于 作者: C Clementine Hayat 提交者: Ján Tomko

qemu: start using virDomainObjCheckActive

Signed-off-by: NClementine Hayat <clem@lse.epita.fr>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 e8c05584
......@@ -8730,11 +8730,8 @@ qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
return -1;
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain is not running"));
if (virDomainObjCheckActive(vm) < 0)
goto endjob;
}
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorGetBalloonInfo(priv->mon, &balloon);
......
此差异已折叠。
......@@ -1996,11 +1996,8 @@ qemuMigrationSrcBegin(virConnectPtr conn,
qemuMigrationSrcStoreDomainState(vm);
if (!virDomainObjIsActive(vm) && !(flags & VIR_MIGRATE_OFFLINE)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("domain is not running"));
if (!(flags & VIR_MIGRATE_OFFLINE) && virDomainObjCheckActive(vm) < 0)
goto endjob;
}
/* Check if there is any ejected media.
* We don't want to require them on the destination.
......@@ -4455,11 +4452,8 @@ qemuMigrationSrcPerformJob(virQEMUDriverPtr driver,
flags) < 0)
goto cleanup;
if (!virDomainObjIsActive(vm) && !(flags & VIR_MIGRATE_OFFLINE)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("domain is not running"));
if (!(flags & VIR_MIGRATE_OFFLINE) && virDomainObjCheckActive(vm) < 0)
goto endjob;
}
if (!qemuMigrationSrcIsAllowed(driver, vm, true, flags))
goto endjob;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册