if we do not do this, vmids < 100 (not really bad) and
vmids >
999999999 are possible, which can lead to vms which you can
only get rid of, if you delete the config files manually
also this makes the api consistent with the webgui for vmids
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
sub pve_verify_vmid {
my ($vmid, $noerr) = @_;
- if ($vmid !~ m/^[1-9][0-9]+$/) {
+ if ($vmid !~ m/^[1-9][0-9]{2,8}$/) {
return undef if $noerr;
die "value does not look like a valid VM ID\n";
}