additionalProperties => 0,
properties => PVE::LXC::json_config_properties({
node => get_standard_option('pve-node'),
- vmid => get_standard_option('pve-vmid', { completion => \&PVE::LXC::complete_next_vmid }),
+ vmid => get_standard_option('pve-vmid', { completion => \&PVE::Cluster::complete_next_vmid }),
ostemplate => {
description => "The OS template or backup file.",
type => 'string',
return $res;
}
-sub complete_next_vmid {
-
- my $vmlist = PVE::Cluster::get_vmlist() || {};
- my $idlist = $vmlist->{ids} || {};
-
- for (my $i = 100; $i < 10000; $i++) {
- return [$i] if !defined($idlist->{$i});
- }
-
- return [];
-}
-
my $complete_ctid_full = sub {
my ($running) = @_;