LXC container lost after restore from chroot to thin pool

ned

Renowned Member
Jan 26, 2015
113
2
83
When I want to restore a vzdump file created from a lxc backup chroot setup that is disk size 0 I get this error

--virtualsize may not be zero.
TASK ERROR: lvcreate 'vg_pve_thin/vm-104-disk-4' error: Run `lvcreate --help' for more information.
/QUOTE]

The container 104 was destroyed but not restored from the backup.
 
I do not get your setup - how can we test this here?
 
I have two storages on the same node. The first one is local and the second one is a lvm thin pool. I created a chroot container on local storage and did a backup of that container. I also created a second container on second storage which is a thin pool ct. The problem occured when I selected dump of the container that was created on local storage to be restored to the thin pool CT which is on the second storage. The problem here is that proxmox gui deletes the current thin pool CT and than displays the error which says the restore is not possible as thin pool does not support 0 size pools.
 
1. create 100 lxc ct on local storage which is directory type storage located on the root partition inside /var/lib/vz
2. create a backup of the 100 ct to /var/lib/vz/dump/vzdump-lxc-100-2016_05_17-23_17_49.tar.lzo
3. remove 100 ct
4. restore 100 ct as chroot directory type cr with option --rootfs local:0 with command
Code:
pct restore 100 /var/lib/vz/dump/vzdump-lxc-100-2016_05_17-23_17_49.tar.lzo --rootfs local:0
5. after the ct is created and with pct restore command make a backup of the ct via gui which will be the second dump od ct 101
6. create a new CT on second storage which is the thin pool ct 101
7. stop 101 ct, go to backup tab, select second dump of 100 ct and restore to 101 ct on thin pool storage

you will get the error
 
"pct restore" tries to create a rootfs using the size given in the backed up config file (0 in this case). it is currently only possible to override this on the commandline (e.g., by using "pct restore .... --rootfs STORAGE:SIZE" with STORAGE and SIZE appropriately replaced).