Skip to content

fix(ci): declare the disk format in the CloudHypervisor domain XML - #450

Merged
toanju merged 1 commit into
mainfrom
fix/chv-image-type
Dec 2, 2026
Merged

toanju merged 1 commit into
mainfrom
fix/chv-image-type

Conversation

@fwiesel

@fwiesel fwiesel commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Cloud Hypervisor v54 (rolled into the today apt suite on Dec 2 as cloud-hypervisor-gl 54.0+261201-1gl0) removed disk image type autodetection: image_type must now be sent with every disk, and it must match the image format.

The libvirt ch driver (libvirt-daemon-driver-ch-gl) only includes image_type in the vm.create/disk JSON when the domain XML declares the format via <driver type='...'/>. Without it, vm.create is accepted (204) but the first vm-add-net request fails full config validation:

error: Failed to start domain 'VM-CHV'
error: internal error: Failed while adding guest interfaces
["Error from API","The network device could not be added to the VM","Failed to validate config","Image type required for disk"]

This broke Test PR image / test → Test CloudHypervisor on every PR and nightly against main since the suite roll (e.g. #449, nightly run 46822972385); PRs built before Dec 1 still had cloud-hypervisor-gl 52.1, which accepted autodetection.

Fix: declare <driver type='raw'/> on both disks in the CHV migration domain XML, matching what qemu.xml already does. The guest disk (cirros.raw, converted with qemu-img convert -O raw) and the cloud-init seed (genisoimage ISO9660, no container format) are both raw images.

cloud-hypervisor 54 removed disk image type autodetection: image_type
must now be sent with every disk. libvirt's ch driver only includes
image_type in the API request when the domain XML declares the format
via <driver type='...'>; without it cloud-hypervisor rejects the domain
with "Image type required for disk" once the first interface is added.

Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
@fwiesel
fwiesel requested review from a team as code owners December 2, 2026 09:45
@toanju
toanju merged commit e00f796 into main Dec 2, 2026
30 checks passed
@toanju
toanju deleted the fix/chv-image-type branch December 2, 2026 12:55
fwiesel added a commit that referenced this pull request Dec 2, 2026
cloud-hypervisor 54 removed disk image type autodetection: image_type
must now be sent with every disk. libvirt's ch driver only includes
image_type in the API request when the domain XML declares the format
via <driver type='...'>; without it cloud-hypervisor rejects the domain
with "Image type required for disk" once the first interface is added.

Backport of the same change as #450, adjusted to this branch's test
action layout.

Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
toanju added a commit that referenced this pull request Dec 2, 2026
) (#452)

cloud-hypervisor 54 removed disk image type autodetection: image_type
must now be sent with every disk. libvirt's ch driver only includes
image_type in the API request when the domain XML declares the format
via <driver type='...'>; without it cloud-hypervisor rejects the domain
with "Image type required for disk" once the first interface is added.


(cherry picked from commit e00f796)

Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
Co-authored-by: Fabian Wiesel <fwiesel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants