Quickstart Script

One script does steps 1 to 7 for you: it installs the build tools with Homebrew, builds the patched QEMU, signs it, converts the Community License disk and writes the boot script. First register for the Community License and download the RAR, then run:

shell
curl -fsSL https://vmsfieldnotes.info/install/mac.sh | bash -s -- --image ~/Downloads/community_2026.rar

Prefer to read a script before running it? Download it first:

shell
curl -fsSLO https://vmsfieldnotes.info/install/mac.sh
less mac.sh
bash mac.sh --image ~/Downloads/community_2026.rar
  • What it needs: Homebrew, the Xcode command line tools (xcode-select --install), a few GB of free disk and 10 to 20 minutes, mostly building QEMU.
  • Where things go: QEMU in ~/.local/qemu, the VM in ~/openvms. Change them with --prefix and --vm-dir; --help lists every option.
  • What it won't do: it never uses sudo, and it never overwrites an existing disk image, UEFI variable store or boot-vms.sh. Run it again any time; finished steps are skipped.
  • The patches are downloaded from astr0baby's guide and checked against known checksums, and QEMU is built from the exact commit the guide was tested on.

When it finishes, carry on from step 8, First Boot. The steps below are the same process by hand.

  1. Build SDL2

    QEMU uses SDL for its display window. The guide builds SDL2 2.30.10 from source into /usr/local:

    shell
    curl -LO https://github.com/libsdl-org/SDL/releases/download/release-2.30.10/SDL2-2.30.10.tar.gz
    tar xf SDL2-2.30.10.tar.gz
    cd SDL2-2.30.10
    ./configure --prefix=/usr/local
    make -j$(sysctl -n hw.ncpu)
    sudo make install
    cd ..

    Tip: Homebrew works too: brew install sdl2. QEMU's configure finds it through pkg-config just the same.

  2. Build socat

    socat lets you talk to the QEMU monitor over its Unix socket. The guide calls it optional, but you need it for the snapshot step. It builds the same way as SDL2, from socat-1.8.0.2.tar.gz at dest-unreach.org, with --prefix=/usr/local.

    Or install it with Homebrew:

    shell
    brew install socat
  3. Clone and Patch QEMU

    Clone upstream QEMU with its submodules and apply astr0baby's two patches (download them from the guide first):

    shell
    git clone https://gitlab.com/qemu-project/qemu.git
    cd qemu
    git submodule update --init --recursive
    curl -LO https://astr0baby.online/OpenVMS/QEMU_TCG/01-lapic-timer-fix.patch
    curl -LO https://astr0baby.online/OpenVMS/QEMU_TCG/02-max-insns-per-tb.patch
    git apply 01-lapic-timer-fix.patch
    git apply 02-max-insns-per-tb.patch
    • 01-lapic-timer-fix.patch changes QEMU's local APIC (hw/intc/apic.c). VMS masks the timer interrupt, programs the timer, then unmasks it. Stock QEMU drops a timer interrupt that fires while it's masked, so VMS waits forever during boot. The patch remembers the pending interrupt and delivers it on unmask.
    • 02-max-insns-per-tb.patch adds a max-insns-per-tb option to the TCG accelerator that caps how many guest instructions go into each translated block. Setting it to 1 avoids the %RMS-F-BUG crashes that otherwise hit under heavy file I/O (compiles, TCP/IP startup, shutdown), while keeping block chaining so it's faster than one-insn-per-tb.

    The guide was tested against QEMU commit e9fa1f6 on the staging branch (November 2026). If a patch doesn't apply on a newer tree, check out that commit.

  4. Configure and Build QEMU

    Build only the x86-64 system emulator, with SDL and without the extras. On Apple Silicon it takes a few minutes.

    shell
    mkdir -p build && cd build
    ../configure \
      --target-list=x86_64-softmmu \
      --enable-tcg \
      --enable-sdl \
      --disable-werror \
      --disable-docs \
      --disable-gtk \
      --disable-cocoa \
      --disable-vnc \
      --disable-spice-protocol \
      --disable-usb-redir \
      --disable-libusb \
      --disable-brlapi \
      --prefix=/usr/local
    make -j$(sysctl -n hw.ncpu)

    Tip: no admin rights, or an old libfuse in /usr/local/lib getting linked in? Add --disable-fuse, install into your home directory instead, and confirm fuse isn't linked:

    shell
    ../configure <same flags as above> --disable-fuse --prefix=$HOME/.local/qemu
    make -j$(sysctl -n hw.ncpu) && make install
    otool -L qemu-system-x86_64 | grep -i fuse   # should print nothing

    make install also puts the UEFI firmware in ~/.local/qemu/share/qemu, which the boot script needs.

  5. Copy and Sign the Binaries

    Put everything in one working folder. macOS kills an unsigned copy of the binary on launch (exit code 137), so clear the quarantine attributes and ad-hoc sign both tools:

    shell
    mkdir -p ~/openvms && cd ~/openvms
    cp /path/to/qemu/build/qemu-system-x86_64 .
    cp /path/to/qemu/build/qemu-img .
    xattr -cr qemu-system-x86_64 qemu-img
    codesign -f -s - qemu-system-x86_64
    codesign -f -s - qemu-img
  6. Get and Convert the OpenVMS Image

    Register for the free OpenVMS Community License at VMS Software (VSI). You'll get a RAR of about 1.3 GB, named like community_2026.rar, containing a prebuilt VMware disk. Unpack it, then convert the disk to qcow2. Point qemu-img at the small descriptor .vmdk, not the large data file next to it (X86_V923-comm-2026-flat.vmdk in the 2026 kit; some kits split it into -s001, -s002… files instead).

    shell
    unrar x community_2026.rar
    ./qemu-img convert -f vmdk -O qcow2 \
      community_2026/X86_V923-comm-2026.vmdk openvms-vanilla.qcow2
    ./qemu-img create -f qcow2 \
      -b openvms-vanilla.qcow2 -F qcow2 openvms-run.qcow2
    ./qemu-img convert -f raw -O qcow2 \
      /usr/local/share/qemu/edk2-i386-vars.fd OVMF_VARS.qcow2
    • openvms-vanilla.qcow2 (about 4 GB) is the pristine base disk.
    • openvms-run.qcow2 is a copy-on-write overlay. The VM writes here, so you can always start over from the base.
    • OVMF_VARS.qcow2 is a writable UEFI variable store. It's qcow2 so it can be included in snapshots. (QEMU ships one vars template, edk2-i386-vars.fd, for both 32- and 64-bit firmware.)

    Once the conversion is done you can delete the RAR and the extracted folder.

    Tip: macOS has no unrar. brew install sevenzip then 7zz x community_2026.rar does the same job. With a home-directory install (step 4), the vars template is at ~/.local/qemu/share/qemu/edk2-i386-vars.fd.

  7. Write the Boot Script

    Save this as ~/openvms/boot-vms.sh and chmod +x it.

    bash
    #!/bin/bash
    BASEDIR="$(cd "$(dirname "$0")" && pwd)"
    QEMU="$BASEDIR/qemu-system-x86_64"
    FIRMWARE=/usr/local/share/qemu
    export DYLD_LIBRARY_PATH=/usr/local/lib
    
    exec "$QEMU" \
      -machine q35,hpet=off \
      -accel tcg,thread=single,max-insns-per-tb=1 \
      -cpu max \
      -m 4096 \
      -smp 1 \
      -icount shift=auto,align=off \
      -rtc base=utc,clock=vm \
      -nodefaults \
      -device VGA,vgamem_mb=8 \
      -drive if=pflash,format=raw,readonly=on,file="$FIRMWARE/edk2-x86_64-code.fd" \
      -drive if=pflash,format=qcow2,file="$BASEDIR/OVMF_VARS.qcow2" \
      -drive file="$BASEDIR/openvms-run.qcow2",format=qcow2,if=none,id=disk0 \
      -device ahci,id=ahci0 \
      -device ide-hd,drive=disk0,bus=ahci0.0 \
      -monitor unix:"$BASEDIR/monitor.sock",server,nowait \
      -display sdl \
      -no-reboot \
      -netdev user,id=net0,net=10.0.2.0/24,dhcpstart=10.0.2.15,hostfwd=tcp::2222-:22,hostfwd=tcp::2223-:23,hostfwd=tcp::2221-:21 \
      -device e1000e,netdev=net0

    What the important options do:

    • -accel tcg,thread=single,max-insns-per-tb=1: software emulation on one host thread, with patch 2's block-size cap.
    • -cpu max: VMS needs at least SSE4.1 and XSAVE, which the default CPU model lacks.
    • -icount shift=auto,align=off: ties guest time to instructions executed. Without it, UEFI's timed delays can take hours under emulation.
    • -machine q35,hpet=off, -smp 1, -m 4096: a modern chipset without the HPET, one CPU, 4 GB of RAM.
    • Two pflash drives: the read-only UEFI code and your writable variable store.
    • The disk on an AHCI controller, the QEMU monitor on monitor.sock, and an e1000e NIC behind user-mode NAT.
    • hostfwd: Mac ports 2222, 2223 and 2221 reach the guest's SSH, Telnet and FTP.

    Tip: if you installed QEMU under ~/.local/qemu, set FIRMWARE="$HOME/.local/qemu/share/qemu" and add -L "$FIRMWARE" so QEMU also finds its VGA BIOS and option ROMs there.

    A serial console on a socket, logged to a file, is handy for watching boot from a terminal. Add these lines before -display sdl:

    shell
    -chardev socket,id=con0,path="$BASEDIR/console.sock",server=on,wait=off,logfile="$BASEDIR/console.log" \
      -serial chardev:con0 \

    Don't swap -display sdl for -display none: without a display, VMS can hang right after %GCDRIVER-I-INITDRV.

  8. First Boot

    1. Run ./boot-vms.sh. The SDL window opens and UEFI takes about a minute to reach the VSI Boot Manager.
    2. At the BOOTMGR> prompt, type OPA0, then BOOT.
    3. Watch VMS come up in the window. The first boot is the slowest; expect 5 to 10 minutes to the login prompt.
    4. Log in as SYSTEM.

    The cheat sheet covers setting the SYSTEM password, finding your way around DCL, and shutting down cleanly.

  9. Trim Startup Services

    The Community image starts Apache, Samba and Tomcat, which are slow under emulation. The guide provides disable-services.com to turn them off, or you can do it by hand at the $ prompt:

    dcl
    $ @SYS$STARTUP:SAMBA$SHUTDOWN.COM
    $ RENAME SYS$STARTUP:APACHE$STARTUP.COM SYS$STARTUP:APACHE$STARTUP.COM_DISABLED
    $ RENAME SYS$STARTUP:SAMBA$STARTUP.COM SYS$STARTUP:SAMBA$STARTUP.COM_DISABLED
    $ RENAME SYS$COMMON:[SYSMGR]TOMCAT$DEFINE_LOGICALS.COM -
             SYS$COMMON:[SYSMGR]TOMCAT$DEFINE_LOGICALS.COM_DISABLED

    Optionally, stop the SYSTEM password from expiring:

    dcl
    $ MC AUTHORIZE MODIFY SYSTEM /PWDLIFETIME=NONE
  10. Save a Snapshot

    Once VMS is booted and tidy, save the running state from the Mac. Restoring it skips the whole boot.

    shell
    echo "savevm vms-clean" | socat - UNIX-CONNECT:monitor.sock

    To restore, add -loadvm vms-clean to the exec line of boot-vms.sh.

  11. Connect over SSH, Telnet or FTP

    The port forwards make the guest reachable on localhost. VMS's SSH server is slow to complete the handshake under emulation, so allow a long timeout:

    shell
    ssh -p 2222 -o ConnectTimeout=120 -o ServerAliveInterval=30 system@127.0.0.1

    Tip: OpenSSH comes preinstalled on the Community image. If ssh is refused, start the server inside VMS with @SYS$STARTUP:SSH$STARTUP and check that TCPIP SHOW SERVICE lists SSHD22 as enabled. Telnet is on telnet 127.0.0.1 2223 and FTP on ftp -P 2221 127.0.0.1.

