Skip to content

Commit

Permalink
fix(test): only use QEMU machine q35 on x86
Browse files Browse the repository at this point in the history
The QEMU machine `q35` is only available on x86:

```
qemu-system-aarch64: unsupported machine type
Use -machine help to list supported machines
```

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
  • Loading branch information
bdrung authored and LaszloGombos committed Aug 22, 2023
1 parent fb7d5ec commit f29e428
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/run-qemu
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ QEMU_CPU="${QEMU_CPU:-max}"
exit 1
}

case "$ARCH" in
amd64 | i?86 | x86_64)
ARGS+=(-M q35)
;;
esac

# Provide rng device sourcing the hosts /dev/urandom and other standard parameters
ARGS+=(-M q35 -smp 2 -m 1024 -nodefaults -vga none -display none -no-reboot -device virtio-rng-pci)
ARGS+=(-smp 2 -m 1024 -nodefaults -vga none -display none -no-reboot -device virtio-rng-pci)

if ! [[ $* == *-daemonize* ]] && ! [[ $* == *-daemonize* ]]; then
ARGS+=(-serial stdio)
Expand Down

0 comments on commit f29e428

Please sign in to comment.