[pve-devel] [PATCH container] exclude 'parent' from config when restoring

Dominik Csapak d.csapak at proxmox.com
Mon Feb 15 15:10:56 CET 2016


without this, if you restore an lxc container from a backup
while it has snapshots, the parser does not understand the
'parent' option and aborts

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/LXC/Create.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index c6a1922..ac51a7c 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -203,7 +203,7 @@ sub create_rootfs {
 	PVE::LXC::destroy_lxc_container($storage_cfg, $vmid, $old_conf);
 
 	# do not copy all settings to restored container
-	foreach my $opt (qw(rootfs digest snapshots arch ostype unprivileged)) {
+	foreach my $opt (qw(rootfs digest snapshots arch ostype unprivileged parent)) {
 	    delete $old_conf->{$opt};
 	}
 	foreach my $opt (keys %$old_conf) {
-- 
2.1.4





More information about the pve-devel mailing list