Skip to main content

CLI Reference

The CLI (osx-next-cli) provides non-interactive, scriptable VM management. It bypasses the TUI entirely.

osx-next-cli --version

Subcommands

SubcommandDescription
applyCreate a macOS VM (dry-run by default, --execute to run)
planPreview the command plan without creating anything
editModify an existing macOS VM (stop, apply changes, optionally restart)
downloadDownload OpenCore and recovery images
preflightCheck host readiness
statusShow info about an existing VM
uninstallDestroy an existing VM
cloneClone a VM with a fresh SMBIOS identity
bundleExport diagnostic log bundle
guideShow recovery guide for a given issue
doctorDiagnose a running or stopped macOS VM for common config issues

Common Flags

These flags are shared by apply and plan:

FlagTypeRequiredDescription
--vmidintYesVM ID (100-999999)
--namestringYesVM display name
--macosstringYesTarget version: ventura, sonoma, sequoia, tahoe
--coresintYesCPU cores (power of 2)
--memoryintYesRAM in MB (minimum 4096)
--diskintYesDisk size in GB (minimum 64)
--bridgestringYesNetwork bridge (e.g., vmbr0)
--storagestringYesProxmox storage target (e.g., local-lvm)
--iso-dirstringNoCustom directory for ISO/recovery images
--cpu-modelstringNoOverride QEMU CPU model (default: auto-detect)
--net-modelstringNoNIC model: vmxnet3 or e1000-82545em (default: auto-detect)
--apple-servicesflagNoEnable iCloud/iMessage/FaceTime support
--verbose-bootflagNoShow kernel log instead of Apple logo
--no-smbiosflagNoSkip SMBIOS generation entirely
--no-downloadflagNoSkip auto-download of missing assets
--smbios-serialstringNoCustom serial number
--smbios-uuidstringNoCustom UUID
--smbios-mlbstringNoCustom MLB (Main Logic Board)
--smbios-romstringNoCustom ROM value
--smbios-modelstringNoCustom Mac model (e.g., MacPro7,1)
--installer-pathstringNoPath to installer image

edit -- Flags

FlagTypeRequiredDescription
--vmidintYesVM ID to modify
--namestringNoNew VM display name
--coresintNoNew CPU core count
--memoryintNoNew RAM in MB
--bridgestringNoNew network bridge (e.g. vmbr1)
--add-diskintNoExtend the target disk by N GB
--disk-namestringNoDisk device to resize (default: virtio0)
--nic-modelstringNoNIC model when updating bridge (default: preserve existing)
--startflagNoStart VM after changes are applied
--executeflagNoActually run (default is dry run)

At least one change flag (--name, --cores, --memory, --bridge, --add-disk) is required.

clone -- Flags

FlagTypeRequiredDescription
--source-vmidintYesVMID of the VM to clone (100-999999)
--new-vmidintYesVMID for the cloned VM (must differ from source)
--namestringNoDisplay name for the clone (3-63 chars, alphanumeric/dot/hyphen)
--macosstringNomacOS version hint for SMBIOS model selection (default: sequoia)
--no-apple-servicesflagNoSkip vmgenid and MAC regeneration (not recommended)
--executeflagNoActually run (default is dry run)

Without --no-apple-services (the default), the clone step regenerates serial, UUID, MLB, ROM, vmgenid, and MAC address so both VMs remain fully independent on iCloud, iMessage, and FaceTime.

plan -- Flags

These flags apply only to the plan subcommand:

FlagTypeDescription
--jsonflagOutput the plan as JSON (useful for scripting and CI)
--script-outstringWrite the plan as an executable shell script to the given path

Usage Examples

apply -- Create a VM

Dry-run (preview commands):

osx-next-cli apply \
--vmid 910 --name macos-sequoia --macos sequoia \
--cores 8 --memory 16384 --disk 128 \
--bridge vmbr0 --storage local-lvm

Execute for real:

osx-next-cli apply --execute \
--vmid 910 --name macos-sequoia --macos sequoia \
--cores 8 --memory 16384 --disk 128 \
--bridge vmbr0 --storage local-lvm

With verbose boot:

osx-next-cli apply --execute --verbose-boot \
--vmid 910 --name macos-sequoia --macos sequoia \
--cores 8 --memory 16384 --disk 128 \
--bridge vmbr0 --storage local-lvm

plan -- Preview the Plan

Human-readable output:

osx-next-cli plan \
--vmid 910 --name macos-sequoia --macos sequoia \
--cores 8 --memory 16384 --disk 128 \
--bridge vmbr0 --storage local-lvm

JSON output (for scripting/CI):

osx-next-cli plan --json \
--vmid 910 --name macos-sequoia --macos sequoia \
--cores 8 --memory 16384 --disk 128 \
--bridge vmbr0 --storage local-lvm

Export as shell script:

osx-next-cli plan --script-out ./create-vm.sh \
--vmid 910 --name macos-sequoia --macos sequoia \
--cores 8 --memory 16384 --disk 128 \
--bridge vmbr0 --storage local-lvm

download -- Fetch Assets

# Download both OpenCore and recovery
osx-next-cli download --macos ventura

# OpenCore only
osx-next-cli download --macos sonoma --opencore-only