Day-to-Day Commands

Run these on the Mac, from the folder that holds boot-vms.sh. Click a command to copy it.

CommandWhat it does
./boot-vms.shStart the VM. At BOOTMGR> type OPA0, then BOOT.
ssh -p 2222 -o ConnectTimeout=120 system@127.0.0.1Log in over SSH once startup has finished.
telnet 127.0.0.1 2223Telnet login. Unencrypted, but traffic stays on your machine.
ftp -P 2221 127.0.0.1FTP into the guest. Use bin mode for kits and other binaries.
echo "info status" | socat - UNIX-CONNECT:monitor.sockIs the VM running or paused?
echo "screendump /tmp/vga.png -f png" | socat - UNIX-CONNECT:monitor.sock && open /tmp/vga.pngScreenshot the VM display.
echo "savevm vms-clean" | socat - UNIX-CONNECT:monitor.sockSave a snapshot (step 10).
socat -,raw,echo=0,escape=0x1d UNIX-CONNECT:console.sockAttach to the serial console, if you added one (see the tip in step 7). Ctrl-] detaches.

Shut down from inside VMS: run @SYS$SYSTEM:SHUTDOWN before closing QEMU. Sending quit to the monitor, or closing the window, is the same as pulling the power.

Performance

astr0baby's numbers on a MacBook Air M2 (8 GB), with one emulated CPU and the services above disabled:

MeasureResult
Cold boot to login2 min 40 s
Restore from snapshotunder 1 s
C compile and linkabout 5 s
Shutdownabout 30 s
Dhrystone 2.195.1 VUPs

Integer work is usable for interactive development. Floating point and string operations are much slower, because TCG has to emulate SSE and repeated string instructions one at a time on arm64.

A Boxing Octopus Creative Project. Copyright 2026 All rights reserved.