scripts/install-ctl.sh installs reims-ctl into CARGO_INSTALL_ROOT's bin
where that is set, else Cargo's home's, but its closing advice, where the
user's shell does not run that reims-ctl first, always said to open a new
terminal or run . "$HOME/.cargo/env": rustup's env file for the default
Cargo home, which puts neither CARGO_INSTALL_ROOT's bin nor another
CARGO_HOME's on PATH. On Windows both the script and scripts/install.ps1
said to open a new window and run reims-ctl, which finds no reims-ctl in
CARGO_INSTALL_ROOT's bin, since rustup put only Cargo's own bin on the
user's PATH.
The advice is now the script's check_note, and says, for Cargo's home's
bin, ". "$HOME/.cargo/env"" or that CARGO_HOME's env file; for
CARGO_INSTALL_ROOT's, "DIR, CARGO_INSTALL_ROOT's bin, is not first on your
PATH, and a new terminal won't put it there: add it in your shell's
profile, as with: export PATH="DIR:$PATH"". On Windows, with
CARGO_INSTALL_ROOT set, the check line runs reims-ctl by its full path
and a warning says to add that bin to the PATH; install.ps1's last line
names the folder and says the same. Without CARGO_INSTALL_ROOT, Windows'
lines are as they were.
PR 200 builds QEMU on Windows with its usb-redir device, from MSYS2's
usbredir, and docs/qemu.md said only what the device is. It now says why it
is there: so that a program on the host speaking the usbredir protocol can
give a VM a USB device of the host's on Windows, where reims-ctl passes none
through (its USB passthrough is for VMs on Linux hosts); that reims-ctl
attaches nothing through it yet, no VM it starts having the device; and that
the install stops where the QEMU it staged lists no usb-redir. install-ctl.sh's
comments on the Windows configure line and on its MSYS2 packages say the
same. Nothing changes for the user.
PR 203 lets an x86-64 Windows PC run arm64 VMs, under TCG as on x86-64
Linux, and left README.md, docs/qemu.md, host.rs and install-ctl.sh saying
Windows runs none. They now say it runs them emulated, much slower than an
arm64 host, and that the one run so far is the PR's contributor's report:
macOS 27.2.1 (26B131) restored, finished and booted to its desktop on Windows
11, on an Intel Core i7-12700H with an RTX 3060 Laptop GPU. The lab has run
none there. README's Windows install time is marked as measured before the
install also built QEMU for arm64 VMs and reims-restore; docs/qemu.md's
Windows install lists both QEMU binaries and reims-restore; the vmapple RAM
backend on Windows gets q35's comments; and install-ctl.sh's refusal on
other hosts names Windows among the arm64 VMs' hosts.
install-ctl.sh now lists each host's QEMU targets in QEMU_TARGETS, one entry
per target, and derives the binaries and --target-list from it, so that the
arm64 VMs' aarch64-softmmu build, like the reims-restore step, can be built
apart from the x86-64 one: the configure line and binaries each host gets are
unchanged (compared on all four platforms).
(cherry picked from commit 60837a8708cecfcec8423cc29d61fdf6d465a9a6; its Windows configure line and
package list are combined with PR 203's aarch64-softmmu, gnutls and dtc.)
reims-ctl report puts vulkaninfo's whole report in a bug report's zip
(0956d83aa), but the installer installed only the Vulkan loader on Linux, so a
host without the distribution's vulkan-tools got the "vulkaninfo is not
installed" line in its place. vulkan-tools joins the apt, dnf and pacman lists,
under the same question the installer already asks before it installs the
missing packages, so a host that answers yes gets vulkaninfo with the rest.
The package has one name in every Linux family the script supports:
vulkan-tools on Debian and Ubuntu, on Fedora (where rpm -q --whatprovides
finds it by that name) and on Arch and CachyOS, so no family needs a name of
its own or a way around a missing package. Ubuntu, Fedora and Arch containers
resolved and installed it from their own repositories with the rest of their
lists, and vulkaninfo --summary ran in each. The Mac's Homebrew list and
MSYS2's are unchanged.
install-ctl.sh ran QEMU's configure with PKG_CONFIG_PATH set to the
library's pkg-config directory alone, which drops the shell's own. On a
host whose libraries pkg-config finds only through that variable (NixOS,
in a nix-shell with the build's dependencies), configure then found no
glib-2.0 and stopped. Put the library's directory first and keep the rest.
USB passthrough was refused for arm64 VMs, though nothing on a Linux host
keeps them from it: vmapple makes its own qemu-xhci with the keyboard and the
tablet, and QEMU's usb-host takes that controller's bus as it takes q35's.
An arm64 VM on a Linux host (KVM on arm64, TCG on x86-64) now takes the
devices reims-ctl usb and the interface give it, at start and while it runs.
They go on the machine's controller's bus, usb-bus.0, since the machine gives
the controller no id. On Linux its ports are raised to q35's seven with
-global, where QEMU's four put the second host device and those after it on
a full-speed hub. A Mac's command line is unchanged, and its VMs still take
no USB devices: reims-ctl lists them from sysfs alone. Its refusals now say
"USB passthrough is for VMs on Linux hosts". doctor checks usb-host and the
devices on arm64 Linux too.
The installer builds arm64 Linux's QEMU with --enable-libusb, which found
libusb by itself before, and offers the USB udev rule on every Linux host.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows, `reims-ctl update` and the TUI's Update stopped at "failed to move
...\cargo-installXXXX\reims-ctl.exe to ...\bin\reims-ctl.exe ... Access is
denied. (os error 5)": the update runs install-ctl.sh from the reims-ctl.exe it
replaces, and NTFS refuses to replace a running program's file. The update
died before __record-install, so QEMU could be built at the new commit while
the install record still named the old one.
install-ctl.sh now, on Windows only, renames reims-ctl.exe beside itself to
reims-ctl.exe.old-N before cargo install and copies it back, so cargo replaces
a copy nothing runs; and reims-util.exe likewise before __record-install,
which may install it while another reims-ctl runs it. Where the install fails
or keeps the program, the original is renamed back. reims-ctl removes the
files set aside as it starts, once nothing runs them, and the TUI reads its
restart path before the update. The update pulls the script before it runs
it, so an existing install heals on its next update.
A Windows user's update now completes, starts the new reims-ctl and records
the new commit. Linux and macOS take no new path.
On Windows, scripts/install-ctl.sh runs in MSYS2's CLANG64 login shell, whose
PATH is MSYS2's own and holds only Windows' system directories: the Git for
Windows that install.ps1 installs with winget and clones the checkout with is
not on it. MSYS2's git came only with the dependencies' install, while the
line ends' rewrite, which always runs on Windows, and --update's pull run git
before it. On a fresh MSYS2 they printed "git: command not found", and the
rewrite of the checkout's CRLF text files was skipped.
The installer now checks for git on Windows before those steps and offers to
install MSYS2's git package with pacman, as it does the other packages.
The owner asked for an environment variable that skips the installers'
checks of the host, in install-ctl.sh and in its Windows equivalent alike.
Set to 1, install-ctl.sh skips its checks of the host for the VMs it runs,
with the changes they offer to make through sudo: on Linux KVM, /dev/udmabuf
and its group, vm.max_map_count, MGLRU's min_ttl_ms, the USB udev rule and
the kvm group; on Windows the Windows Hypervisor Platform. install.ps1 skips
its step 2, the platform's check and its turning on as an administrator, and
the variable reaches install-ctl.sh in CLANG64's shell. Each script says once
what it skipped. Neither skips what the build needs or refuses: the host's
OS and architecture, the CLANG64 shell, paths with a space, the
dependencies, rustup, vendor/qemu and --skip-qemu's installed QEMU.
Unset, or anything but 1, both scripts do what they did. On a Mac the
variable changes nothing: the one check there for VMs, of the macOS release,
decides whether mesa, a dependency, is installed. Both scripts' headers
document it, and docs/qemu.md's Windows install section names it.
cargo xtask dist builds reims-vgpu-compile with reims-vgpu-c selected beside
its package, so the crates the two share resolve with the library's features
and build once, and installs it in the tree's bin on Linux, macOS and Windows.
The library starts the helper from beside the host's executable, so make qemu
copies it into build/qemu and install-ctl.sh into each QEMU install, with the
CLANG64 DLLs it loads on Windows. A QEMU without it refuses the pipelines past
rt's stage bound as before; --skip-qemu warns about such a kept install.
docs/known-issues.md and install-ctl.sh's warnings said that on a Mac with
no KosmicKrisp, macOS 15 or earlier or a mesa without the driver, VMs get no
GPU. They do not start: the library's device has no GPU device to open
(reims-vgpu's GraphicsDevice::with_platform refuses with HostResources), so
rvg_graphics_device_create refuses, and QEMU's reims-graphics-pci fails its
realize, which ends QEMU before the guest runs. reims-ctl gives every arm64
VM that device, and arm64 VMs are what a Mac runs.
The doc's heading and paragraph and the installer's two warnings now say the
VMs do not start.
On a Mac the rt platform runs on Mesa's KosmicKrisp, which the installed
QEMU loads from its lib directory, linked to Homebrew's mesa. The installer
listed molten-vk and no mesa, so after the cutover a Mac without mesa got a
QEMU with no device for the guest. It now lists mesa where the Mac runs
macOS 26 or later.
Homebrew's mesa formula builds KosmicKrisp only from macOS 26 (Tahoe) on;
before, its Vulkan drivers are swrast alone. On macOS 15 or earlier mesa is
left out, and the installer says, at its start and at its end, that VMs on
that Mac get no GPU, then installs reims-ctl and QEMU as before. Where mesa
is installed but holds no KosmicKrisp, as a bottle poured for an older
macOS, linking the driver says the same and asks for brew reinstall mesa.
molten-vk is dropped from the list: nothing of ours loads it after the
cutover. rt's floor refuses MoltenVK (rt_driver.rs), the rt platform's
window presents through rt's swapchain on the KosmicKrisp device, and
reims-ctl, QEMU and the build load no Vulkan driver themselves. Homebrew's
mesa depends on molten-vk for its zink driver, so it is installed with mesa
all the same. The README's install paragraph says KosmicKrisp in place of
MoltenVK.
The device choice now passes over a device a display's window cannot present
on, so with KosmicKrisp's manifest where Homebrew's mesa puts it the default
platform opens MoltenVK. docs/qemu.md and install-ctl.sh's comment said it
timed KosmicKrisp as the faster and took it; they now say it passes it over,
with the M3 Max boot that shows it (m3-max-57194: 16 of 16 checks, the
full-screen Metal app at 60 fps with 600 frames and none dropped), and keep
the earlier numbers as what it did before. mesa stays out of what the script
installs, as the default platform does not use it.
install-ctl.sh's comment said the default platform takes the first GPU of
its kind the loader lists. It times each GPU the loader lists and takes the
fastest (device_choice.rs), and a boot measured what that does when Homebrew's
mesa puts KosmicKrisp's manifest where the loader reads it: on the M3 Max the
default platform took KosmicKrisp, on which a display's window cannot present,
and check-boot's full-screen Metal app ran at 30 fps with dropped frames and
failed, where on MoltenVK it runs at 60 fps with none dropped.
The comment now says so, and docs/qemu.md records the boot beside the rt
build's, which passed all 16 checks on the KosmicKrisp the install links.
The rt platform loads the Vulkan loader and Mesa's KosmicKrisp only from
beside QEMU's binary or from ../lib (rt_driver.rs), and nothing put them
there: lanes linked them beside QEMU by hand.
On a Mac, install-ctl.sh now links both into the lib directory of the QEMU
it installs, and make qemu (or make vulkan-links) into build/lib, which is
../lib from build/qemu and from the arm64 build directory docs/qemu.md
configures beside it. Each link points into its Homebrew formula's opt
directory, so brew upgrade reaches it: the loader to vulkan-loader's, the
driver to mesa's. Homebrew's mesa formula is Mesa's release built unpatched
(26.3.1, the release the M3 boots on rt used), and its macOS 26 and later
bottles build KosmicKrisp, so no Mesa build of our own is needed.
Neither installs mesa: with its manifest in Homebrew's share, the system
loader lists KosmicKrisp ahead of MoltenVK (measured on the M3 Max), and the
default platform would take it in MoltenVK's place before the cutover.
Where Homebrew has no KosmicKrisp, no link to it is made and rt makes its
own instance, as before. Linux and Windows installs are unchanged: the new
code runs only where uname says Darwin.
install-ctl.sh's Fedora list was empty, so on Fedora it only warned and
printed the Ubuntu package names, and the build stopped at the first
missing header.
The list now holds Fedora's name for each Debian and Arch entry: the
compilers and QEMU's build tools, QEMU's libraries (glib, pixman, libslirp,
libfdt, PipeWire, PulseAudio, ALSA, libusb, the SPICE server, gnutls), the
Vulkan loader, SDL3's X11, Wayland, libdecor, EGL, GBM, D-Bus and udev
headers, and GTK 3. Each is checked with rpm -q --whatprovides, as some are
another package's (zlib-devel is zlib-ng-compat-devel's on Fedora 40 and
later), and the missing ones are installed with sudo dnf. The README and the
script's help name Fedora beside the others.
On x86-64 Linux, arm64 VMs run on TCG and need no KVM, yet doctor failed
"/dev/kvm" on a host whose VMs are all arm64 ones, and install-ctl.sh warned
that VMs would not start.
doctor now fails the line only where a VM this host runs needs KVM: a
registered VM whose profile runs on KVM here, or, with no VMs yet, the one a
create makes, of the host's default profile (x86-64 on x86-64 Linux, arm64 on
arm64 Linux, where every VM runs on KVM). Otherwise the line is ok and says
which VMs would need it and how to give it. install-ctl.sh's warning on
x86-64 Linux says that x86-64 VMs need KVM and arm64 VMs start without it.
What the host sees changes only in doctor's output and exit status and in
the installer's warning.
scripts/install-ctl.sh moves its install with XDG_DATA_HOME, XDG_CACHE_HOME
and CARGO_INSTALL_ROOT, and runs reims-ctl __record-install last, which wrote
install.toml in the config directory, which none of those move. An install
into a scratch prefix (a64start's m3-max-48499 on um870) therefore replaced
the user's own record with one naming the scratch QEMU build.
The record now lives in the data directory, beside the QEMU builds it names,
where reims-ctl already finds the QEMU it runs: an install into another data
directory records itself there, and update, doctor, the TUI's update and the
bug report read the record of the install whose QEMU this reims-ctl runs.
install-ctl.sh has no --prefix of its own to key a config directory to, and
its STAGE is QEMU's DESTDIR inside one install, not an install of its own.
An earlier reims-ctl's record in the config directory is still read where the
data directory has none, and an install's record replaces it, removing it,
only where it named a QEMU build of the same data directory: a scratch install
leaves it as it was.
install-ctl.sh builds QEMU's aarch64-softmmu beside x86_64-softmmu on x86-64
Linux, and alone on an arm64 Mac (with HVF, signed with its entitlement) and
on arm64 Linux (with KVM), with gnutls for vmapple's AES. It installs
reims-restore where arm64 VMs run, for finish-eacs, and reims-ctl's
__record-install downloads Ambrosia there.
On Windows install-ctl.sh's closing summary named QEMU's build in MSYS2's form,
/c/Users/me/.local/share/reims-ctl/qemu/<build>, which only MSYS2's bash
takes, while the summary sends the user to PowerShell or Windows Terminal. The
other paths its messages print (the checkout it pulls, a missing QEMU, cargo,
the library's pkg-config file, the installed reims-ctl, CARGO_TARGET_DIR) were
in the same form, and those that send the user back to the script named it by
the path reims-ctl update ran it with, C:/reims-vgpu/scripts/install-ctl.sh.
On Windows every path the script prints is now in Windows' own form
(C:\Users\me\.local\share\reims-ctl\qemu\<build>), and the messages that send
the user back to it name scripts\install.ps1, as reims-ctl's do there. macOS
and Linux print as before.
The device's video on Windows runs on libva-win32 and Mesa's VA-API driver
on Direct3D 12, vaon12, which MSYS2's CLANG64 libva and mesa packages
build. The Windows install now installs both with the other CLANG64
packages, and copies libva.dll, libva_win32.dll and vaon12_drv_video.dll,
with the CLANG64 DLLs they load, beside QEMU: the library loads them by
name when the device's video starts, so ldd of QEMU lists none of them, and
libva looks for its driver beside itself.
The two packages add at most five to an install, 172 MiB installed (17 MiB
to download): mesa, libva, spirv-tools, spirv-llvm-translator and
vulkan-loader. vaon12 itself is 11 MiB and loads only Windows' own DLLs.
A Windows user's folder can hold a space (C:\Users\First Last), and QEMU's
configure refuses a source or build directory with one ("main directory
cannot contain spaces nor colons"). With the library fixed, a user's install
would stop there next: install-ctl.sh builds QEMU in ~/.cache/reims-ctl, in
that folder. With the checkout in the folder too, as install.ps1 clones by
default, sdl3-sys stops first: it finds no SDL3, as a space splits the -L
path of the pkg-config file it reads. Both measured on the mini with a profile
named "Test User". No alias keeps the space out: meson takes realpath of its
directories, which turns an 8.3 short name back into the long one, and a volume
can have no short names (the mini's P: has none).
install.ps1 now clones into C:\reims-vgpu where the user's folder has a space,
saying so, and stops on a -Checkout with one. install-ctl.sh on Windows builds
and stages QEMU in the target directory where the cache directory has a space,
and stops before any download or build on a checkout or CARGO_TARGET_DIR with
one, naming the folder to use.
A user's install of development on Windows stopped in sdl3-sys's CMake build:
their environment's CC named Visual Studio's cl.exe, cc-rs gave the build
MSVC's C flags (and clang's C++ flags, CXX being unset), and CMake, which
reads CC itself where the cmake crate names no compiler, took cl.exe. Its test
compile failed once MSYS2 had turned /nologo into C:/msys64/nologo. Visual
Studio's install alone does not do it: cc-rs takes cl.exe from it for MSVC
targets only, and our hosts set no CC, so no run of ours met it.
install-ctl.sh on Windows now sets CC, CXX and AR, their per-target forms that
cc-rs takes first, and CMake's generator, to CLANG64's clang, clang++, llvm-ar
and MSYS Makefiles, for cargo's build scripts, CMake, QEMU's configure and
meson alike. The generator is the one the cmake crate chose with none set, and
CLANG64's ar is llvm-ar, so a host without those variables builds as before.
A checkout Git for Windows made before .gitattributes holds every text file
with CRLF line ends (its installer sets core.autocrlf=true), and git does not
write a file again where a later checkout leaves it unchanged: .gitattributes
has it compare the file as LF, so it finds nothing to do. A clone at
core.autocrlf=true moved to the commit that added .gitattributes kept all 1730
text files CRLF, and the build would have failed on the .metal sources' hashes
as before.
install-ctl.sh on Windows now writes each text file whose working copy differs
from its commit only in its line ends out again from the commit, after the
update and before any build, and keeps a file with changes of its own.
install-ctl.sh installs rustup with the x86_64-pc-windows-gnullvm host, whose
builds link with CLANG64's clang and lld, but a rustup already there builds
with its own default host. Windows' usual one, x86_64-pc-windows-msvc, builds
xtask, the build scripts, reims-ctl and reims-util for MSVC, which link only
with Visual Studio's link.exe: a host without Visual Studio's build tools
fails the install, and one with them installs MSVC binaries no install here
was checked with.
On Windows the script now runs rust-toolchain.toml's channel for the
gnullvm host (RUSTUP_TOOLCHAIN), installing that toolchain beside the user's
where it is missing, whatever rustup's default host; the default stays as
the user set it.
A cold install on the mini built QEMU and then stopped at the move of its
staged install into reims-ctl's data directory: "Permission denied", as
Windows refuses to move a folder while a file in it is open, and just after
the stage was written something held one (m3-max-36159). The same move in
the same workspace minutes later succeeded, right after running the staged
QEMU and copying a DLL in as the script does (m3-max-36188). The Windows
branch now tries the move for a minute; Linux moves once, as before.
A cold install in a new MSYS2 stopped at QEMU's configure: meson's auto
guest agent is on for a Windows host, and its build needs windmc, which no
CLANG64 package install-ctl.sh installs provides (m3-max-36094, the mini).
reims-ctl runs no guest agent, so the Windows build turns it off.
The cmake crate, which builds SDL3 for the library, chooses CMake's
generator on a GNU Windows target by looking for make, then mingw32-make, and
stops without either ("no valid generator found for GNU toolchain"): an
install into a new MSYS2 stopped there. install-ctl.sh now installs MSYS2's
make with the rest.
scripts/install-ctl.sh refused Windows, where reims-ctl runs x86-64 VMs on
WHPX. In MSYS2's CLANG64 shell it now installs CLANG64's clang, lld, QEMU's
build tools and libraries with pacman, rustup with the x86_64-pc-windows-gnullvm
host (whose builds link with that clang, so no Visual Studio is needed), and
QEMU configured for WHPX, its CLANG64 DLLs copied beside it, qemu/current a
junction, into the user's profile, where reims-ctl looks. The Linux lines
are as they were.
reims-ctl update ran `bash`, which on Windows can be WSL's: the install now
records MSYS2's bash (__record-install --shell), and update runs the script
there as a CLANG64 login shell. MSYS2's programs expand wildcards and
braces in the arguments a Windows program gives them, and reims-ctl's git
calls ("@{u}", "HEAD^{commit}") reached MSYS2's git mangled: they run with
MSYS=noglob. The host messages say x86-64 VMs run on Windows too.
On an arm64 Mac or arm64 Linux, `reims-ctl create NAME --ipsw latest|PATH`, or
the interface's form, restores macOS from an IPSW onto a new VM's disk with
reims-restore's pipeline, offline: no VM runs and none of Apple's code. The
create saves the VM in the layout Ambrosia's boot reads (disk.img, aux.img,
machine-identifier.bin, and vm.toml with the profile vmapple-arm64 and its aux
and ECID; the ECID as text, since one can pass TOML's integers). A macOS 14 VM
is named with its one step left: a boot that makes its Data volume, then
`reims-restore finish-eacs DIR`.
`latest` is the current macOS in Apple's IPSW catalog, which lists only the
current release, so another is given by its IPSW's path, as the owner chose. The
IPSW downloads into the installers directory and continues after a stop;
`reims-ctl downloads` lists and deletes what is kept, never one a VM uses or one
being downloaded. The space check covers the download and the restore together.
A failed or stopped restore leaves nothing, and its log moves to the cache,
where the error names it.
reims-ctl doesn't start arm64 VMs yet: start, describe, doctor and the USB and
GPU views say so. Windows and Linux x86-64 keep their profile; host.rs adds
vmapple-arm64 for arm64 Macs (HVF) and arm64 Linux (KVM).
On those hosts scripts/install-ctl.sh installs reims-ctl alone: the restore runs
no QEMU and reims-ctl starts no arm64 VM. A Mac needs Xcode's command line
tools; arm64 Linux a C toolchain, git and curl (apt, pacman or dnf).
docs/qemu.md says so.
An update to f378a38f8 stopped in QEMU's build on the owner's laptop:
"qemu-version.h: No such file or directory". QEMU of 2026-11-13 writes
that header at configure (configure_file) wherever `git describe --match
'v*'` fails, as it does in every shallow vendor/qemu; the QEMU before made
it with a build step. meson, configuring in place, runs `ninja -t
cleandead` after writing build.ninja, which deletes each file .ninja_log
records as built that build.ninja does not name: the header it had just
written. Every later configure in that directory deletes it again.
install-ctl.sh and `make qemu` now record the vendor/qemu commit a build
directory was configured from (qemu-source) and start the directory empty
when the commit differs; a directory without the record is started empty
once. The same commit keeps its directory, so edits not yet committed in
vendor/qemu rebuild as before.
Reproduced on ms01 (job m3-max-31803): the old QEMU's directory
configured in place for the new loses the header and the compile fails as
on the laptop, twice over; an empty directory keeps it and compiles, and
keeps it when configured again at the same commit.
install-ctl.sh installed clang and lld for the option ROM cargo xtask dist
built for apple-gfx-pci. dist builds no ROM now: reims-graphics-pci's comes
prebuilt (firmware/prebuilt). What the install builds needs neither: the
library's Linux dist links its archive with binutils's ld, nm, objcopy and
ar; SDL3 builds with CMake and the system's C compiler; metal2vulkan and
QEMU need no clang. binutils stays.
reims-vgpu no longer has apple-gfx, Apple's paravirtualized GPU, nor
vmapple's arm64 boots (owner, 2026-11-07). reims-ctl follows:
- Every VM runs reims-vgpu's own GPU device, reims-graphics-pci, or VMware
SVGA. The choice by the guest's macOS version (apple-gfx below 26.4) is
gone, with no version check in its place. Settings that name apple-gfx
read as reims-vgpu, and migration 3 makes such a VM's OpenCore image again
for the device, keeping the old one as <image>.pre-migration-3.
- apple-gfx's settings and options go: displays, HiDPI, refresh rate and
video acceleration (read past in old settings, dropped on the next save),
view --display, the video and IOSurface devices, the Metal error-mode
note, the aux trim and the emptied-entry warnings. With logs off the
library logs at warn.
- reims-ctl runs VMs on Linux x86-64 hosts alone. Mac hosts go with arm64
boots, per the owner's 11-07 ruling, and come back with the arm64 loader.
create, start, gpus and usb on a Mac say "reims-ctl runs VMs on Linux
x86-64 hosts"; vz.rs and its objc2 Virtualization dependencies go; the
crate still builds and tests on a Mac.
- scripts/install-ctl.sh refuses any host but Linux on x86-64, and builds
the library on Vulkan alone: GPU_ARM, the -vulkan builds, Homebrew and
codesigning go.
- reims-util moves to 5ca3b10, which carries Lilu alone, without
ReimsVgpu.kext: the renew warning for an image lacking it goes too.
vendor/qemu's eb36a099 removes apple-gfx (PCI and vmapple's MMIO device),
the IOSurface device, the paravirtual VideoToolbox and M2 scaler devices and
the KVM dirty source only apple-gfx gave the library. reims-graphics-pci is
QEMU's only device on the library, and calls only its rvg_graphics_device_*
functions and rvg_status_message. vmapple is no longer built: its display
was apple-gfx-mmio.
QEMU's option that finds the library is now --enable-reims-vgpu, not
--enable-pvg, upstream's name for Apple's framework, so its callers change
with it: install-ctl.sh's and the lane gate's configure lines, and make
qemu. make qemu now builds qemu-system-x86_64, the guest reims-graphics-pci
serves, configures again over a build an earlier make qemu configured for
aarch64 or with --enable-pvg, and no longer checks for ReimsVgpu.rom, the
option ROM QEMU installed for apple-gfx-pci. make vm, which booted a vmapple
guest, goes.
install-ctl.sh looked for rustup only on PATH, and stopped where it found
another cargo there. On four Linux hosts pacman's cargo-nextest had pulled in
Arch's rust, /usr/bin/cargo, and the installer, run from a shell whose PATH
lacked ~/.cargo/bin, where rustup was, stopped at "cargo is installed without
rustup" on each.
It now puts Cargo's home's bin, where rustup is there, first on its PATH, so
the build runs rustup's proxies and the toolchain rust-toolchain.toml pins,
not the other cargo's release. Where rustup is missing, it offers it beside
the other cargo, as it does where there is no Rust, and --yes installs it. The
closing check of PATH looks at the PATH it started with, which the user's
shell has, not its own.
With /sys/kernel/mm/lru_gen/min_ttl_ms above 0, the kernel kills a process
where it can't keep the pages used in the last that many milliseconds in
memory, even while RAM is free (the kernel's multigen_lru.rst, "Thrashing
prevention"), and a VM's QEMU can be the one killed. CachyOS's kernel sets it
to 100. Measured on hosts here at 100: kswapd invoked the global OOM killer
with most RAM free, killing a compiler with 19 GiB free on um870, and making 19
of a day's 22 OOM kills on ms01. An hour of builds beside a VM on um870 killed
no QEMU.
The installer and reims-ctl doctor now read the file, and above 0 they say
what it does in one line. On a terminal they offer to write 0 with sudo, and
they show the systemd-tmpfiles line that keeps it at 0 after a restart.
Without a terminal they only tell. VMs run either way, so doctor doesn't count
it as a failure.
Tested in mount namespaces on um790, where the file was a root-owned copy
holding 100 or 0: the installer without a terminal, and on one answering y and
n; then doctor the same ways. Each wrote 0 only on a y, said nothing at 0, and
left the host's own file at 100.
QEMU's configure turns SPICE on only where it finds the SPICE server's
development files, and leaves it out without a word where it does not, so a
Linux user had -spice only if those files happened to be installed when the
installer built QEMU. People reach their VMs with SPICE clients, the user who
reported the cursor bug among them, so the installer now installs the SPICE
server with the build's other dependencies (spice on Arch and CachyOS, which
brings spice-protocol; libspice-server-dev on Debian and Ubuntu, which brings
libspice-protocol-dev) and configures QEMU with --enable-spice, as it does
libusb, so that a build without it stops rather than leave it out.
With --skip-qemu and no QEMU installed, the installer warned, installed
reims-ctl, and stopped at __record-install, whose --qemu refuses the empty
path it was given: no install record, no reims-util, and an error that did
not say what to do. Every VM runs on QEMU, so --skip-qemu now ends at once
where none is installed, before it builds anything, saying to run the
installer without it.
A QEMU kept from an older checkout runs on a QEMU source and a library this
checkout may have changed since. Its build's directory names its commit, so
the installer now compares that commit's QEMU source and library inputs
with HEAD's, and warns, saying what to run, where they differ, where the
checkout lacks that commit, or where GPU_ARM picks the other arm. A change
to reims-ctl alone, which --skip-qemu is for, warns of nothing.
reims-ctl had no way to give a guest a USB device of the host's: a user wrote
usb-host into extra_args by hand. Now `reims-ctl usb NAME --add DEVICE` and
the interface's USB devices view (p on a VM: a checkbox per device, Space to
give or take back) choose them, as virt-manager, VirtualBox, GNOME Boxes and
UTM offer: a flat list of the devices plugged in, not a tree of hubs.
- A device is kept in vm.toml as a [[usb]] table by its vendor and product
IDs, which follow it to any port; one chosen beside a device with the same
IDs is kept by its port too, which tells the two apart. QEMU's usb-host
matches the same way, on the VM's xHCI controller.
- A device not plugged in when the VM starts joins the guest when it is, and
one unplugged comes back when plugged in again: QEMU looks for each
usb-host device's match every 2 s. The view and `start` say so.
- While the VM runs, a change attaches or detaches the device at once, with
QMP's device_add and device_del, and is kept for the next start.
- A VM takes four at most, what the controller's seven ports leave room for.
- QEMU opens the device's file in /dev/bus/usb, which only root may write by
default: install-ctl.sh now asks to add a udev rule giving USB devices
other than hubs to the kvm group and to the user at the screen (uaccess).
reims-ctl says what lets it open a device it can't, and doctor checks it.
- macOS hosts get none, and the interface says why: macOS gives a USB device
one of its drivers holds only to a process running as root or holding an
entitlement Apple grants VM apps, which QEMU here can't hold.
The docs are usb --help and the interface's help.
reims-ctl and the installer checked /dev/udmabuf only for AMD GPUs, and told
every host to raise vm.max_map_count by a rule of 64 mappings per MiB. But
the library's own views of the guest's memory need udmabuf on every GPU:
without it a view of an x86-64 guest's pages takes a mapping per 4 KiB page,
and an idle 3840x2160 desktop's surfaces alone (193-199 MiB, about 50k
mappings) pass the stock 65,530's budget; Safari at 4K passes even
1,048,576. On Debian 12 and Ubuntu 22.04/24.04 a user outside kvm cannot open
it, and on systemd 257+ a desktop session's access does not reach ssh.
So reims-ctl warns on every Linux host where /dev/udmabuf does not open,
naming the group that owns the node (or what to do where root alone may open
it, or the node or its module is missing), and says the group is needed over
ssh; doctor checks it too. The installer offers to add the user to that group
with sudo usermod, as it offers packages. vm.max_map_count is now only a
speed-up on NVIDIA, where udmabuf opens: a mapping per 4 KiB page past the
library's 16,384 and 8,192, past which buffers are copied. Doctor and the
installer name the value as information, by one rule, and the start no
longer warns of it. The README says the same.
Landed on development at the owner's word with no checks: reims-ctl's tests,
rustfmt and clippy, and the install and VM boot on each Linux host that
AGENTS.md asks of install-ctl.sh, were not run.
vmapple's AES engine runs the guest's commands on QEMU's ciphers, and QEMU
gets those from a crypto library: gnutls, nettle or libgcrypt. Neither
install-ctl.sh nor `make qemu` asked for one, so whether QEMU had AES depended
on what else the host's Homebrew held. Built without one, QEMU falls back to a
stub that refuses every cipher. A macOS guest then hangs for good as it mounts
its root volume: its first AES DATA command fails and stays at the head of the
engine's FIFO, with every command after it. Serial output ends at "End of
iBootStage2", and the display never gets a mode. That was the hang on the
Scaleway M2 Pro Macs on macOS 27.2, whose Homebrew had none of the three; the
M3 Max's QEMU links gnutls.
- vendor/qemu moves to c7a4f070 on steelbrain/reims-vgpu. The AES engine
checks at realize that AES-128, -192 and -256 work in ECB and CBC mode. A
QEMU without them exits at start, saying what the build lacks, instead of
hanging the guest.
- install-ctl.sh installs Homebrew's gnutls with the other formulas on macOS.
Both it and `make qemu` configure QEMU with --enable-gnutls, so configure
stops where gnutls is missing. An install's next update reconfigures QEMU,
since its configure options changed.
- docs/qemu.md says how the hang was found and told apart from macOS 27.2,
and README.md lists gnutls among QEMU's dependencies.
This is development-performance's 9d4f0a635, f8ef804f4 and 79225f10f
squashed. The QEMU change is its f1c10385 alone, picked onto development's
QEMU, without the dirty-source commits under it there.
reims-ctl update runs install-ctl.sh --update, which pulls the checkout and
builds. bash reads a script from the file it opened as it goes, and the pull
replaces that file, so the update ran the old script to its end: a change to
the script's dependencies or QEMU options reached a host only on the update
after the one that brought it, such as libusb for usb-host.
When the pull changes the script, it now runs the new one with the same
options; that one's pull finds nothing new and goes on.
QEMU's configure leaves libusb out, saying nothing, when its headers are
missing, and install-ctl.sh did not list them: a Linux install's QEMU had no
usb-host device, so passing a host's USB device to a guest failed with
"'usb-host' is not a valid device model name" (issue #134). Installing the
headers afterwards changed nothing either, since the script configures again
only when its options change.
The script now installs libusb's headers (libusb-1.0-0-dev; libusb on
pacman) and configures QEMU with --enable-libusb, so a build without it stops
at configure. The new option also makes every existing build configure again
once, picking libusb up.
--help named GPU_ARM only inside its Environment paragraph, so how to install
QEMU on Vulkan or Metal on a Mac was easy to miss. The help now gives both
commands under the usage line, with how switching and updates treat the arm.
reims-ctl __record-install installed reims-util on Linux alone, so on a Mac a
reims-util beside reims-ctl, such as one installed from its own checkout,
stayed at whatever it was through every install and update. It now installs
reims-util wherever one is beside reims-ctl too.
The install no longer passes --force: without it cargo 1.98.1 replaces a
reims-util from another commit or from a path, and leaves one already at the
pin as it is, building nothing (measured: 12 s to move a path install to
381f913, 0.07 s the second time). The target directory is still emptied first,
against cargo installing an earlier commit's build as a later one's.
On a Mac the installer built QEMU on the Metal platform alone, and running a
VM on the Vulkan platform (on MoltenVK) took a QEMU configured by hand.
GPU_ARM=vulkan now builds the library with --platform vulkan and QEMU on it,
in a build directory of its own, and installs it as qemu/<build>-vulkan;
GPU_ARM=metal goes back. Unset, it keeps the installed QEMU's arm, read from
that suffix, so reims-ctl update does not switch it. The Vulkan arm also
checks for Homebrew's vulkan-loader and molten-vk, which metal2vulkan opens.
Linux builds as before: vulkan is its only arm.
reims-ctl could lose or clobber a VM's files and settings, run a VM twice on
its disks, or fail on long names and paths:
- QEMU writes the pid file itself, so a VM never runs twice; a start
refuses a disk another running VM uses, and a delete finds a running VM
by its pid file and keeps other VMs' files;
- settings stay saved while an installer or OpenCore image is made, and
the logs toggle and the edit form's GPU follow the settings as saved;
- deletes take only the VM's own installer copy and old OpenCore image,
and the installer's prune spares the QEMU builds running VMs execute;
- a QMP socket path fits a long VM name or TMPDIR, in a directory of the
user's, and a view removes the frame directories killed viewers left;
- an update follows a force-pushed branch, a stop timeout of 0 waits for
the guest, and create takes an SSH port of 0 as no forward, a MAC only in
QEMU's form, and refuses an environment name the printed script breaks on.
Source: a8d5f7360 6e068ce7f 312574d62 eff723328 1a782184d 15a911eb5 a74547d99
742e84995 c1692789c 72f4aef4a 49b7a366f 10a39d613 7e8a207b1 1bd4a5fad
189bfe60b 00dc3769d 56bf0e527 8bb6451a0 3f48a7893 1675dce1f 15bc7d5cf
A user's build rewrites Cargo.lock: cargo adds the metal2vulkan git sources
the committed lock leaves out. A changed lock then stops both ways an update
moves the checkout: reims-ctl's channel switch (git switch) and the script's
git pull --ff-only, as soon as the target changes the lock too. The update
failed with "commit or set aside its local changes".
The lock is the build's to write, so nothing is lost: reims-ctl's switch and
install-ctl.sh --update check the committed one out before they move, and
the next build writes it again. The switch test now has branches whose locks
differ and a clone whose lock the build rewrote.