MacVisor runs ARM64 Linux. Most Linux VMs come from a cloud image: MacVisor downloads it once, and cloud-init sets the VM up with your account, your SSH keys, the MacVisor Agent and, if you ask, a container runtime and a share of your home folder. You can also install any distribution from its ARM64 ISO, or boot a router or firewall image as an appliance. x86-64 Linux programs run in the guest through Rosetta, and on an M3 or later the guest can run KVM itself (nested virtualization).
From a cloud image
This is the usual way to make a Linux VM. Choose Linux → Cloud Image, pick a distribution from the catalogue, and optionally a runtime under Containers and Share my home folder (read-only).
mvz create ubuntu dev --runtime containerd --home
mvz create fedora-44 build --cpus 8 --memory 16 --runtime podman
mvz create debian dev2 --user-data cloud.yaml
MacVisor downloads the image once and keeps it as a template. The VM is a linked clone of it, so it stores only its own changes. On the first boot, cloud-init creates your account with your SSH keys and installs the MacVisor Agent. See What cloud-init sets up.
- A VM gets no container runtime and no shared folders unless you ask. The form remembers your last choice.
mvz createdoesn't, so pass--runtimeand--homeeach time. - Share more folders afterwards in VM Settings → Shared Folders, or with
mvz shares <vm> add <dir>. - Some images don't support every runtime. See Runtimes by distribution.
- Your own
#cloud-configor script goes in the form or in--user-data <file>, and runs after MacVisor's. - To use an image that isn't in the catalogue, add it with
mvz images add <file>or the + in the Templates section. - A TPM 2.0 is off until you turn it on, in VM Settings → System under Firmware or with
mvz set <vm> --tpm on. See A TPM for Linux VMs.
The Cloud Image list holds Linux images only. FreeBSD images are under FreeBSD in New VM: see FreeBSD guests.
SSH keys
The account has no password, except for the desktop of an Ubuntu Desktop VM and a FreeBSD VM's console, so you sign in with an SSH key. If you have no key in ~/.ssh or your SSH agent, the form offers Create SSH Key and mvz create offers to make one. Either way you get ~/.ssh/id_ed25519 with no passphrase.
If you decline, MacVisor authorises its own key instead. mvz shell and mvz exec work with it, but plain ssh and editors don't. --no-ssh-keys authorises no key at all.
Ubuntu Desktop
For an Ubuntu image, the form's Account section offers Install Ubuntu Desktop, above the account name. With it on, a Password field follows: leave it blank and MacVisor makes a random one, or type your own. An image you added counts when its file or template name says Ubuntu. The switch is in the app only: mvz create has no option for it.
- The first boot installs Ubuntu Desktop, about 1 GB from Ubuntu's archive and the Snap Store, and takes 10 to 20 minutes longer. Then the VM's window shows the desktop, without a restart. A copy of a desktop VM keeps the desktop and its sign-in settings, and gets a password of its own at its first start, also a copy made while cloud-init is off, once it's back on.
- Your account signs in to the desktop by itself. It keeps your SSH keys and sudo without a password, and gets the password from the form (random if you left it blank) for the lock screen, a sign-in after Log Out and admin prompts. MacVisor keeps it only on the Mac, and the VM gets only a hash: Show Password on the Overview, or
mvz password <vm>. Type Password types it into the VM's window for you, for the VM's keyboard layout (VM Settings > Keyboard & Pointer > Keyboard in the VM, U.S. unless you change it). A password you typed in the form is deleted from the Mac once the guest agent reports that the first setup is over, done or failed. With guest tools off, there is no report, so it stays until you choose Delete Password…. A random one stays until you choose Delete Password…; MacVisor then makes no new password for the VM, though a copy of it still gets its own. Either way the account keeps its password. The screen doesn't lock by itself. - The form raises the VM to 6 GiB of memory and 4 CPUs. GNOME draws with the Mac's CPU, since Linux VMs have no GPU acceleration.
- The desktop's resolution follows the VM's window as you resize it, and the VM has a microphone: macOS asks once for access, the first time the VM listens.
- The clipboard reaches the desktop only when sharing is Both Ways, the default. Then everything you copy on the Mac reaches the VM, passwords included, even when its window isn't active.
- NetworkManager runs the VM's network, as on a stock Ubuntu Desktop. During setup, systemd-networkd keeps the network until NetworkManager has an address, so it doesn't drop. If NetworkManager can't get one, systemd-networkd keeps the network (GNOME's network menu then shows no wired connection) and MacVisor tries again at the next two starts;
/var/log/macvisor-setup.logsays what happened. - If Ubuntu Desktop can't be installed, the Overview says so, and MacVisor tries again at the next start. See A Linux VM's setup reported errors.
From an ISO
- Choose Linux → Installer ISO and pick an ARM64 ISO.
- Once an ISO is chosen, Disk Format and Sector Size appear. Keep ASIF and 512 bytes: ASIF can be linked-cloned and stays compact when copied to another drive, and Debian's and Kali's installers fail on 4 KB sectors. Raw is a plain image other tools can read. A disk's sector size can't be changed later. See Disk formats and sector sizes. Under More Options, Network is the Default MacVisor Network unless you choose NAT or a custom network, as for macOS and Windows.
- Install the distribution to the virtual disk, creating your account in its installer.
- When the installer reboots or you stop the VM, MacVisor offers to eject the ISO (at its next launch if it wasn't open), and the guest-tools volume is attached from the next start. You can also eject the ISO in VM Settings → Storage, or with
mvz set <vm> --iso none. - Install the guest tools from their attached volume.
From the CLI, mvz create <file.iso> <name> --os linux makes the same VM, with --disk-format asif|raw, --sector-size 512|4096|4k and --network. An empty VM with no ISO is made in the app only.
More about Linux guests
- Linux images: every distribution in the catalogue, with its id and source.
- What cloud-init sets up, and the runtimes each distribution can run.
- Signing in to a cloud-image VM, and the serial console.
- A TPM for Linux VMs.
- Install the MacVisor Agent in a Linux guest installed from an ISO.
DeltaSync