提交 fefb2d74 编写于 作者: P Peter Krempa

qemu: checkpoint: Enforce that 'bitmap' name must match checkpoint name

Prevent insane configurations by enforcing that disk bitmap for a
checkpoint must match the name of the checkpoint.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 d3743899
......@@ -270,6 +270,13 @@ qemuCheckpointPrepare(virQEMUDriverPtr driver,
if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
continue;
if (STRNEQ(disk->bitmap, def->parent.name)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("bitmap for disk '%s' must match checkpoint name '%s'"),
disk->name, def->parent.name);
goto cleanup;
}
if (vm->def->disks[i]->src->format != VIR_STORAGE_FILE_QCOW2) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("checkpoint for disk %s unsupported "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册