Disable QEMU SDL in Packer

Annexe

This post originally appeared on the Annexe.

Assuming your builders type is qemu, you may have seen this:

Qemu stderr: Could not initialize SDL(No available video device) - exiting

One solution in the Packer json was to disable graphics:

qemuargs: [ "-nographics" ]

Alternatively, start it headless:

"headless": "true"

If you’ve set the following, you’ll be able to VNC remotely instead. When porting back to Xen, change your /etc/ttys so you can use the serial console as well.

Author bio and support

Me!

Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person in bios. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.