Starting Codeready Container with libvirt cause "format of backing image was not specified in the image metadata" Starting Codeready Container with libvirt cause "format of backing image was not specified in the image metadata" kubernetes kubernetes

Starting Codeready Container with libvirt cause "format of backing image was not specified in the image metadata"


There is an issue with the crc_libvirt_4.5.14 image. The easiest way to fix it is to do a

qemu-img rebase -f qcow2 -F qcow2 -b /home/${USER}/.crc/cache/crc_libvirt_4.5.14/crc.qcow2 /home/${USER}/.crc/machines/crc/crc.qcow2

Now, if you try to do a crc start, you going to face a "Permission denied" error, which is related to Apparmor, unless you whitelisted your home directory. If you don't want to hack around with Apparmor settings, the /var/lib/libvirt/images supposed to be whitelisted. Move the image to there:

sudo mv /home/${USER}/.crc/machines/crc/crc.qcow2 /var/lib/libvirt/images

then edit the virtual machine settings pointing to the new image location: virsh edit crc , then replace the <source file='/home/yourusername/.crc/machines/crc/crc.qcow2'/> to <source file='/var/lib/libvirt/images/crc.qcow2'/>.

Then do the crc start and... that's it.

The relevant Github issues to follow: