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

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

 



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

--
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]
  Powered by Linux