hashicorp / packer-plugin-qemu

Packer plugin for QEMU Builder
https://www.packer.io/docs/builders/qemu
Mozilla Public License 2.0
61 stars 44 forks source link

Use serial for boot command #163

Open retpolanne opened 10 months ago

retpolanne commented 10 months ago

Description

I'm testing Flatcar Container Linux on Packer, running on qemu-system-aarch64, and the virt machine doesn't seem to support graphics out of the box - having to use virtio-gpu-pci, but still flatcar's qemu image doesn't have virtio gpu support. So, my last resort would be to, instead of using VNC to send commands to the VM, Packer could send them through UART.

Packer could allow sending boot commands through UART instead of VNC.

Potential References

https://qemu-discuss.nongnu.narkive.com/JazHBkGF/vnc-access-in-qemu-system-aarch64-binary

LIV2 commented 7 months ago

I am using this with qemu-system-aarch64 with no problems I think the key is that I added the following to my source (and have no video devices added):

    qemuargs = [
        ["-monitor","none"]
    ]

This causes the VNC server to connect to the serial console rather than the monitor