mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d374389974
commit
fefb2d743a
@ -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 "
|
||||
|
Loading…
x
Reference in New Issue
Block a user