[pve-devel] [RFC PATCH 1/2] config: allow hypens and dots in config keys

Fiona Ebner f.ebner at proxmox.com
Mon Oct 21 14:19:00 CEST 2024


Am 24.09.24 um 16:35 schrieb Maximiliano Sandoval:
> The first character still has to be a letter.
> 
> Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index b26da505..1566cf91 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -2382,7 +2382,7 @@ sub parse_vm_config {
>  	    } else {
>  		$handle_error->("vm $vmid - property 'delete' is only allowed in [PENDING]\n");
>  	    }
> -	} elsif ($line =~ m/^([a-z][a-z_]*\d*):\s*(.+?)\s*$/) {
> +	} elsif ($line =~ m/^([a-z][a-z_\.-]*\d*):\s*(.+?)\s*$/) {
>  	    my $key = $1;
>  	    my $value = $2;
>  	    if ($section eq 'cloudinit') {

Regarding the hyphen, see also:
https://lore.proxmox.com/pve-devel/7c911e11-d1cb-415b-9282-b40faa34dc9b@proxmox.com/#t

Also friendly ping for @Thomas for that mail, in particular, for where
this should be documented.




More information about the pve-devel mailing list