The old message suggests that the container doesn't have any snapshots, which might not be true. While at it, improve the style by avoiding the multi-line post-if.
Signed-off-by: Fiona Ebner <[email protected]> --- src/PVE/API2/LXC.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 3d74f71..7841215 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -2039,9 +2039,10 @@ __PACKAGE__->register_method({ $rpcenv->check($authuser, "/storage/$sid", ['Datastore.AllocateSpace']); if ($full) { - die - "Cannot do full clones on a running container without snapshots\n" - if $running && !defined($snapname); + if ($running && !defined($snapname)) { + die "Full clone of a running container is only possible from a" + . " snapshot\n"; + } $fullclone->{$opt} = 1; } else { # not full means clone instead of copy -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
