5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-25 23:21:43 +03: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:
Alexandre Derumier 2013-02-14 11:58:52 +01:00 committed by Dietmar Maurer
parent 66aa07141f
commit 90b0c6b34a

View File

@ -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);