Re:Tales from the Kernel Parameter Side
by nrclark on Saturday November 05, 2022 @05:28PM
(#33486014)
This isn't a perfect approach, but I've had pretty decent results with QEMU's virtfs for passing data into a QEMU VM (assuming your guest kernel is compiled with support for it).
QEMU's -virtfs option maps a folder on your host to a virtual filesystem. Inside your guest, you can mount the filesystem (assuming your kernel has CONFIG_NET_9P and CONFIG_NET_9P_VIRTIO enabled) and use it however you want.
Re:Tales from the Kernel Parameter Side
by anderspitman on Saturday November 05, 2022 @05:49PM
(#33486218)
Unfortunately I need to support Windows hosts. I believe there's a patch in the works to add support, but it hasn't landed yet.
Re:Tales from the Kernel Parameter Side
by bombela on Saturday November 05, 2022 @05:53PM
(#33486259)
Update the grub config directly. You can probably mount /boot from the outside?
Re:Tales from the Kernel Parameter Side
by 10000truths on Sunday November 06, 2022 @01:18AM
(#33489727)
You can hook up the virtual serial port to stdin/stdout of the host by passing `-serial stdio` or `-nographic` in the QEMU args. You can then read from/write to the serial port in the VM.
[0]: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-f...