From: Peter Krempa Date: Fri, 12 May 2017 14:00:27 +0000 (+0200) Subject: qemu: Support only raw volumes in qemuDomainBlockPeek X-Git-Tag: v3.6.0-rc1~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b662d0b52003accaea865a694c4eb35d87a3b5bc;p=thirdparty%2Flibvirt.git 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. --- 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;