[SOLVED] Unable to restore an LXC unprivileged container

hapklaar

Member
Nov 13, 2020
13
8
8
49
I had to restore my Proxmox hypervisor due to some storage corruption. I've got almost everything running again, with the exception of one LXC container. During restore I get these errors:

Code:
extracting archive '/mnt/pve/N5550/dump/vzdump-lxc-103-2020_11_07-07_08_30.tar.lzo'
tar: ./var/lib/docker/vfs/backingFsBlockDev: Cannot mknod: Operation not permitted
tar: ./var/spool/postfix/dev/random: Cannot mknod: Operation not permitted
tar: ./var/spool/postfix/dev/urandom: Cannot mknod: Operation not permitted
Total bytes read: 13224335360 (13GiB, 77MiB/s)
tar: Exiting with failure status due to previous errors
  Logical volume "vm-103-disk-0" successfully removed
  Logical volume "vm-103-disk-1" successfully removed
TASK ERROR: unable to restore CT 103 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --lzop --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' -C /var/lib/lxc/103/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2

I read that this is because these 3 devices cannot be restored or created during restore and need to be removed from the backup.

Is this correct?
If so, how can I remove them from the backup I have?
 
  • Like
Reactions: majorgear
Ok, never mind :) I was able to fix this by restoring the container as privileged, and recreating my mount_hook.sh file. After this, the container was able to start.
 
Thanks for actually mentioning how you fixed it for your case! You can mark the thread as solved by editing it (in the menu at the top right, over your initial post).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!