From 5bce0eb3c95f0c44044759eabd55367b45c5df8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Wed, 2 Mar 2022 21:21:09 +0100 Subject: [PATCH] Parametrized QEMU accelerator --- packer/sources.pkr.hcl | 2 +- packer/variables.pkr.hcl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packer/sources.pkr.hcl b/packer/sources.pkr.hcl index 5d9a282..cc5e325 100644 --- a/packer/sources.pkr.hcl +++ b/packer/sources.pkr.hcl @@ -49,7 +49,7 @@ source "qemu" "main" { http_directory = "./qemu/http/" output_directory = "./dist/qemu/" - accelerator = "kvm" + accelerator = var.qemu_accelerator cpus = 1 memory = 512 headless = true diff --git a/packer/variables.pkr.hcl b/packer/variables.pkr.hcl index 7fb9a84..b85b4a7 100644 --- a/packer/variables.pkr.hcl +++ b/packer/variables.pkr.hcl @@ -9,3 +9,9 @@ variable "digitalocean_api_token" { description = "DigitalOcean API token" default = "xxxx" } + +variable "qemu_accelerator" { + type = string + description = "The accelerator type to use when running the VM" + default = "kvm" +}