type => 'number',
minimum => '0',
},
+ start => {
+ optional => 1,
+ type => 'boolean',
+ default => 0,
+ description => "Start the CT after its creation finished successfully.",
+ },
}),
},
returns => {
my $bwlimit = extract_param($param, 'bwlimit');
+ my $start_after_create = extract_param($param, 'start');
+
my $basecfg_fn = PVE::LXC::Config->config_file($vmid);
my $same_container_exists = -f $basecfg_fn;
die $err;
}
PVE::AccessControl::add_vm_to_pool($vmid, $pool) if $pool;
+
+ PVE::API2::LXC::Status->vm_start({ vmid => $vmid, node => $node })
+ if $start_after_create;
};
my $realcmd = sub { PVE::LXC::Config->lock_config($vmid, $code); };