[pve-devel] [PATCH container 4/6] clone_vm: move linked clone check in eval
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Jun 18 14:51:21 CEST 2021
so that the source config is properly cleaned up/unlocked
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
src/PVE/API2/LXC.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 1554ef2..5406923 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1404,9 +1404,11 @@ __PACKAGE__->register_method({
if (!defined($full)) {
$full = !PVE::LXC::Config->is_template($src_conf);
}
- die "parameter 'storage' not allowed for linked clones\n" if defined($storage) && !$full;
eval {
+ die "parameter 'storage' not allowed for linked clones\n"
+ if defined($storage) && !$full;
+
die "snapshot '$snapname' does not exist\n"
if $snapname && !defined($src_conf->{snapshots}->{$snapname});
--
2.30.2
More information about the pve-devel
mailing list