Problem
VM creation fails and the instance moves to ERROR state. The compute logs indicate that the image conversion from QCOW2 to RAW fails with corruption errors.
Environment
- Compoent: Image service
- Private Cloud Director Virtualization - v2025.4 and Higher
- Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
Cause
The base QCOW2 image used for VM creation is corrupted.
During the instance build, Compute (Nova) attempts to fetch and convert the image from QCOW2 → RAW using qemu-img. The conversion fails because the cached image file has metadata corruption, resulting in alignment errors and I/O read failures.
This typically happens due to:
- Partial/incomplete image upload to Glance
- Interrupted image transfer during caching to the compute node
- Filesystem or disk I/O issues on the compute node
- Corrupted original image source
Diagnostics
Instance failure details:
$ openstack server show <VM_ID>nova.exception.ImageUnacceptable:Image [IMAGE_ID] is unacceptable:Unable to convert image to raw:qcow2: Image is corrupt: L2 table offset ... unaligned;qemu-img: error while reading block status: Input/output error.Command: qemu-img convert -t none -O raw -f qcow2/opt/data/instances/_base/[IMAGE_HASH].part/opt/data/instances/_base/[IMAGE_HASH].convertedExit code: 1Stderr: 'qcow2: Image is corrupt... Input/output error'Check image health manually
$ sudo qemu-img check /var/lib/glance/images/<IMAGE_ID>If corruption is present, it will show output similar to:
Image is corrupt: L2 table offset ... unalignedError while reading block status: Input/output errorCheck corrupted cached image on compute
$ sudo ls -l /opt/data/instances/_base/<IMAGE_HASH>*The .part or .converted files may indicate an incomplete download or a failed conversion.
Resolution
- Obtain a clean and verified copy of the original QCOW2 image.
- Delete the corrupted image from Glance:
$ openstack image delete <IMAGE_ID>- Re-upload the image:
$ openstack image create <IMAGE_NAME> \ --disk-format qcow2 --container-format bare \ --file <PATH_TO_CLEAN_IMAGE>- Remove corrupted cached image files from the compute node(s):
$ sudo rm -f /opt/data/instances/_base/<BASE_HASH>.*- Recreate the VM using the newly uploaded image.
Validation
- Verify that the image now passes integrity checks:
$ sudo qemu-img check /var/lib/glance/images/<NEW_IMAGE_ID>- Boot a test instance:
$ openstack server create --flavor <FLAVOR> \ --image <NEW_IMAGE_ID> --network <NETWORK> <NEW_VM_NAME>- Confirm the instance transitions successfully to
ACTIVE
Additional Information
Nova uses a caching mechanism on each compute node: Images are stored under
/opt/data/instances/_base/and reused for performance. If the cached file is corrupted, every VM creation using that image will fail on that compute node until the cache is cleared.QCOW2 image corruption may not always be visible immediately when uploading to Image Service.
qemu-img checkis the most reliable method to validate image health.If multiple compute nodes show failures, it is recommended to:
- Validate the image directly
- Clear cached base images on all compute nodes where the VM build previously failed
Image backend corruption can also cause similar issues. If using filesystem/RBD/NFS, ensure backend health and confirm storage logs for I/O errors.
To avoid corrupted uploads, it is best practice to generate and verify checksums (e.g., SHA256) for every image before and after uploading to Image Service.