Converting privileged to unprivileged and my CT gone

vacar84

Member
Feb 23, 2021
18
1
8
40
Hello everybody

I was going through the process of converting a CT from a privileged status to unprivileged and this is what I've done:
  1. Stopped the CT
  2. Backed it up in STOP mode
  3. Started to recover it in unprivileged mode
  4. Got the warning message saying the CT data will be destroyed
  5. Restore process ended up with an error and my CT is now gone !!!!
How is this possible? I mean, error apart, is it normal that if a restore process fails the CT is removed? If that's the case, that is unbelievably dangerous.. Except if I made some mistakes..

This is the output of the process:
Code:
recovering backed-up configuration from 'local:backup/vzdump-lxc-101-2021_03_07-12_04_06.tar.zst'
  Logical volume "vm-101-disk-1" created.
Creating filesystem with 6553600 4k blocks and 1638400 inodes
Filesystem UUID: 8a0bfd7d-d4c5-4e39-8c82-a3a3d3b85d6d
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
  Logical volume "vm-101-disk-0" successfully removed
restoring 'local:backup/vzdump-lxc-101-2021_03_07-12_04_06.tar.zst' now..
extracting archive '/var/lib/vz/dump/vzdump-lxc-101-2021_03_07-12_04_06.tar.zst'
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: 5633310720 (5.3GiB, 57MiB/s)
tar: Exiting with failure status due to previous errors
  Logical volume "vm-101-disk-1" successfully removed
TASK ERROR: unable to restore CT 101 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --zstd --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/101/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2

Any idea ?
 
Last edited:
Restore it as privileged and you'll have you CT back in working order. Converting between privileged and unprivileged usually does not work, in my experience.
EDIT: If the CT is gone: look at the Contents of the Storage that you used for the backup to find and restore the backup. This way, you can restore any backup with a new number/ID and without overwriting existing CTs.
 
Last edited:
  • Like
Reactions: vacar84
Restore it as privileged and you'll have you CT back in working order. Converting between privileged and unprivileged usually does not work, in my experience.
EDIT: If the CT is gone: look at the Contents of the Storage that you used for the backup to find and restore the backup. This way, you can restore any backup with a new number/ID and without overwriting existing CTs.
ok then I made definitively something wrong.. didn't think about not overwriting the existing CT.. However, I was able to quickly restore it from a backup I made from the pbs, so that part is ok now. You would suggest to re-create the CT from scratch as unprivileged? Or is there a safer and quicker way to do it ?
 

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!