[libvirt] [PATCH] qemuDriver: check for migrate command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
qemu doesn't know about "migrate" used to save a qemu/kvm domain.
Current CVS fails silently - this patch checks if the command if
available.
Cheers,
 -- Guido
[PATCH] check for the existence of the "migrate" command

for kvm/qemu domain safeing. Qemu doesn't have this yet.
---
 src/qemu_driver.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 3d0b6c5..01b4d18 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -2417,6 +2417,19 @@ static int qemudDomainSave(virDomainPtr dom,
         return -1;
     }
 
+    DEBUG ("migrate reply: %s", info);
+
+    /* If the command isn't supported then qemu prints:
+     * unknown command: migrate" */
+    if (strstr(info, "unknown command:")) {
+        qemudReportError (dom->conn, dom, NULL, VIR_ERR_NO_SUPPORT,
+                          "%s",
+                          _("'migrate' not supported by this qemu"));
+        VIR_FREE(info);
+        VIR_FREE(command);
+        return -1;
+    }
+
     VIR_FREE(info);
     VIR_FREE(command);
 
-- 
1.5.6.3

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]