Skip to content

Commit 8eed15b

Browse files
committed
Update qemu args to use host cpu
Signed-off-by: Koray Oksay <koray.oksay@gmail.com>
1 parent a0b049b commit 8eed15b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/periodic-build-new-actions-vm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
unzip packer_${{ env.PACKER_VERSION }}_linux_amd64.zip
3737
sudo mv packer /usr/local/bin/
3838
rm packer_${{ env.PACKER_VERSION }}_linux_amd64.zip
39+
export PACKER_PLUGIN_PATH=/home/ubuntu/.config/packer/plugins
3940
packer plugins install github.com/hashicorp/oracle
4041
packer plugins install github.com/hashicorp/qemu
4142
packer plugins install github.com/hashicorp/azure
@@ -64,7 +65,7 @@ jobs:
6465
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
6566
run: |
6667
export PATH=$PATH:$HOME/bin && \
67-
export PACKER_PLUGIN_PATH=$HOME/.config/packer/plugins && \
68+
export PACKER_PLUGIN_PATH=/home/ubuntu/.config/packer/plugins && \
6869
cd ci/gha-runner-vm && \
6970
PACKER_LOG=1 GITHUB_PERIODIC=true go run main.go \
7071
--isoURL https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img \

ci/gha-runner-vm/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ source "qemu" "img" {
554554
efi_boot = var.architecture == "arm64" ? true : false
555555
efi_firmware_code = var.architecture == "arm64" ? "/usr/share/AAVMF/AAVMF_CODE.fd" : ""
556556
efi_firmware_vars = var.architecture == "arm64" ? "/usr/share/AAVMF/AAVMF_VARS.fd" : ""
557-
qemuargs = [["-machine", "virt"], ["-cpu", "host"], ["-accel", "kvm"]]
557+
qemuargs = var.architecture == "arm64" ? [["-machine", "virt"], ["-cpu", "host"], ["-accel", "kvm"]] : [["-cpu", "host"]]
558558
vm_name = "image.raw"
559559
cd_files = ["./cloud-init/*"]
560560
cd_label = "cidata"

0 commit comments

Comments
 (0)