The image booted to OpenCore's text list. It now loads OpenCanopy with OcBinaryData's GoldenGate icons, and AudioDxe, which plays OpenCore's boot chime on the first Intel HDA controller it finds (none: no chime). The chime follows macOS's "Play sound on startup" (StartupMute). OcBinaryData has no releases, so the image takes GitHub's archive of one commit, pinned to its SHA-256 and cached like the OpenCore release; only the fonts, labels, the GoldenGate icons and the chime go in the image. --text-picker, and the form's "Graphical picker" toggle, keep the text list. Checked on QEMU (TCG, q35, OVMF): the picker draws, takes the keyboard (the VM's tablet is no pointer OpenCore reads), and an ich9-intel-hda with an hda-output codec, sharing its audiodev with usb-audio, plays the 2.5 s chime.
reims-util
reims-util gets an x86-64 macOS VM ready to boot. It makes:
- An OpenCore boot image, with the OVMF firmware to boot it, set up for a q35 VM on KVM.
- macOS installers that
reims-ctltakes as they are, from Apple and checked against Apple's own checksums and signatures:- an online installer, which installs the newest release of macOS 10.13 to 26 over the network;
- an offline installer, which installs one exact release of macOS 11 to 26 with no network at all.
Downloads pick up where they stopped when they're interrupted.
It's made for reims-vgpu's reims-ctl, and does the
job you'd otherwise use OSX-KVM or ULTMOS for. It's a single program with no other tools to
install, and it runs on Linux and macOS.
Install
You need Rust 1.98.1 or later (rustup.rs). Then:
cargo install --locked --git https://github.com/steelbrain/reims-util
Or, from a checkout, cargo install --locked --path ..
Make a VM with reims-ctl
mkdir -p ~/vms/mac && cd ~/vms/mac
reims-util opencore # OpenCore.qcow2, OVMF_CODE.fd and OVMF_VARS.fd
reims-util online-installer tahoe # macOS-Tahoe-online-installer.dmg
reims-ctl create mac --opencore OpenCore.qcow2 \
--installer macOS-Tahoe-online-installer.dmg --start
reims-ctl copies the OpenCore image into the VM, finds OVMF beside it, and takes the installer
as it is. OpenCore's picker boots "macOS Base System" after 5 seconds, and you're in macOS
Recovery: erase the VM's disk in Disk Utility, then pick Reinstall macOS, which downloads the rest
from Apple.
Use it interactively
Run reims-util with no arguments. A small interface opens at the bottom of your terminal (it
doesn't take over the screen): pick a job, fill in its form, and press Enter to start it. Esc
stops a download (press it again to leave without waiting), and starting it again picks up where
it left off. What each job wrote, or why it failed, stays in your terminal once you quit.
Use it from the command line
Everything the interface does is a command too, which is what scripts and reims-ctl use.
OpenCore and OVMF
reims-util opencore -o OpenCore.qcow2
This writes a 128 MiB disk image with OpenCore 1.0.8 on its EFI partition: qcow2 for a .qcow2
name, and a raw disk image for anything else (.img). Beside it go OVMF_CODE.fd and
OVMF_VARS.fd, with OVMF's licenses. What goes in them is downloaded from pinned sources
(OpenCore's release and a commit of its picker icons and boot chime, OcBinaryData, from GitHub;
OVMF from Arch Linux's edk2-ovmf package), checked against the hashes reims-util knows, and
cached in ~/.cache/reims-util, so it's only downloaded once.
Each image gets a Mac identity of its own: a serial number, logic board serial (MLB), system UUID
and ROM, which it prints when it's done. Keep them if you'll want the same identity in another
image (--serial, --mlb, --uuid, --rom). The model is an iMac20,1 unless you ask for
another with --model:
| Model | Runs |
|---|---|
| iMac20,1 | macOS 10.15.6 to 26 |
| iMacPro1,1 | macOS 10.13 to 15 |
What's in the image, and why:
- No kexts. QEMU's
isa-applesmcis the SMC, and the GPU is reims-vgpu's, which macOS drives with its own driver. - The drivers a VM boots with: OpenRuntime, OpenHfsPlus (recovery images and installers are HFS+), OpenPartitionDxe (for older recovery images) and ResetNvramEntry.
- The graphical picker, OpenCanopy, with the GoldenGate icons. Pick with the arrow keys, Tab
and Enter; it has no mouse pointer in a VM.
--text-pickergives OpenCore's text list instead. - The boot chime, which plays on the VM's Intel HD Audio controller when it has one (QEMU's
ich9-intel-hdawith anhda-outputcodec). Turning off "Play sound on startup" in macOS's Sound settings silences it. - One ACPI table, with the
ECandUSBXdevices macOS looks for. - The CPU reported as a Skylake-SP, which every macOS from 10.13 to 26 knows, whatever CPU
model the VM has.
--no-cpuid-spoofturns that off. - macOS doesn't see it runs in a VM, so iCloud and the App Store let you sign in.
--show-vmturns that off. - System Integrity Protection on, as on a real Mac.
--disable-sipturns it off.
--timeout sets how long the picker waits (0 waits for you), --boot-args the kernel's boot
arguments, and --verbose-boot shows the kernel's messages while it boots.
reims-util opencore --help lists the rest.
Online installers
reims-util online-installer list
reims-util online-installer sonoma -o ~/vms/mac
An online installer is Apple's recovery image for a macOS, as a Mac's Internet Recovery gets it:
about 1 GB, written as macOS-<name>-online-installer.dmg. A VM boots it into macOS Recovery,
whose Reinstall macOS downloads and installs the newest release of that macOS. Name a version by
name (sonoma, big-sur), number (14, 10.15) or latest. The image is checked against its
chunklist, which Apple signs, 10 MiB at a time, so what you get is byte for byte what Apple made.
Offline installers
reims-util offline-installer list
reims-util offline-installer 26.6.2 -o ~/vms/mac
Recovery always installs the newest release of its macOS, downloaded as it goes. To install a
particular one, such as 26.6.2 when 26.7.1 is out, or to install with no network, make an offline
installer: a disk image, macOS-<name>-<version>-<build>-offline-installer.img, of 13 to 20 GB.
It holds the recovery image of that macOS, which OpenCore boots as it would from a USB stick, and
Apple's full installer for that release, with a script that installs it.
offline-installer list shows the releases Apple's software update catalog has for Intel Macs;
macOS 27 runs on Apple silicon only, so it isn't there. Name one by version (26.6.2, or 26 for
the newest 26), build (25G83), name (tahoe, for the newest Tahoe), Apple's product ID
(140-93587) or latest. Both of its files are downloaded straight into their places in the
image, each checked against Apple's chunklist for it, so the installer, up to 18 GB, is never on
your disk twice.
reims-ctl create mac --opencore OpenCore.qcow2 \
--installer macOS-Tahoe-26.6.2-25G83-offline-installer.img --start
reims-ctl uses the image where it is, read-only, so it isn't copied again. Once you're in Recovery:
-
Open Disk Utility and erase the VM's disk as APFS. You can leave its name as it is.
-
Quit Disk Utility, open Utilities > Terminal, and run:
sh /Volumes/Installer/install-macos.sh
The script puts "Install macOS ….app" on the disk you erased and starts it; the VM restarts into the installer, and goes on from there as any macOS install does.
Interrupted downloads
An installer is written as a .part file next to where it ends up. If it stops, whether you
pressed Ctrl-C, the network dropped or the machine went to sleep, run the same command again:
what's there is checked against Apple's chunklists and the download continues from there. An
installer that's already complete and checks out isn't downloaded again, and one that doesn't is
repaired. An offline installer whose recovery image Apple has since replaced is left as it is: it
still boots, and a VM may be using it.
For scripts
--json prints progress and the result as JSON lines on stdout. The last line is either
{"event":"done","result":{…}}, with what was written (and for opencore, the identity it
made) or, for list, the versions, or {"event":"error","message":"…"}.
reims-util --json online-installer tahoe -o ~/vms/mac
License
reims-util is licensed under GPL-2.0-or-later OR LGPL-3.0-or-later; see LICENSE. The serial number tables come from OpenCorePkg's macserial, under its BSD-3-Clause license. OpenCore, its picker icons and chime (OcBinaryData) and OVMF, which reims-util downloads, keep their own licenses.