[libvirt] [PATCH] qemu: migrate: Error if we collide with an inactive domain

Cole Robinson crobinso at redhat.com
Tue Oct 27 15:37:23 UTC 2009


Currently the check for a VM name/uuid collision on the migrate destination
only errors for active domains. Not sure why this wouldn't apply for non
running VMs as well, so drop the check.

Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
 src/qemu/qemu_driver.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 86546e5..fb952d8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6341,13 +6341,10 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
 
     if (!vm) vm = virDomainFindByName(&driver->domains, dname);
     if (vm) {
-        if (virDomainIsActive(vm)) {
-            qemudReportError (dconn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
-                              _("domain with the same name or UUID already exists as '%s'"),
-                              vm->def->name);
-            goto cleanup;
-        }
-        virDomainObjUnlock(vm);
+        qemudReportError (dconn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
+                          _("domain with the same name or UUID already exists as '%s'"),
+                          vm->def->name);
+        goto cleanup;
     }
 
     if (!(vm = virDomainAssignDef(dconn,
-- 
1.6.5.rc2




More information about the libvir-list mailing list