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

[libvirt] [PATCH 6/6] qemu: Support only raw volumes in qemuDomainBlockPeek



The API documents that it peeks into the VM disk. We can't do that
currently for non raw images so report an error.
---
 src/qemu/qemu_driver.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 115368d1d..53655749b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11328,6 +11328,12 @@ qemuDomainBlockPeek(virDomainPtr dom,
         goto cleanup;
     }

+    if (disk->src->format != VIR_STORAGE_FILE_RAW) {
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                       _("peeking is supported only for RAW disks"));
+        goto cleanup;
+    }
+
     if (qemuDomainStorageFileInit(driver, vm, disk->src) < 0)
         goto cleanup;

-- 
2.12.2


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