From a85c6be13e40230ae9ca201fcf92cfc381bdd26a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 25 Nov 2019 10:02:46 +0100 Subject: [PATCH] api: catch 'pending' as snapshot name early MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit instead of only at write_config time. Signed-off-by: Fabian Grünbichler --- PVE/API2/Qemu.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index bd907cda..95a0cc57 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -3715,6 +3715,9 @@ __PACKAGE__->register_method({ die "unable to use snapshot name 'current' (reserved name)\n" if $snapname eq 'current'; + die "unable to use snapshot name 'pending' (reserved name)\n" + if lc($snapname) eq 'pending'; + my $realcmd = sub { PVE::Cluster::log_msg('info', $authuser, "snapshot VM $vmid: $snapname"); PVE::QemuConfig->snapshot_create($vmid, $snapname, $param->{vmstate}, -- 2.39.5