提交 3189dfb1 编写于 作者: J Jiri Denemark

Clarify direct migration

When --direct is used when migrating a domain running on a hypervisor
that does not support direct migration (such as QEMU), the caller would
get the following error message:

    this function is not supported by the connection driver:
    virDomainMigrateToURI2

which is a complete nonsense since qemu driver implements
virDomainMigrateToURI2. This patch would emit a more sensible error in
this case:

    Requested operation is not valid: direct migration is not supported
    by the connection driver
上级 efe6c802
...@@ -5562,7 +5562,9 @@ virDomainMigrateToURI (virDomainPtr domain, ...@@ -5562,7 +5562,9 @@ virDomainMigrateToURI (virDomainPtr domain,
goto error; goto error;
} else { } else {
/* Cannot do a migration with only the perform step */ /* Cannot do a migration with only the perform step */
virLibConnError(VIR_ERR_NO_SUPPORT, __FUNCTION__); virLibConnError(VIR_ERR_OPERATION_INVALID, "%s",
_("direct migration is not supported by the"
" connection driver"));
goto error; goto error;
} }
} }
...@@ -5696,7 +5698,9 @@ virDomainMigrateToURI2(virDomainPtr domain, ...@@ -5696,7 +5698,9 @@ virDomainMigrateToURI2(virDomainPtr domain,
goto error; goto error;
} else { } else {
/* Cannot do a migration with only the perform step */ /* Cannot do a migration with only the perform step */
virLibConnError(VIR_ERR_NO_SUPPORT, __FUNCTION__); virLibConnError(VIR_ERR_OPERATION_INVALID, "%s",
_("direct migration is not supported by the"
" connection driver"));
goto error; goto error;
} }
} }
......
...@@ -990,6 +990,9 @@ is implicitly enabled when supported by the hypervisor, but can be explicitly ...@@ -990,6 +990,9 @@ is implicitly enabled when supported by the hypervisor, but can be explicitly
used to reject the migration if the hypervisor lacks change protection used to reject the migration if the hypervisor lacks change protection
support. I<--verbose> displays the progress of migration. support. I<--verbose> displays the progress of migration.
B<Note>: Individual hypervisors usually do not support all possible types of
migration. For example, QEMU does not support direct migration.
In some cases libvirt may refuse to migrate the domain because doing so may In some cases libvirt may refuse to migrate the domain because doing so may
lead to potential problems such as data corruption, and thus the migration is lead to potential problems such as data corruption, and thus the migration is
considered unsafe. For QEMU domain, this may happen if the domain uses disks considered unsafe. For QEMU domain, this may happen if the domain uses disks
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册