Repository navigation
feat(vagrant): build the VirtualBox aarch64 box under QEMU, the Parallels way - #377
Merged
andrewlukoshko merged 1 commit intoOct 14, 2026
Merged
Conversation
…lels way VirtualBox 7.1+ runs arm64 guests on Apple silicon Macs, but the almalinux/9 and almalinux/10 boxes ship VirtualBox images for amd64 only (AlmaLinux#376). No runner can run VirtualBox ARM guests, so build the box like the Parallels aarch64 one: install and provision under QEMU (natively on the org's arm64 runner, under TCG elsewhere) and pack the raw disk into a virtualbox box. - qemu sources almalinux-9-virtualbox-aarch64, almalinux_10_vagrant_virtualbox_qemu_aarch64 and almalinux_kitten_10_vagrant_virtualbox_qemu_aarch64 (virtio-scsi), provisioned as a VirtualBox box (packer_provider=virtualbox-iso) with the Guest Additions ISO uploaded by Packer - virtualbox_guest_arm64 role: installs the Guest Additions with the arm64 installer (VBoxLinuxAdditions-arm64.run; ezamriy.vbox_guest runs the x86 one only) and checks the built vboxguest/vboxsf modules, since the installer cannot start its services under QEMU - tools/raw-to-vagrant-virtualbox.sh: streamOptimized VMDK and box.ovf from tpl/vagrant/virtualbox/box-aarch64.ovf, exported by VirtualBox 7.2 from an ARM VM of its defaults for Red Hat 9.x/10.x ARM 64-bit (ARMv8Virtual, EFI, VirtioSCSI disk, virtio NIC on NAT, 2 vCPUs / 2048 MB), with fresh UUIDs and MAC, a Vagrantfile with the base MAC, and arm64 metadata - workflow: virtualbox-aarch64 leg of build-gh-hosted for vagrant_type ALL or vagrant_virtualbox (not for AlmaLinux 8 or the -v2 variants), run_test forced off, Guest Additions 7.2.20 ISO downloaded and checked against Oracle's SHA256SUMS
andrewlukoshko
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #376
Why
VirtualBox 7.1+ runs arm64 guests on Apple Silicon Macs, but the
almalinux/9andalmalinux/10Vagrant boxes ship VirtualBox images for amd64 only (arm64 exists only forvmware_desktopandparallels). No runner can run VirtualBox ARM guests, so the box is built the way the Parallels aarch64 box is (#370): installed and provisioned under QEMU, then packed into avirtualboxbox.What
almalinux-9-virtualbox-aarch64,almalinux_10_vagrant_virtualbox_qemu_aarch64andalmalinux_kitten_10_vagrant_virtualbox_qemu_aarch64(virtio-scsi, copies of the Parallels ones). Packer uploads the Guest Additions ISO (virtualbox_guest_additions_iso_aarch64) and provisions the guest as a VirtualBox box (packer_provider=virtualbox-iso).virtualbox_guest_arm64role, used on aarch64 (ezamriy.vbox_gueststays for x86_64; it only runs the x86 installer). It installs the build dependencies includingkernel-develof the running kernel, runsVBoxLinuxAdditions-arm64.run, and checks thatvboxguest/vboxsfwere built - under QEMU the installer builds the modules but cannot start its services, so its exit code is not used. Build dependencies and installer logs are removed afterwards.tools/raw-to-vagrant-virtualbox.shconverts the raw disk to a streamOptimized VMDK and rendersbox.ovffromtpl/vagrant/virtualbox/box-aarch64.ovf- exported by VirtualBox 7.2 itself from an ARM VM of its defaults for Red Hat 9.x/10.x ARM 64-bit (ARMv8Virtualchipset, EFI, VirtioSCSI disk, virtio NIC on NAT, 2 vCPUs / 2048 MB), with fresh UUIDs and MAC. Like the x86_64 box it has aVagrantfilewithbase_macandmetadata.jsonwith the architecture (arm64).virtualbox-aarch64leg ofbuild-gh-hostedforvagrant_typeALLorvagrant_virtualbox(not for AlmaLinux 8, excluded for the-v2variants),run_testforced off like the other QEMU-built boxes. Guest Additions 7.2.20 (the first release whosevboxsfbuilds on the EL10/Kitten 6.12 kernels) are downloaded from download.virtualbox.org and checked against Oracle'sSHA256SUMS. In the AlmaLinux org the leg builds natively on the arm64 runners, andpublish-aarch64picks it up.virtualbox_*cases), shared-steps raw-disk validation, kickstart comments andVAGRANT_BUILD_TEST_PUBLISH.mdupdated.Testing
All three boxes built in ci-dev from this commit; the aarch64 legs run natively on the arm64 runners (~18-23 min), and the x86_64 VirtualBox legs of the same runs are unaffected:
5.14.0-687.54.1.el9_8.aarch646.12.0-211.65.1.el10_2.aarch646.12.0-273.el10.aarch64vboxguestandvboxsfare built and thevboxaddservices enabled in every box;vboxvideotoo on 9 and 10 (the installer skips it on the Kitten kernel - not needed by a headless box). Offline validation passed for all three.Each box imports into VirtualBox 7.2.16 and through
vagrant upas an ARM VM with the expected settings (checked on an x86_64 host, where only the boot itself is impossible). No-v2aarch64 leg is created.Verified on Apple Silicon by the reporter (add VirtualBox aarch64 (arm64) Vagrant boxes #376) for all three boxes: macOS 26.6.2, VirtualBox 7.2.20, Vagrant 2.4.9 - each boots,
vagrant sshworks,/vagrantis mounted viavboxsf(rw), withvboxguest/vboxsfloaded on5.14.0-687.54.1.el9_8,6.12.0-211.65.1.el10_2and6.12.0-273.el10.packer fmt/packer validate(all three sources), shellcheck, YAML parse.The box's OVF uses VirtualBox 7.2's settings format (
1.20); import into VirtualBox 7.1 is untested.