kubevirt: Guestless VMI fails on s390x due to IPL(Initial Program Load) requirements

Description: Guestless VMIs are created via the following function in the KubeVirt codebase: https://github.com/kubevirt/kubevirt/blob/47ac60cbb588b7721b47e200b952b7145bf573c9/tests/libvmifact/factory.go#L100

The NewGuestless() function is intended to spin up a minimal virtual machine with no disk or OS, primarily for testing purposes. This works as expected on x86_64 platforms, as QEMU can launch VMs even without a disk or boot image.

However, this approach fails on s390x. The s390x architecture requires an Initial Program Load (IPL) to boot any virtual machine—even for minimal test scenarios.

Documentation: https://www.qemu.org/docs/master/system/s390x/bootdevices.html

Observed Behavior: Attempting to create a guestless VM on s390x results in the following QEMU error:

[root@ ~]# /usr/libexec/qemu-kvm  -machine s390-ccw-virtio -display none -nographic -d int
LOADPARM=[        ]
Could not find a suitable boot device (none specified)
Failed to load OS from hard disk

The above error/panic is thrown from QEMU code at:

https://gitlab.com/qemu-project/qemu/-/blob/v8.2.0/pc-bios/s390-ccw/main.c#L290

https://gitlab.com/qemu-project/qemu/-/blob/v8.2.0/pc-bios/s390-ccw/main.c#L305

Using -no-shutdown prevents QEMU from exiting immediately, but the error remains and the VM does not boot.

Root Cause:

The s390x platform requires a valid bootloader and an IPL source in order to start any VM. Without a defined disk or boot device, the IPL process cannot begin. This differs from x86_64 behavior, where a VM can be launched without a boot image.

Since NewGuestless() does not attach a disk, kernel, or initrd, the resulting VM cannot successfully perform IPL on s390x.

From QEMU docs:

“For classical mainframe guests (i.e. LPAR or z/VM installations), you always have to explicitly specify the disk where you want to boot from (or ‘IPL’ from, in s390x-speak – IPL means ‘Initial Program Load’).”

Proposed Workaround:

As guestless VMIs are incompatible with s390x, we suggest using Alpine-based VMIs (or any minimal VMI with a valid disk and boot path) instead of the NewGuestless() implementation when running tests on s390x. We need this to enable sig-compute lane for s390x for example at : https://github.com/kubevirt/kubevirt/blob/28cb4bf47bd457a6b86ad8b47d883b66c8322cd1/tests/compute/vm_lifecycle.go#L213

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 27 (26 by maintainers)

Most upvoted comments

A related issue is tinyCore, a test image used in CDI testing. It too does not support s390x. Perhaps we could use alpine there as well, to reduce the time & energy devoted to the maintenance of various test images for different architectures. What do you think

I am still not sure why it matters for CDI. CDI doesn’t actually start a VM during its testing. We just copy the bytes and verify they match in the end. We could in theory use an ‘image’ of a bunch of random bytes and compare. We picked tinyCore because it was small, but we can pick any other image as well if that makes things easier, but I don’t see how it matters.

@ashokpariya0 I don’t really know much about how s390x guests boot, but based on the information you’ve provided I would say guestless doesn’t make sense on the architecture and using something like Alpine is the way to go.