brew install ingmarstein/havm/havm
Verify the installation:
havm version
havm run
The VM boots and stays attached to your terminal. Press Ctrl+C to stop.
While it runs, havm is a regular macOS application and shows a Dock icon. That is what lets the Mac wait for it during a logout or restart instead of killing the guest mid-shutdown. Right-click the icon for the guest’s address, the web UI, and the SSH command.
brew services start havm
The VM starts at login and restarts automatically if it exits. View logs with:
brew services info havm
If you installed Havm.app from the releases page instead, add it under
System Settings → General → Login Items → Open at Login. A login launch
carries no arguments, and havm reads that as run.
This is not the same as brew services in two ways worth knowing: the app is
not supervised, so it stays down if it exits (a poweroff inside the guest, a
crash) until the next login; and a login launch has no terminal, so havm’s log
lines are discarded unless you set logging.file in config.yml. The Dock menu
shows the guest’s address once Home Assistant answers.
When running as a service, havm uses separate paths to avoid conflicts with foreground runs:
| Purpose | Path |
|---|---|
| VM data | /opt/homebrew/var/lib/havm/ |
| Config (optional) | /opt/homebrew/etc/havm/config.yml |
Only one havm can use a data directory at a time: the disk and the EFI
variable store are opened for writing, and two processes on them would corrupt
the guest. A second instance exits with “Another havm is using this data
directory” and the pid of the one that holds it. The lock is held by the
running process, so nothing is left behind to clean up after a crash — the
next start simply takes it.
On first run, havm handles everything automatically:
.img.xz). A release published for other
boards only — as 18.5 was, for Raspberry Pi and Yellow — is passed over~/Library/Application
Support/havm/vm/haos.img and resizes it (default 32 GiB, configurable)The download is cached in ~/Library/Caches/havm/, so subsequent installs or
re-runs skip the fetch.
HA OS updates are handled from within Home Assistant itself (Settings →
System → Updates). havm only manages the VM; it doesn’t re-download HA OS
after the initial setup unless you run havm cleanup first to clear the cache.