]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Clarify direct migration
authorJiri Denemark <jdenemar@redhat.com>
Thu, 12 Jul 2012 13:27:18 +0000 (15:27 +0200)
committerCole Robinson <crobinso@redhat.com>
Sun, 12 Aug 2012 23:23:51 +0000 (19:23 -0400)
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
(cherry picked from commit 3189dfb1636da22d426d2fc07cc9f60304b16c5c)

src/libvirt.c
tools/virsh.pod

index ce1221b9b2cbf82b8174e756d6c9480dad457e4d..e144ab0253d67bfb36b62b5bdf81aa70aa3bee1f 100644 (file)
@@ -5685,7 +5685,9 @@ virDomainMigrateToURI (virDomainPtr domain,
                 goto error;
         } else {
             /* 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;
         }
     }
@@ -5819,7 +5821,9 @@ virDomainMigrateToURI2(virDomainPtr domain,
                 goto error;
         } else {
             /* 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;
         }
     }
index 3bb5b10037c6ccbbff2fe07f3fa37431b95eec84..c8833e0305a32ffae31be85b1ae0bff147798c47 100644 (file)
@@ -869,6 +869,9 @@ is implicitly enabled when supported by the hypervisor, but can be explicitly
 used to reject the migration if the hypervisor lacks change protection
 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
 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