Skip to content

[RFE] qemu wrapper script: detect and support hardware virtualisation on ARM64 MAC systems #1901

@t-lo

Description

@t-lo

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

  1. 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
    
  2. 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.
  3. Test your modified script on ARM64 Mac; Flatcar should boot a lot faster now!
  4. Add your modifications to https://github.com/flatcar/scripts/blob/main/build_library/qemu_template.sh#L239 and create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Implemented

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions