This post originally appeared on the Annexe.

Building a Packer image (how’s that name for terrible Google juice):

==> qemu: Error launching VM: Qemu failed to start. Please run with logs to get more info.

So how do we run with logs? From Debugging Packer:

Packer has detailed logs which can be enabled by setting the PACKER_LOG environmental variable to any value

So in that case:

export PACKER_LOG=1

You can also define a logfile instead:

export PACKER_LOG_PATH="/var/log/packer"