# Recovery only, custom destination
osx-next-cli download --macos sequoia --recovery-only --dest /mnt/pve/nas/template/iso

preflight -- Check Host

osx-next-cli preflight

Outputs OK/FAIL for each host check. Automatically installs missing build dependencies if detected.

status -- Query a VM

osx-next-cli status --vmid 910

Shows VM name, status, and key config values (cores, memory, CPU model, network, SMBIOS).

uninstall -- Destroy a VM

Dry-run (preview):

osx-next-cli uninstall --vmid 910

Execute with disk cleanup:

osx-next-cli uninstall --vmid 910 --purge --execute

edit -- Modify an Existing VM

Dry-run (preview what will change):

osx-next-cli edit --vmid 910 --cores 4 --memory 8192

Execute for real:

osx-next-cli edit --vmid 910 --cores 4 --memory 8192 --execute

Rename a VM and extend its disk:

osx-next-cli edit --vmid 910 --name macos-sequoia-v2 --add-disk 64 --execute

Change network bridge (preserves existing NIC model and MAC):

osx-next-cli edit --vmid 910 --bridge vmbr1 --execute

Change bridge with an explicit NIC model:

osx-next-cli edit --vmid 910 --bridge vmbr1 --nic-model e1000 --execute

Apply changes and restart the VM automatically:

osx-next-cli edit --vmid 910 --cores 8 --memory 16384 --start --execute
note

The edit subcommand always stops the VM before making changes. A config snapshot is saved to generated/snapshots/ before any modifications. On failure, rollback hints are printed so you can restore manually.

clone -- Clone a VM with Fresh Identity

Cloning a macOS VM on Proxmox duplicates its SMBIOS — both VMs share the same serial number, UUID, and MLB, which causes Apple to block both from iCloud, iMessage, and FaceTime. The clone subcommand handles this automatically.

Dry-run (preview commands):

osx-next-cli clone --source-vmid 910 --new-vmid 911 --name macos-sequoia-clone

Execute for real:

osx-next-cli clone --source-vmid 910 --new-vmid 911 --name macos-sequoia-clone --execute

With explicit macOS version hint:

osx-next-cli clone --source-vmid 910 --new-vmid 911 --macos sonoma --execute

Without Apple services identity reset (not recommended):

osx-next-cli clone --source-vmid 910 --new-vmid 911 --no-apple-services --execute
note

The clone always performs a full disk copy (qm clone --full). The bridge and NIC model are preserved from the source VM. The new VM gets a fresh serial, UUID, MLB, ROM, vmgenid, and MAC address.

bundle -- Export Diagnostics

osx-next-cli bundle

Exports a log bundle for troubleshooting.

guide -- Recovery Guide

osx-next-cli guide "boot issue"

Prints recovery steps for the given issue description.

Prints recovery steps for the given issue description.

doctor -- Diagnose VM Configuration

osx-next-cli doctor --vmid 910

Runs checks against a VM's configuration to detect issues that prevent macOS from booting or functioning properly.

CheckSeverityDescription
balloonFAILMust be 0 — macOS has no balloon driver
machineFAILMust include q35 — UEFI chipset required
coresFAIL/WARNNon-power-of-2 values cause hangs at Apple logo
memoryWARNShould be ≥4096 MB for installer
cpuWARNShould be host or Cascadelake-Server
net0FAILMust use vmxnet3, e1000, or e1000-82545em
agentWARNShould be enabled=1 for graceful shutdown
smbios1WARNMust contain uuid= for Apple services
bootFAILMust not reference ide3 (non-existent device)
virtio0WARNMain macOS disk should be present
ide0WARNOpenCore bootloader disk should be present
ide2WARNRecovery/installer image should be present

Each issue labeled OK, WARN, or FAIL with a fix command where applicable.

Exit codes: 0 all passed, 1 warnings only, 2 invalid VMID, 4 failures detected.

Example:

osx-next-cli doctor --vmid 100

Sample output (all passing):

  [ OK  ] balloon=0 — macOS has no balloon driver
[ OK ] machine=pc-q35-8.1+pve0
[ OK ] cores=4 — power-of-2, safe for macOS
[ OK ] memory=4096 MB
[ OK ] cpu=host
[ OK ] net0 model=vmxnet3 — native macOS driver
[ OK ] agent=enabled — graceful shutdown works
[ OK ] smbios1 set — identity chain configured
[ OK ] boot=order=ide2;virtio0;ide0
[ OK ] virtio0 present — main macOS disk
[ OK ] ide0 present — OpenCore bootloader
[ OK ] ide2 present — recovery/installer image

All checks passed.

Sample output (with failures):

  [FAIL] balloon=1 — macOS will crash with balloon driver enabled
Fix: qm set 100 --balloon 0
[ WARN] cores=3 — non-power-of-2 value hangs macOS at Apple logo
Fix: qm set 100 --cores 2
...

1 failure, 1 warning

Exit Codes

CodeMeaning
0Success
1Warnings (doctor with warnings but no failures)
2Validation error (bad VMID, invalid config, VM not found)
3Missing assets (OpenCore or recovery image not found)
4Execution failure (apply, edit, clone, or doctor with failures)
5Download failed
6Destroy failed
7Edit failed
8Clone failed