]> git.proxmox.com Git - pve-container.git/commitdiff
exclude 'parent' from config when restoring
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 15 Feb 2016 14:10:56 +0000 (15:10 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 18 Feb 2016 10:51:31 +0000 (11:51 +0100)
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@proxmox.com>
src/PVE/LXC/Create.pm

index c6a1922d6e88dbd0bc4f94e7dfd41129fd565a11..ac51a7c3ba4e4a1b899810142a08aa4c9908d678 100644 (file)
@@ -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) {