Files
reims-vgpu/scripts
Anees Iqbal 39d6ca78ef 🆕 Make new x86-64 VMs from reims-util's macOS downloads
A new x86-64 VM needed an OpenCore image and an installer made by hand with
OSX-KVM or ULTMOS. reims-ctl now runs reims-util for both: pick a macOS
version (n in the interface, create --macos on the command line) and it
downloads the installer from Apple, makes the VM's OpenCore image with OVMF
and a Mac identity of its own, and makes the disk.

- create --macos VERSION downloads Apple's recovery image (about 1 GB), or
  with --offline an installer of one release (13 to 20 GB). Installers are
  kept in the data directory's installers for the next VM, one reims-util at
  a time writes there, and a stopped download continues. The download comes
  before the VM's directory, so stopping it leaves no VM half made, and
  reims-util ends with reims-ctl on Linux. What create is given (a disk, an
  installer, an OpenCore image and the OVMF beside it, reims-util itself) is
  checked before the download and the disk's copy, and the VM list is read
  again before the VM joins it, so VMs made or deleted during a download
  stay as they are.
- --opencore is optional: without it reims-util makes the image, with the
  VM's MAC as its ROM, and an iMacPro1,1 for macOS 10.13 and 10.14. An image
  of the user's brings OVMF_CODE.fd and OVMF_VARS.fd beside it, as
  reims-util writes them.
- The interface's form asks where macOS comes from, the version first; with
  no name, the VM takes the version's, skipping names a VM or a leftover
  directory has. A VM with an installer says in its details, and create
  prints, how to install macOS from it; one made from a disk is reminded to
  set Metal's error mode.
- A new disk needs an installer or a download: a VM of an empty disk and no
  installer is refused.
- Every installer attaches as a read-only disk (snapshot=on), a DMG
  converted to a raw image in the VM's directory, so the CD drive is gone: a
  change of installer applies at the next start. vm.toml's installer_kind
  is no longer written, and is ignored where an older vm.toml has it. A
  missing installer says how to eject it.
- reims-ctl __record-install, which scripts/install-ctl.sh runs last,
  installs reims-util at the commit reims_util.rs pins, so the update that
  brings this reims-ctl installs it too, though it runs the script it
  started with. doctor checks for it in place of the system's OVMF, and the
  install no longer adds the ovmf or edk2-ovmf package.
- vm.max_map_count: a new VM's default of up to 16 GiB needs about 1.13
  million mappings, more than the 1048576 suggested (CachyOS's stock
  value). The README, the install script, doctor and the start warning
  suggest 2097152, which covers 30 GiB, and check against what the VM, the
  largest VM or a new one's default needs.
- Updating from the interface while a create runs says the restart stops
  it, as quitting does.

Dropped, as reims-util's images leave nothing for them to cover:
- create --from-script and the interface's launch-script import, which read
  OSX-KVM's and ULTMOS's QEMU scripts. A VM made from one keeps working; its
  vm.toml names its own copies.
- The search for OVMF beside a user's OpenCore image in those projects'
  layouts, QEMU's edk2 build and the distributions' packages, and
  --firmware-code and --firmware-vars.
- create --disk-mode overlay: copy, a reflink where the file system can, or
  in-place covers an existing disk. A VM made with an overlay keeps working.
- --cpu-model and --cpu-flags on create and set, and the edit form's CPU
  fields: new VMs take Skylake-Client-noTSX-IBRS. vm.toml keeps cpu_model
  and cpu_flags, so an older VM keeps its model; docs/qemu.md says how to
  change it there.
- --installer's --iso and --cdrom aliases.

README, the help and the docs no longer point at OSX-KVM or ULTMOS. README
step 3 describes reims-util's OpenCore picker (5 seconds, which an arrow key
stops, measured on homelab-ms01), and architecture.md 11.4 counts its image
among those that keep AvoidRuntimeDefrag on.
2026-10-12 19:37:12 +03:00
..