Current situation
flatcar_production_qemu_uefi.sh and similar scripts fail to accurately detect hardware virtualisation on ARM64 Mac systems.
Impact
QEmu Flatcar releases run in software virtualisation mode on ARM64 Macs, i.e. very, very slow.
Ideal future situation
The QEmu wrapper script correctly detects ARM64 Macs and adds -accel hvf to the qemu command line, which will make QEmu use hardware virtualisation features.
Implementation options
- Download the latest QEmu release for ARM64 / Mac here: https://alpha.release.flatcar-linux.net/arm64-usr/current/ . More precisely, these files:
flatcar_production_qemu_uefi.sh
flatcar_production_qemu_uefi_efi_code.qcow2
flatcar_production_qemu_uefi_efi_vars.qcow2
flatcar_production_qemu_uefi_image.img
- The host detection in
flatcar_production_qemu_uefi.sh is in line 220 ff. Add a case for Mac hosts (based on the return string of the command uname -m) and set -accel hvf.
- Test your modified script on ARM64 Mac; Flatcar should boot a lot faster now!
- Add your modifications to https://github.com/flatcar/scripts/blob/main/build_library/qemu_template.sh#L239 and create a PR.
Current situation
flatcar_production_qemu_uefi.shand similar scripts fail to accurately detect hardware virtualisation on ARM64 Mac systems.Impact
QEmu Flatcar releases run in software virtualisation mode on ARM64 Macs, i.e. very, very slow.
Ideal future situation
The QEmu wrapper script correctly detects ARM64 Macs and adds
-accel hvfto the qemu command line, which will make QEmu use hardware virtualisation features.Implementation options
flatcar_production_qemu_uefi.shis in line 220 ff. Add a case for Mac hosts (based on the return string of the commanduname -m) and set-accel hvf.