Skip to content

Start virtual machines on ARM: USB controller and virtio-gpu display - #1216

Merged
calledtoconstruct merged 2 commits into
MyOwnDataCenter:mainfrom
tolixx:fix/arm-vm-usb-video
Dec 5, 2026
Merged

calledtoconstruct merged 2 commits into
MyOwnDataCenter:mainfrom
tolixx:fix/arm-vm-usb-video

Conversation

@tolixx

@tolixx tolixx commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

What this changes

Virtual machines start on ARM (Omarchy on Apple Silicon). Before this, every VM start on an M1 failed at virsh define. Follow-up to #949.

  • USB controller: the aarch64 virt machine has no USB controller of its own, so the tablet made libvirt refuse the domain with "USB is disabled for this domain, but USB devices are present in the domain XML". ARM machines now get <controller type='usb' model='qemu-xhci'/> (when they have the tablet or USB passthrough). x86 is unchanged, q35 brings its own controller.
  • virtio-gpu display: ARM machines already use virtio video, but qemu-base leaves virtio-gpu out, so libvirt said "domain configuration does not support video model 'virtio'". The installer now adds qemu-hw-display-virtio-gpu-pci and qemu-hw-display-virtio-gpu on aarch64. The base package matters: the -pci module needs it but doesn't depend on it, and with only -pci installed QEMU segfaults in device-list-properties while libvirt probes it, so no VM starts at all.

How you tested it

  • test/machines.test.mjs: the ARM test now checks the controller sits before the tablet and passes; the x86 create test checks there is no qemu-xhci. On my Mac (arm64, macOS) 55 tests in this file fail on main too, because the amd64 catalog images aren't offered on an arm64 host, so the x86 assertion needs CI. test/install-arch.test.mjs passes 3/3 on the M1 Air (Linux).
  • npm run typecheck on macOS fails on main as well (WallInk.ts vs wallInk.ts casing on a case-insensitive disk). This change doesn't touch web/.
  • Tried on a real Omarchy machine: MacBook Air M1, Omarchy 4.6.0rc3, kernel 7.3.0 aurora4, MODC 0.9.126 with this patch, edk2-aarch64 202608-1 and both virtio-gpu packages. Pressed Start on an Alpine 3.24.1 aarch64 VM from a local ISO in the web app: it boots through UEFI and GRUB to the login prompt, on the virtio-gpu screen (1280x800) and on the serial console. The generated domain has the qemu-xhci controller, virtio-gpu video and /usr/share/edk2/aarch64/QEMU_EFI.fd.

Anything to know

Existing ARM installs get the two packages the next time the installer runs, since it installs whatever is missing from the list.

Still open from #949 and not in this PR: local ISOs are listed with arch: 'amd64' (machines.mjs, localIsos), so an aarch64 ISO shows as emulated in the form even though it runs under KVM.

tolixx and others added 2 commits December 3, 2026 18:59
…u display

The aarch64 virt machine has no USB controller of its own, so the tablet
made libvirt refuse the domain ("USB is disabled for this domain"). ARM
machines now get a qemu-xhci controller.

ARM machines use virtio video, but qemu-base leaves virtio-gpu out. The
installer now adds qemu-hw-display-virtio-gpu-pci and the base
qemu-hw-display-virtio-gpu, which the -pci module needs but does not
depend on: without it QEMU crashes while libvirt probes its devices.
Co-Authored-By: Grok 4.7 <grok@x.ai>
@calledtoconstruct
calledtoconstruct merged commit d895a08 into MyOwnDataCenter:main Dec 5, 2026
1 check passed
@calledtoconstruct

Copy link
Copy Markdown
Collaborator

Thank you @tolixx. Brought this up to date with main and merged it. The M1 boot and the tests were exactly what this needed.

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.

2 participants