[pve-devel] [PATCH container] api: clone_vm: don't include 'parent' property in clones

Oguz Bektas o.bektas at proxmox.com
Tue Oct 12 15:32:36 CEST 2021


apparently this caused a weird[0] bug... when a container with a
snapshot 'foo' was cloned, it would take 'parent: foo' from the original
container. when you add a new snapshot 'bar' to the cloned container,
and then another one 'foo', this causes the snapshots to become parents
of each other (thus not parsed correctly in the tree view of GUI nor
with 'pct listsnapshot CTID')

[0]: https://forum.proxmox.com/threads/snapshots-of-one-lxc-disappeared.97711/

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 src/PVE/API2/LXC.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 1f2f1f0..15a1926 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1515,6 +1515,7 @@ __PACKAGE__->register_method({
 	    delete $newconf->{snapshots};
 	    delete $newconf->{pending};
 	    delete $newconf->{template};
+	    delete $newconf->{parent};
 	    if ($param->{hostname}) {
 		$newconf->{hostname} = $param->{hostname};
 	    }
-- 
2.30.2






More information about the pve-devel mailing list