Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Glance Image creation checksum logic

I tried a kind of non OpenStack thing to modify changes to glance image directly.

All I did was, I used the images of glance directly to launch VM through virt-manager of the controller node by using the existing .qcow2 images available locally within glance storage location.

I did all my changes successfully like editing some files and trigger on-boot services etc. I then shut down the VM and removed the .qcow2 from the VM of virt-manager.I was forced to do chown glance:glance <image_id> done because the image permissions changed after using it with VM of virt-manager.

Next I tried launching VM using the modified image, Checksum problem made VM to reach error state in the compute nodes.

I understand like when Image is registered to glance checksum is calculated based on the image size, so my modification through virt-manager VM has changed the image size which ultimately calculated a different checksum in my compute node while VM creation that is not the same with what is written in database while registering the image to glance.

The error logs on failed VM creation clearly gives me the checksum calculated and what was expected. Then I edited the checksum in the database and then was able to launch VM in compute nodes.

So, my question is can I create checksum for a modified glance image without have to refer to logs, if so how to do that.