[PVE-User] converting privileged CT to unprivileged

nada at verdnatura.es nada at verdnatura.es
Fri Aug 2 13:36:35 CEST 2019


hi Adam
look at proxmox node and what do you have at
ls -la /etc/pve/lxc/
ls -la /var/lock/lxc/

before restore there should be NO relevant CT config or lock file
just do yourself some test and look at that paths after each step
* create new privileged CT
* backup privileged CT
* destroy privileged CT
* restore CT from backup to UNprivileged
* start UNprivileged CT
have a nice weekend
Nada

El 2019-08-01 16:59, Adam Weremczuk escribió:
> I've found config file in the archive under etc/vzdump/pct.conf and it
> looks ok at first glance.
> 
> Still getting an error on restore:
> unable to restore CT 100 - ERROR: archive contains no configuration 
> file
> 
> Rerunning the restore has also deleted recently re-crafted by hand
> /etc/pve/nodes/node1/lxc/100.conf :(
> 
> 
> On 01/08/19 15:45, Adam Weremczuk wrote:
>> Hi all,
>> 
>> The urandom/random problem solved itself on decompressing:
>> 
>> sudo lzop -d -c vzdump-lxc-100-2019_07_31-16_15_48.tar.lzo | tar xvf - 
>> > /var/tmp/lxc-100.log
>> tar: ./var/spool/postfix/dev/urandom: Cannot mknod: Operation not 
>> permitted
>> tar: ./var/spool/postfix/dev/random: Cannot mknod: Operation not 
>> permitted
>> tar: Exiting with failure status due to previous errors
>> 
>> I'm now facing a different problem. 100.conf file has vanished even 
>> though I can't recall invoking deletion form either GUI or shell:
>> 
>> pct restore 100 
>> /var/lib/vz/dump/vzdump-lxc-100-2019_07_31-16_15_49.tar.lzo 
>> -ignore-unpack-errors 1 -unprivileged -force -storage my-zfs-pool
>> unable to restore CT 100 - ERROR: archive contains no configuration 
>> file
>> 
>> I think I can fairly easily recover by making a config copy of a 
>> similar CT and editing it by hand.
>> 
>> What's the best way of determining the right MAC address to use 
>> (hwaddr=...)?
>> I'm pretty sure all ARP caches have flushed this entry by now.
>> Any chance this info is still stored somewhere?
>> Create a new dummy CT and use that MAC address?
>> 
>> Thanks,
>> Adam
>> 
>> 
>> On 31/07/19 16:39, Gilberto Nunes wrote:
>>> You can uncompress the backup for any other directory, delete urandom
>>> and random and then, compress again the whole directory...
>>> Then try restore into PVE again.
>>> 
>>> ---
>>> Gilberto Nunes Ferreira
>>> 
>>> (47) 3025-5907
>>> (47) 99676-7530 - Whatsapp / Telegram
>>> 
>>> Skype: gilberto.nunes36
>>> 
>>> 
>>> 
>>> 
>>> Em qua, 31 de jul de 2019 às 12:37, Adam Weremczuk
>>> <adamw at matrixscience.com> escreveu:
>>>> 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
>>> _______________________________________________
>>> pve-user mailing list
>>> pve-user at pve.proxmox.com
>>> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>> 
>> _______________________________________________
>> pve-user mailing list
>> pve-user at pve.proxmox.com
>> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
> 
> _______________________________________________
> 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