提交 d1ec4d7a 编写于 作者: C Chris Lalancette

Run 'cont' on successful migration finish.

As of qemu 0.10.6, qemu now honors the -S flag on incoming migration.
That means that when the migration completes, we have to issue a
'cont' command to get the VM running again.  We do it unconditionally
since it won't hurt on older qemu.
Signed-off-by: NChris Lalancette <clalance@redhat.com>
上级 3c7a12b4
...@@ -6597,7 +6597,18 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn, ...@@ -6597,7 +6597,18 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
*/ */
if (retcode == 0) { if (retcode == 0) {
dom = virGetDomain (dconn, vm->def->name, vm->def->uuid); dom = virGetDomain (dconn, vm->def->name, vm->def->uuid);
/* run 'cont' on the destination, which allows migration on qemu
* >= 0.10.6 to work properly. This isn't strictly necessary on
* older qemu's, but it also doesn't hurt anything there
*/
if (qemudMonitorCommand(vm, "cont", &info) < 0) {
qemudReportError(dconn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"%s", _("resume operation failed"));
goto cleanup;
}
VIR_FREE(info); VIR_FREE(info);
vm->state = VIR_DOMAIN_RUNNING; vm->state = VIR_DOMAIN_RUNNING;
event = virDomainEventNewFromObj(vm, event = virDomainEventNewFromObj(vm,
VIR_DOMAIN_EVENT_RESUMED, VIR_DOMAIN_EVENT_RESUMED,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册