next diskname: start ids with 0 to honor MAX_VOLUMES_PER_GUEST
else we can only have MAX_VOLUMES_PER_GUEST-1 disk per VMID, not tragic but possible confusing Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -559,7 +559,7 @@ sub get_next_vm_diskname {
|
||||
my $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
|
||||
my $suffix = $add_fmt_suffix ? ".$fmt" : '';
|
||||
|
||||
for (my $i = 1; $i < $MAX_VOLUMES_PER_GUEST; $i++) {
|
||||
for (my $i = 0; $i < $MAX_VOLUMES_PER_GUEST; $i++) {
|
||||
if (!$disk_ids->{$i}) {
|
||||
return "$prefix-$vmid-disk-$i$suffix";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user