vmm: Improve resiliency of image type handling

Add an image_type to DiskConfig to specify the image type. If none is
specified autodetect the image type but disable potentially unsafe
behaviour in the QCOW2 backend by disabling the backing file support.

If the image type is autodetected then fix it in the config so that it
will be persistant across reboots and migrations/snapshot & restores.
This also handles the case where the image type was not specified as
part of the disk configuration.

Signed-off-by: Rob Bradford <rbradford@meta.com>
(cherry picked from commit 6f2357c14e)
This commit is contained in:
Rob Bradford
2026-02-15 11:25:53 +00:00
committed by Bo Chen
parent 30166a4ea5
commit 5a0b6f2d06
9 changed files with 161 additions and 27 deletions

View File

@@ -944,6 +944,9 @@ components:
backing_files:
type: boolean
default: false
image_type:
type: enum ["FixedVhd", "Qcow2", "Raw", "Vhdx"]
NetConfig:
type: object