- Add get_qemu_share_path() to resolve the QEMU binary realpath and
derive
a matching share directory (handles symlinks, Nix store paths,
Homebrew,
MacPorts and custom builds)
- Replace ad-hoc brew/system logic in configure_bios with resolved share
path
- Fallback to /usr/share when no qemu firmware directory is found
Improve firmware/OVMF lookup reliability for non-system QEMU
installations.
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Replace vmware-svga exclusion with explicit device regex
- Apply xres/yres only to virtio-(vga|vga-gl|gpu|gpu-pci|gpu-gl-pci),
qxl, qxl-vga and bochs-display
- Prevent passing unsupported xres/yres params to other display devices,
avoiding incorrect resolution coercion and QEMU warnings
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Add CPU_FLAG_MAP and helper functions reset_cpu_flags and add_cpu_flag
- Validate flag format, deduplicate entries and detect +/- and value
conflicts
- Replace direct CPU string concatenation in configure_cpu with
add_cpu_flag calls
- Centralise CPU flag logic to improve macOS and Windows CPU feature
selection
IMPACT: prevents duplicate or conflicting CPU flags being passed to QEMU
and
simplifies future CPU feature handling.
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Allow arch override via config (arch="${arch:-x86_64}") and set
ARCH_VM accordingly so aarch64 VMs can be selected from configs.
- Re-detect qemu-system-${ARCH_VM} after sourcing the VM config and
fail fast with a clear error if the appropriate QEMU binary is
missing (e.g. qemu-system-aarch64).
- Use virt machine for ARM64 and enable highmem when required
(MACHINE_TYPE="virt,highmem=on,pflash0=rom,pflash1=efivars").
pflash0/pflash1 reference named blockdev nodes instead of -drive if
using OVMF-style pflash on x86.
- Set CPU selection for ARM64 to "max" when available; fall back to
TCG accel when cross-arch emulation is required (ensures guests
boot on non-ARM hosts).
- Omit x86-only machine options (smm, vmport) for aarch64 builds to
avoid passing unsupported flags to QEMU.
- Add AAVMF/ARM64 firmware search paths and keep OVMF logic for
x86_64 (preserve existing secureboot behaviour for x86 guests).
- Use virtio-gpu-pci for ARM64 (no VGA/virtio-vga on ARM) and add a
ramfb device to provide an early UEFI framebuffer on ARM64 UEFI
boot.
- Use virtio-scsi for CD-ROM on ARM64 (virt has no IDE controller) and
set CD-ROM bootindex=1 so ISO boots before disk when provided.
Set disk bootindex=2 when an ISO is present so disk remains second.
- Implement EFI boot configuration for ARM64 using -blockdev with
named nodes (pflash handled via blockdev) rather than the x86
-drive/secure global approach which is SMM/x86-specific.
- Use the ARM-compatible TPM device (tpm-tis-device) for aarch64
instead of the x86 tpm-tis device where appropriate.
- Fix EFI_CODE condition bug by using -z instead of -n when checking
for empty variables (pre-existing bug surfaced while testing ARM64).
IMPACT:
- Enables running aarch64 guests with proper firmware, machine type,
devices and boot order on both native ARM hosts and non-ARM hosts
(via TCG emulation).
- Maintainers should note the different pflash/blockdev handling and
that -global secure pflash settings used for x86 must NOT be used
for ARM64 virt machines.
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Add check_macos_tsc_stability() to detect unstable TSC on Linux hosts
with
AuthenticAMD CPUs when launching macOS Ventura+ guests
- Log a clear warning to the VM log and prompt interactively to continue
or
abort to avoid guest freezes
- Abort by default in non-interactive mode to prevent unattended VM
hangs
- Add --ignore-tsc-warning to bypass the check and invoke the check
during
vm_boot so it runs early in startup
Closes#1273
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Accept hashes in the form "algo:hash" and normalise prefix to
lowercase
- Map common prefixes (md5, sha1, sha256, sha512, b2sum|blake2|blake2b)
to tools
- Warn and skip verification for unknown prefixes
- Add macOS GNU coreutils mapping for gb2sum when using b2sum
- Use printf '%s %s\n' to produce a stable "hash filename" input for
--check
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Treat HygonGenuine as AMD-compatible and check svm for AMD-style hosts
- On aarch64/arm64 hosts, skip x86-specific VT-x/SVM validation (HVF/KVM
handled by hypervisor)
- Add warning for unknown CPU vendors to aid troubleshooting
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Add check_cocoa_gl_es_support(): detect QEMU cocoa gl=es support and
look for
ANGLE/libEGL in QEMU prefix, Homebrew and DYLD paths
- Use the check in configure_display() to enable "gl=es" for cocoa when
available
and fall back to disabling GL (preserving previous stability
behaviour)
- Improve virtio GL selection: prefer virtio-gpu(-gl) /
virtio-gpu-gl-pci /
virtio-vga-gl variants when GL is enabled and QEMU exposes the device
- Remove the hard disable of GL for cocoa in display_param_check() (now
handled
by the detection function)
- Ensure user-visible display/GL/VirGL status remains printed for
diagnostics
Enables safer GL usage on macOS (covers Nix/Homebrew QEMU and ANGLE
cases);
falls back cleanly when support is absent.
Signed-off-by: Martin Wimpress <martin@wimpress.org>
Create macOS VMs with OpenCore embedded in the EFI partition of disk.qcow2
instead of using a separate OpenCore.qcow2 file. This simplifies VM management
by reducing from two disk images to one.
Implementation:
- Add create_macos_disk_with_opencore() using mtools/sgdisk for cross-platform
EFI partition creation without mounting or root privileges
- Add download_opencore() to extract OpenCore files from OSX-KVM image
- Use LC_ALL='' with mcopy to prevent FAT directory name mangling
- Adjust disk size threshold for macOS integrated mode (1GB vs 1.5MB)
Backwards compatibility:
- If OpenCore.qcow2 exists, use legacy two-disk boot method
- If mtools/sgdisk unavailable, fall back to legacy method automatically
New dependencies: mtools, gptfdisk (added to devshell.nix and package.nix)
Closes#1720
When using TCG emulation for cross-architecture VMs (e.g., x86_64 guest
on arm64 host), skip the SSE/AVX CPU feature detection since QEMU
emulates these features in software. This fixes macOS guest startup on
Apple Silicon Macs.
Fixes#1457
Nix's qemu_full bundles EDK2 firmware with different filenames than
quickemu expects. Add darwin-specific sed patterns to:
- Set SHARE_PATH to qemu_full's share directory
- Prepend correct firmware paths (edk2-x86_64-code.fd, edk2-i386-vars.fd)
to the ovmfs search array
The invtsc flag is already added by the configure_cpu_flag loop when
check_cpu_flag recognises constant_tsc as equivalent to invtsc on AMD.
Adding it again in the AMD-specific TSC block caused duplication.
Only +tsc and +tsc-deadline are needed as additional flags.
The hash URL was incorrectly using 'v${RELEASE}' (e.g., 'vlatest')
instead of extracting the actual version folder from the redirect URL.
Since releases_archcraft returns 'latest', the download redirect goes
to a versioned folder like 'v25.10', but the hash file lookup used
'vlatest' which doesn't exist.
Extract the version folder from the redirect URL to construct the
correct hash file path.
- Use direct mirror URL instead of unreliable shortlink redirects
- Remove lite64 edition from Zorin 18 (now Pro-only)
- Automatically detect latest revision for each version
Fixes:
- slint: Update version from 15.0-5 to 15.0-10
- blendos: Replace dead mirror with official GitLab build server
- void: Filter out directories without standard base ISOs (fixes
20250401)
Removals:
- holoiso: Project archived Feb 2024, download server returns 404
- truenas-core: Discontinued, merged into TrueNAS Community Edition
- truenas-scale: Rebranded to TrueNAS Community Edition
- Replace mirror.bytemark.co.uk with mirrors.kernel.org in get_gentoo,
get_linuxmint and get_lmde
- Prefer kernel.org mirrors for improved availability and fresher
releases
- No change to ISO selection or hash verification logic; behaviour
unchanged
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Remove Devuan 'beowulf' from the release list
- Drop Mageia '8' from the release list
- Filter Fedora releases JSON and exclude Fedora 41 (prevent EOL
entries)
- Restrict GNOME OS parsing to stable numeric versions and keep
"nightly"
- Rationale: avoid presenting EOL or alpha/beta/rc images to users and
reduce failed downloads
Signed-off-by: Martin Wimpress <martin@wimpress.org>
Replace string concatenation with temp file approach to fix issue where
only the first distro appeared in the summary table. Writing rows to a
temp file and sorting it directly is more robust than piping concatenated
strings through sort.
- Set status to ❌ only when failed>0 and passed==0; use ⚠️ when failures
exist but some passed
- Build per-distro rows with printf to preserve newlines and avoid
trailing whitespace
- Replace heredoc cat with explicit echo lines for consistent GitHub
summary formatting
- Append sorted distro rows without extra blank lines
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Remove merge-multiple: true from actions/download-artifact step
- Use results/result-*/result.json and results/result-*/failed.txt globs
- Ensure per-distro result files and failed lists are read consistently
for summary
Signed-off-by: Martin Wimpress <martin@wimpress.org>