Skip to content

feat(vagrant): build the VirtualBox aarch64 box under QEMU, the Parallels way - #377

Merged
andrewlukoshko merged 1 commit into
AlmaLinux:mainfrom
yuravk:vagrant-virtualbox-aarch64-tcg
Oct 14, 2026
Merged

andrewlukoshko merged 1 commit into
AlmaLinux:mainfrom
yuravk:vagrant-virtualbox-aarch64-tcg

Conversation

@yuravk

@yuravk yuravk commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #376

Why

VirtualBox 7.1+ runs arm64 guests on Apple Silicon Macs, but the almalinux/9 and almalinux/10 Vagrant boxes ship VirtualBox images for amd64 only (arm64 exists only for vmware_desktop and parallels). 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 a virtualbox box.

What

  • Packer: new qemu sources almalinux-9-virtualbox-aarch64, almalinux_10_vagrant_virtualbox_qemu_aarch64 and almalinux_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).
  • Guest Additions: new virtualbox_guest_arm64 role, used on aarch64 (ezamriy.vbox_guest stays for x86_64; it only runs the x86 installer). It installs the build dependencies including kernel-devel of the running kernel, runs VBoxLinuxAdditions-arm64.run, and checks that vboxguest/vboxsf were 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.
  • Box: tools/raw-to-vagrant-virtualbox.sh converts the raw disk to a streamOptimized VMDK and renders box.ovf from tpl/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 (ARMv8Virtual chipset, EFI, VirtioSCSI disk, virtio NIC on NAT, 2 vCPUs / 2048 MB), with fresh UUIDs and MAC. Like the x86_64 box it has a Vagrantfile with base_mac and metadata.json with the architecture (arm64).
  • Workflow: virtualbox-aarch64 leg of build-gh-hosted for vagrant_type ALL or vagrant_virtualbox (not for AlmaLinux 8, excluded for the -v2 variants), run_test forced off like the other QEMU-built boxes. Guest Additions 7.2.20 (the first release whose vboxsf builds on the EL10/Kitten 6.12 kernels) are downloaded from download.virtualbox.org and checked against Oracle's SHA256SUMS. In the AlmaLinux org the leg builds natively on the arm64 runners, and publish-aarch64 picks it up.
  • Resolver (virtualbox_* cases), shared-steps raw-disk validation, kickstart comments and VAGRANT_BUILD_TEST_PUBLISH.md updated.

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:

Box Run Kernel the Guest Additions 7.2.20 were built for Box size
AlmaLinux 9.8 38382539889 5.14.0-687.54.1.el9_8.aarch64 536 MB
AlmaLinux 10.2 38533104835 6.12.0-211.65.1.el10_2.aarch64 624 MB
AlmaLinux Kitten 10 38538092173 6.12.0-273.el10.aarch64 596 MB
  • vboxguest and vboxsf are built and the vboxadd services enabled in every box; vboxvideo too 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 up as an ARM VM with the expected settings (checked on an x86_64 host, where only the boot itself is impossible). No -v2 aarch64 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 ssh works, /vagrant is mounted via vboxsf (rw), with vboxguest/vboxsf loaded on 5.14.0-687.54.1.el9_8, 6.12.0-211.65.1.el10_2 and 6.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.

…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
@yuravk
yuravk requested a review from andrewlukoshko October 14, 2026 13:08
@andrewlukoshko
andrewlukoshko merged commit 98dba9c into AlmaLinux:main Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add VirtualBox aarch64 (arm64) Vagrant boxes

2 participants