proxmox:guests_vms_and_containers:convert_a_privileged_lxc_container_to_unprivileged
Table of Contents
Proxmox - Guests (VMs and Containers) - Convert a Privileged LXC Container to Unprivileged
NOTE: You cannot just shut the container down, go into the GUI and mark it unprivileged.
Instead, create a backup of the container, and then make a new container from that backup unprivileged.
pct restore 1234 /var/lib/vz/dump/vzdump-lxc-5678-2021_02_03-10_11_12.tar.gz -ignore-unpack-errors 1 -unprivileged
NOTE: where
- The 1234 is the new container ID.
- The 5678 in the backup file is the old container ID.
- The restore could be set to overwrite the previous container with the restore, but it is safer to just create a new container and then shutdown the old one.
Troubleshooting Errors
If an error is seen:
400 Parameter verification failed. storage: storage 'local' does not support container directories
then storage needs to be specified.
pct restore 1234 /var/lib/vz/dump/vzdump-lxc-5678-2021_02_03-10_11_12.tar.lzo -ignore-unpack-errors 1 -unprivileged --storage local-zfs
References
proxmox/guests_vms_and_containers/convert_a_privileged_lxc_container_to_unprivileged.txt · Last modified: 2021/07/05 00:34 by peter