esxi: parse volname: explicitly return format for vmx configuration file

For consistency with the list_images() call and so that callers can
better deal with it.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner
2024-12-06 17:25:29 +01:00
committed by Fabian Grünbichler
parent 541064a95b
commit 0cc5492707

View File

@ -418,7 +418,7 @@ sub parse_volname {
die "failed to parse volname '$volname'\n"
if $volname !~ m!^([^/]+)/([^/]+)/(.+)$!;
return ('import', $volname) if $volname =~ /\.vmx$/;
return ('import', $volname, 0, undef, undef, undef, 'vmx') if $volname =~ /\.vmx$/;
my $format = 'raw';
$format = 'vmdk' if $volname =~ /\.vmdk/;