From c9a2ce281b06210891f438a37e2472a869bdaf73 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Thu, 13 Nov 2025 15:40:56 +0100 Subject: [PATCH] common: add pve-vm-image-format standard option for VM image formats The image formats defined for the pve-vm-image-format standard option are the formats that are allowed on Proxmox VE storages for VM images. Signed-off-by: Fiona Ebner Reviewed-by: Daniel Kral Tested-by: Daniel Kral Link: https://lore.proxmox.com/20251113144131.560130-4-f.ebner@proxmox.com Signed-off-by: Thomas Lamprecht --- src/PVE/Storage/Common.pm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm index 222dc76..3932aee 100644 --- a/src/PVE/Storage/Common.pm +++ b/src/PVE/Storage/Common.pm @@ -45,16 +45,31 @@ Possible formats a guest image can have. =cut +PVE::JSONSchema::register_standard_option( + 'pve-storage-image-format', + { + type => 'string', + enum => ['raw', 'qcow2', 'subvol', 'vmdk'], + description => "Format of the image.", + }, +); + +=head3 pve-vm-image-format + +Possible formats a VM image can have. + +=cut + # TODO PVE 9 - Note that currently, qemu-server allows more formats for VM images, so third party # storage plugins might potentially allow more too, but none of the plugins we are aware of do that. # Those formats should either be allowed here or support for them should be phased out (at least in # the storage layer). Can still be added again in the future, should any plugin provider request it. PVE::JSONSchema::register_standard_option( - 'pve-storage-image-format', + 'pve-vm-image-format', { type => 'string', - enum => ['raw', 'qcow2', 'subvol', 'vmdk'], + enum => ['raw', 'qcow2', 'vmdk'], description => "Format of the image.", }, );