tylert / packer-build

Packer Automated VM Image and Vagrant Box Builds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qemuargs build options

franc01s opened this issue · comments

How can I populate

      "qemuargs": [
        [
          "-display",
          "none"
        ]]

through variables.json as

make BUILD_OPTS='-var-file=variables.json'

Any examples will be useful

Could you use something like https://github.com/tylert/packer-build/blob/master/source/debian/10_buster/base.yaml#L116-L125 and add a new variable to the variables: section?

You might want to take a look at https://jinja2docs.readthedocs.io/ if you need more examples.

@franc01s you might also try checking the QEMU builder docs at https://www.packer.io/docs/builders/qemu.html#use_default_display. It might already give you what you need if you simply replace https://github.com/tylert/packer-build/blob/master/source/debian/10_buster/base.yaml#L152 with a new variable.

It this is something that is actively blocking you, it might benefit others as well, and I am willing to accept your pull-requests to try to help improve all these templates.

@tylert thank you a lot to clarified.
I get this working by simply change

use_default_display: true

in base.yaml