mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-29 03:11:39 +00:00
resume: error out if VM is a template
Template-VMs might be started in 'prelaunch' state when creating a backup, but they must never be actually started fully, to avoid modifying their disks. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7a6c664fb2
commit
5c15c65f1d
@ -6392,6 +6392,9 @@ sub vm_resume {
|
||||
$conf = PVE::QemuConfig->load_config($vmid);
|
||||
}
|
||||
|
||||
die "VM $vmid is a template and cannot be resumed!\n"
|
||||
if PVE::QemuConfig->is_template($conf);
|
||||
|
||||
if ($res->{status}) {
|
||||
return if $res->{status} eq 'running'; # job done, go home
|
||||
$resume_cmd = 'system_wakeup' if $res->{status} eq 'suspended';
|
||||
|
Loading…
Reference in New Issue
Block a user