Cannot easily interact with Arch installations from remote sessions or scripts due to kernel relying on critical boot time drivers being loaded as modules
Description:
Using qemu-system-x86_64 -cpu host -nographic -serial mon:stdio -accel kvm -m 1G Arch-Linux-x86_64-basic.qcow2
results in an unusable VM. This is due to the GRUB and supplementary switched to interfaces being disconnected but still used rather than using a serial connection. This prevents VMs from being scripted or used over SSH sessions.
Additional info:
One immediate solution for my case is to change "m" to "y" at https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/blob/main/config?ref_type=heads#L10401
Another is to change the fallback kernel to use all modules as built-in instead of loadable modules.
My work is uploaded at: https://gitlab.com/anadon/getting-started-on-kernel-dev-guide-workspace/ but please note that it is known broken due to this.
VMs are being pulled from https://github.com/archlinux/arch-boxes
An example invocation which can work is:
qemu-system-x86_64 -s -cpu host -nographic -accel kvm -m 1G -kernel bzImage -append "root=/dev/sda3 rw console=ttyS0,115200n8 " $HOME/Downloads/Arch-Linux-x86_64-basic.qcow2
where "bzImage" is copied from a "/boot/vmlinuz*" to the host via guestmount
.
Steps to reproduce:
- qemu-system-x86_64 -cpu host -nographic -serial mon:stdio -accel kvm -m 1G Arch-Linux-x86_64-basic.qcow2