[pve-devel] [PATCH storage v3 1/4] add standard option for VM disk formats in file-based storages

Fiona Ebner f.ebner at proxmox.com
Wed May 21 15:09:41 CEST 2025


Am 07.03.25 um 10:25 schrieb Markus Frank:
> Signed-off-by: Markus Frank <m.frank at proxmox.com>
> ---
> v3:
> * removed 'optional => 1'
> * changed description
> 
>  src/PVE/Storage/Plugin.pm | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 65cf43f..c15dc44 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm

We now have a pve-storage-image-format in Storage/Common.pm. This new
option should be placed alongside that one and POD documentation added.

> @@ -354,6 +354,12 @@ sub verify_format {
>      return $fmt;
>  }
>  
> +PVE::JSONSchema::register_standard_option('pve-vm-image-format', {
> +    type => 'string',
> +    enum => ['raw', 'qcow2', 'vmdk'],
> +    description => "VM image formats.",

This is the user-facing description. Such an option is for selecting a
single format, so:
s/formats/format/

> +});
> +
>  PVE::JSONSchema::register_format('pve-storage-options', \&verify_options);
>  sub verify_options {
>      my ($value, $noerr) = @_;





More information about the pve-devel mailing list