From b662d0b52003accaea865a694c4eb35d87a3b5bc Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 12 May 2017 16:00:27 +0200 Subject: [PATCH] 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 d976826d70..a7019c53cc 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.47.2