meta data for this page
  •  

Unprivileged CT

During restore from PBS following error occurs:

Error: error extracting archive - error at entry "random": failed to create device node: Operation not permitted (os error 1)
TASK ERROR: unable to restore CT 803 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- /usr/bin/proxmox-backup-client restore '--crypt-mode=none' ct/803/2023-07-29T19:00:01Z root.pxar /var/lib/lxc/803/rootfs --allow-existing-dirs --repository backup@pbs@192.168.x.x:backup --ns company/pool' failed: exit code 255

Reason of error:

Unprivileged container cannot create device node.

Not working workaround:

Use restore command with ignore-unpack-errors argument:

pct restore 803 pbs-grunners:backup/ct/803/2023-07-29T19:00:01Z -storage nvm-grunners --unprivileged 1 --ignore-unpack-errors 1

According to:

it is not possible to restore unpriv CT from PBS. It needs to use another storage type for backups.

Working workaround

  • Restore as privileged from PBS
  • Backup to local storage
  • Restore from local storage as unprivileged and ignore-unpack-errors:
pct restore 803 /hddpool/vz/dump/vzdump-lxc-803-2023_08_01-09_44_49.tar.zst --storage nvm-dir --unprivileged 1 --ignore-unpack-errors 1