]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: snapshot: Correctly report qemu error on 'savevm'
authorPeter Krempa <pkrempa@redhat.com>
Fri, 15 Jan 2016 12:01:30 +0000 (13:01 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 Jan 2016 06:21:25 +0000 (07:21 +0100)
Since 'savevm' was not converted to QMP libvirt has to parse for error
strings in the text monitor output. One of the unhandled errors is
produced when qemu treats a device as unmigratable.

As current qemu actually does support AHCI migration this bug is
applicable only to older versions of qemu.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1293899

src/qemu/qemu_monitor_text.c

index 0801f84eac29153fb198f29bb8afefabaf8f678f..bb87397377cde59b8a45940379a35672def5c3cc 100644 (file)
@@ -2659,6 +2659,7 @@ qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon,
 
     if (strstr(reply, "Error while creating snapshot") ||
         strstr(reply, "Could not open VM state file") ||
+        strstr(reply, "State blocked by non-migratable device") ||
         (strstr(reply, "Error") && strstr(reply, "while writing VM"))) {
         virReportError(VIR_ERR_OPERATION_FAILED,
                        _("Failed to take snapshot: %s"), reply);