LXC disk convertion raw to qcow2 not bootable

kitsab

New Member
Sep 25, 2019
6
0
1
47
Hello community,

I'm not sure if I did something wrong during configuration, I'm not able to run a LXC container which is in qcow2 format.

I'm using Virtual Environment 6.2-4

I tried different storage solutions:
LVM, LVM-Thin, Directory, LVM-thin mounted to /var/lib/vz (local)

I restore my LXC CTs from backups and I receive vm-100-disk-0.raw.

Then I stop the LXC container and try to convert it into .qcow2 by:
qemu-img convert -f raw -O qcow2 vm-100-disk-0.raw vm-100-disk-0.qcow2
Now I can see an image in qcow2 at the same directory.
Then I'm chaning /etc/pve/lxc/100.conf line:
rootfs: A0:100/vm-100-disk-0.raw,size=4G to rootfs: A0:100/vm-100-disk-0.qcow2,size=4G

From that point on I'm stuck, the machines will not boot from .qcow2 disk image file.

Also I found move disk option described in Proxmox documentation, in the move window in the documation I can see convertion "format" field.
On my Proxmox there is no "format" field inside the "move disk".

I also tried to set my Directroy storage: pvesm set A0 --format qcow2

Thanks for help and suggestions and tips.

Kitsab
 
Hi,
using containers with qcow2-backed volumes is not supported. That's why you cannot select a format when moving the volume of a container. If you need the advantages of qcow2 consider using a virtual machine instead. Then you should also be able to see the format field in the move disk dialog.