feat: add host and VM architecture; host is hard coded to x86_64

This commit is contained in:
Martin Wimpress 2024-05-15 11:17:45 +01:00 committed by Martin Wimpress
parent cefa2556f3
commit 83c16dad2c
1 changed files with 4 additions and 2 deletions

View File

@ -1814,10 +1814,12 @@ readonly DISK_MIN_SIZE=$((197632 * 8))
readonly VERSION="4.9.5"
# TODO: Make this run the native architecture binary
QEMU=$(command -v qemu-system-x86_64)
ARCH_VM="x86_64"
ARCH_HOST=$(uname -m)
QEMU=$(command -v qemu-system-${ARCH_VM})
QEMU_IMG=$(command -v qemu-img)
if [ ! -x "${QEMU}" ] || [ ! -x "${QEMU_IMG}" ]; then
echo "ERROR! QEMU not found. Please make sure 'qemu-system-x86_64' and 'qemu-img' are installed."
echo "ERROR! QEMU not found. Please make sure 'qemu-system-${ARCH_VM}' and 'qemu-img' are installed."
exit 1
fi