mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 13:14:11 +00:00
forbid vm_start if current config is a template.
if files (raw,qcow2) are a template, we forbid vm_start. note : the readonly protection do already the job, but we need a clear message for users Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
90b0c6b34a
commit
3dcb98d52b
@ -2930,6 +2930,8 @@ sub vm_start {
|
||||
lock_config($vmid, sub {
|
||||
my $conf = load_config($vmid, $migratedfrom);
|
||||
|
||||
die "you can't start a vm if it's a template" if is_template($conf);
|
||||
|
||||
check_lock($conf) if !$skiplock;
|
||||
|
||||
die "VM $vmid already running\n" if check_running($vmid, undef, $migratedfrom);
|
||||
|
Loading…
Reference in New Issue
Block a user