← Home Getting Started Configuration SSH & Shutdown USB Accessories Metrics Building

Commands

Command Description
havm run Start the VM — auto-downloads HA OS on first run
havm import-utm Import a Home Assistant VM from UTM
havm cleanup Clear cached HA OS downloads from ~/Library/Caches/havm/
havm version Print version and system info

Run havm --help or havm <command> --help for flags and options.

havm run

Starts the VM. On first run, downloads and prepares HA OS automatically.

havm run                        # start with defaults
havm run -v                     # debug logging
havm run -j                     # NDJSON log output
havm run --console              # debug: interactive serial console (hvc0)
havm run -d /path/to/data       # custom data directory

Custom Data Directory (-d / --data-dir)

The --data-dir flag overrides the default ~/Library/Application Support/havm/ location for persistent VM data. This is useful for:

The flag is also available on havm import-utm to write imported VM data to a non-default location.

Press Ctrl+C once for graceful shutdown (tries REST API → SSH → force-stop). Press Ctrl+C twice to skip and force-stop immediately.

Double-clicking Havm.app in Finder runs the same thing: a launch from Finder carries no arguments, and havm reads that as run rather than printing help into a console nobody can see.

One caveat about that Dock menu: macOS appends its own items below havm’s, including Quit. Under brew services the job is supervised, so Quit halts the guest and launchd starts havm again — it restarts the VM rather than stopping the service. Stop the service with brew services stop havm.

havm run is a regular macOS application for as long as it runs. Its Dock tile carries a badge while Home Assistant is still starting, and right-clicking it opens the web UI, copies the SSH command, and — when an API token is configured (HAVM_HA_API_TOKEN, ha.api_token_file, or ha.api_token) — restarts Home Assistant Core. Logging out or restarting the Mac quits havm the same graceful way, and the system waits for the guest to stop before the session goes away.

Debug Console (--console)

Connects your terminal to the VM’s virtio serial console (/dev/hvc0) for debugging. You get a direct root shell — no SSH, no network required. Useful when networking is misconfigured or SSH is unavailable.

havm run --console

In console mode:

havm import-utm

Import an existing Home Assistant VM from UTM into havm.

Note: Only UTM VMs using the Apple Virtualization backend can be imported. QEMU-based VMs (UTM’s default for x86 guests) are not supported — the import fails with Unsupported UTM backend 'QEMU' — only Apple Virtualization is supported.

havm import-utm ~/Library/Containers/com.utmapp.UTM/Data/Documents/Home\ Assistant.utm

The import copies (not moves) the VM data. Your UTM bundle is left intact.

What gets imported

UTM data havm destination
HA OS disk image (largest writable drive) ~/Library/Application Support/havm/vm/haos.img
EFI variable store (efi_vars.fd) NVRAM
Machine identifier MachineIdentifier (stable MAC address)
MAC address MACAddress
CPU, memory, network settings ~/.config/havm/config.yml

What’s NOT imported

Sparse file handling

HA OS disk images are APFS sparse files (e.g., 21 GB physical for 34 GB logical). The import uses clonefile(2) for an instant copy-on-write clone on the same volume. Cross-volume imports fall back to a sparse-aware copy that skips zero-filled blocks.

Force overwrite

havm import-utm ~/path/to/Home\ Assistant.utm --force

havm cleanup

Clears cached HA OS downloads from ~/Library/Caches/havm/. Does not touch the persistent VM data in ~/Library/Application Support/havm/.

Use this to free up disk space or force a re-download of HA OS on the next havm run.

havm version

Prints the havm version, macOS version, and architecture:

havm 0.2.2
macOS 27.0 (arm64)