0

I'm evaluating the use of QEMU to create s390x Linux virtual machines for use in software builds. I've had some success creating machines using newer Linux distributions such as RHEL 8 and Ubuntu 20, but I really want a RHEL 7 machine.

I'm on Fedora 36 x86 and I've been trying the following with both the Fedora QEMU 6.2 packages and current QEMU 7.x built from source:

qemu-img create -f qcow2 rootfs.qcow2 20G

qemu-system-s390x \
  -M s390-ccw-virtio -m 4G -smp 2 -cpu max \
  -drive file=rhel-server-7.9-s390x-dvd.iso,media=cdrom,if=none,id=drive-virtio-disk1 \
  -device virtio-scsi -device scsi-cd,drive=drive-virtio-disk1,bootindex=1 \
  -drive file=rootfs.qcow2,if=none,id=drive-virtio-disk0 \
  -device virtio-blk-ccw,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2,scsi=off \
  -net nic,model=virtio,netdev=net1 -netdev user,id=net1 \
  -nographic -display none -serial mon:stdio \
  -d guest_errors \
  -kernel kernel.img -initrd initrd.img

I've tried kernel+initrd images from the DVD's images area, and also those extracted from the kernel 3.10 RPM package on the DVD. I've tried various RHEL 7.x releases, all with the same result - the emulator exits straight away with only debug output, for example:

Guest crashed on cpu 0: disabled-wait
PSW: 0x000a000000000000 0x000000008badcccc

Has anyone any advice to get RHEL 7 s390x working?

asboey
  • 1
  • 2

1 Answers1

0

It seems the answer is that it is not possible due to kernel features not in any release of RHEL7, as per comments for QEMU issue 906

I solved my issue by building under a s390x emulation running Fedora 36, using a crosstool-ng toolchain to control versions of gcc/libc/libstdc++,etc., to produce artefacts that link/run on older O/Ss.

asboey
  • 1
  • 2