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.
This commit is contained in:
Peter Krempa
2017-07-11 17:07:04 +02:00
parent 3956af495e
commit b662d0b520
+6
View File
@@ -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;