mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-02-01 17:16:48 +00:00
forbid rollback if current config is a template.
if a qcow2 current is a template, we can't rollback to a previous snapshot. (note that file readonly protection do already the job, but we need a clear error message for user) Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
66aa07141f
commit
90b0c6b34a
@ -4165,6 +4165,8 @@ sub snapshot_rollback {
|
||||
|
||||
my $conf = load_config($vmid);
|
||||
|
||||
die "you can't rollback if vm is a template" if is_template($conf);
|
||||
|
||||
$snap = $conf->{snapshots}->{$snapname};
|
||||
|
||||
die "snapshot '$snapname' does not exist\n" if !defined($snap);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user