mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-23 01:43:39 +00:00
api: catch 'pending' as snapshot name early
instead of only at write_config time. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
15c6e277a4
commit
a85c6be13e
@ -3715,6 +3715,9 @@ __PACKAGE__->register_method({
|
|||||||
die "unable to use snapshot name 'current' (reserved name)\n"
|
die "unable to use snapshot name 'current' (reserved name)\n"
|
||||||
if $snapname eq 'current';
|
if $snapname eq 'current';
|
||||||
|
|
||||||
|
die "unable to use snapshot name 'pending' (reserved name)\n"
|
||||||
|
if lc($snapname) eq 'pending';
|
||||||
|
|
||||||
my $realcmd = sub {
|
my $realcmd = sub {
|
||||||
PVE::Cluster::log_msg('info', $authuser, "snapshot VM $vmid: $snapname");
|
PVE::Cluster::log_msg('info', $authuser, "snapshot VM $vmid: $snapname");
|
||||||
PVE::QemuConfig->snapshot_create($vmid, $snapname, $param->{vmstate},
|
PVE::QemuConfig->snapshot_create($vmid, $snapname, $param->{vmstate},
|
||||||
|
Loading…
Reference in New Issue
Block a user