Convert LXC containers between privileged and unprivileged modes in Proxmox VE. Automates vzdump backup, container restore, and privilege switch with interactive selection.
- Interactive menu for container and storage selection.
- Validates new container ID against all cluster VMs and LXCs.
- Automatic vzdump backup and restore / PBS backup and restore.
- Detects and switches privilege mode from unprivileged to privileged and vice versa.
- Handles Proxmox Backup Server (PBS) and local backup storage for the conversions temporary files.
- Optional shutdown/start logic for containers, including force kill.
- Prompts for cleanup of backup files after conversion.
- Root check, strict error handling.
- Proxmox VE with root access
- Sufficient storage for local vzdump / Proxmox Backup Server
- LXC containers set up
# The boring way:
git clone https://github.com/onethree7/proxmox-lxc-privilege-converter
cd proxmox-lxc-privilege-converter
chmod +x lxc_privilege_converter.sh
./lxc_privilege_converter.sh
# Quickstart:
bash <(curl -L https://github.com/onethree7/proxmox-lxc-privilege-converter/raw/main/lxc_privilege_converter.sh)
- Follow the menu to select container, backup storage, target storage, and new ID.
- Script will handle all steps and print a summary at the end.
- Proxmox Backup Server(PBS) is supported, but due to PBS/Proxmox limitations restoring to unprivileged can fail if config has device or cgroup binds.
- Local Backupstorage is recommended in most cases and works best.
- Banner
- Root check
- Select source container
- Select backup storage (Temp File)
- Perform vzdump/PBS backup -> backup storage
- Select target storage
- Select or confirm new container ID (validated)
- Restore with updated privilege state -> target storage
- Optionally shutdown/start containers (with force kill option/3min)
- Optionally delete backup (only local vzdumps)
- Shows a summary
See CHANGELOG.md for version info.
GPL-3.0
Florian Kefferpuetz
haemka, ebertland
No relation to Proxmox Server Solutions GmbH.
Proxmox team, Community Scripts and tteck (RIP 11/2024), see: https://github.com/tteck/Proxmox & https://community-scripts.github.io/ProxmoxVE/ Please let me know with an Issue report if you find bugs or have a feature request.