From c4ccdd16ebbc6d144060d7fe694f9592c7a7fdc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Mon, 8 Nov 2021 20:06:40 +0100 Subject: [PATCH] Updated QEMU arguments --- packer/qemu/start-vm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packer/qemu/start-vm.sh b/packer/qemu/start-vm.sh index 4124712..4d6b995 100755 --- a/packer/qemu/start-vm.sh +++ b/packer/qemu/start-vm.sh @@ -17,7 +17,7 @@ USERDATA_DISK=${TMP_DIR:?}/seed.img trap 'ret="$?"; rm -rf -- "${TMP_DIR:?}"; trap - EXIT; exit "${ret:?}"' EXIT TERM INT HUP # Create a snapshot image to preserve the original image -qemu-img create -b "${ORIGINAL_DISK:?}" -f qcow2 "${SNAPSHOT_DISK:?}" +qemu-img create -f qcow2 -b "${ORIGINAL_DISK:?}" -F qcow2 "${SNAPSHOT_DISK:?}" qemu-img resize "${SNAPSHOT_DISK:?}" +2G # Create a seed image with metadata using cloud-localds @@ -32,7 +32,7 @@ hostfwd() { printf ',hostfwd=%s::%s-:%s' "$@"; } # Launch VM qemu-system-x86_64 \ - -enable-kvm -smp 1 -m 512 \ + -accel kvm -cpu host -smp 1 -m 512 \ -nographic -serial mon:stdio \ -device e1000,netdev=n0 \ -netdev user,id=n0"$(hostfwd \