[PVE-User] converting privileged CT to unprivileged

nada at verdnatura.es nada at verdnatura.es
Thu Aug 1 09:38:19 CEST 2019


hi Adam,
in general you need these steps at command line (not via webGUI)
1. stop CT
2. backup CT
3. destroy CT
4. restore with special options
5. start CT

example from our mox (version 5.3-9)
root at mox:~# pct restore 120 
/mnt/nas3/vzdump-lxc-120-2019_06_10-16_48_32.tar -ignore-unpack-errors 1 
-unprivileged -force -storage zfs
extracting archive '/mnt/nas3/vzdump-lxc-120-2019_06_10-16_48_32.tar'
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: 893132800 (852MiB, 3.9MiB/s)
tar: Exiting with failure status due to previous errors
Detected container architecture: amd64

do not worry about that errors and start your CT
Nada

El 2019-07-31 17:37, Adam Weremczuk escribió:
> Hi all,
> 
> PVE 5.4.6.
> 
> My container was created as privileged and runs on zfs pool shared by 2 
> hosts.
> 
> I've unsuccessfully tried to convert it from GUI:
> - stopped the container
> - took a backup
> - clicked "restore" ("unprivileged" ticked - default)
> 
> extracting archive 
> '/var/lib/vz/dump/vzdump-lxc-100-2019_07_31-16_15_48.tar.lzo'
> tar: ./var/spool/postfix/dev/urandom: Cannot mknod: Operation not 
> permitted
> tar: ./var/spool/postfix/dev/random: Cannot mknod: Operation not 
> permitted
> Total bytes read: 619950080 (592MiB, 42MiB/s)
> tar: Exiting with failure status due to previous errors
> TASK ERROR: unable to restore CT 100 - 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/100/rootfs --skip-old-files --anchored --exclude
> './dev/*'' failed: exit code 2
> 
> CT 100 completely disappeared from the list!
> 
> Earlier attempt from shell (105 was the first available ID):
> 
> pct restore 105
> /var/lib/vz/dump/vzdump-lxc-100-2019_07_31-16_15_48.tar.lzo
> -ignore-unpack-errors 1 -unprivileged
> 400 Parameter verification failed.
> storage: storage 'local' does not support container directories
> pct restore <vmid> <ostemplate> [OPTIONS]
> 
> Any hints?
> 
> Thanks,
> Adam
> 
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user



More information about the pve-user mailing list