Hardpass
hardpass is a small Rust CLI for managing local Ubuntu cloud-image VMs with QEMU.
It exists for people who want a simpler, more predictable local VM workflow than Multipass:
- macOS and Linux hosts
- Ubuntu guest images only
- host-native guest architecture only
- QEMU user networking
- stable per-VM SSH port forwarding
Commands
doctorchecks for required local tools and firmware.createcreates a named VM.startboots a named VM and waits for SSH.stopgracefully stops a named VM.deletestops and removes a named VM.listshows known VMs.info [--json]prints VM details.ssh-config installadds the managed Hardpass include to~/.ssh/config.ssh-config syncrewrites the managed Hardpass host aliases.sshopens an interactive SSH session.execruns a remote command over SSH.
Install
From crates.io:
That installs the hardpass executable.
From the GitHub repository:
From a local checkout:
That installs the hardpass executable into Cargo's bin directory so the examples below can be run directly.
Quick Start
create defaults to Ubuntu 24.04 on the host-native guest architecture. You can override VM size and forwarding when needed:
Use info --json when another tool needs machine-readable state:
The JSON payload includes ssh.alias, so other tools can discover the SSH alias directly.
State and SSH
Hardpass stores state under ~/.hardpass by default. Set HARDPASS_HOME if you want a different root.
Install the one-time include block, then sync the current VM aliases:
Each VM name becomes an SSH alias with the stored loopback port and identity file:
If the managed include is installed, hardpass create and hardpass delete keep the alias file up to date automatically for the default ~/.hardpass root.
Host Requirements
qemu-imgqemu-system-x86_64orqemu-system-aarch64sshssh-keygen- AArch64 hosts also need discoverable UEFI firmware for QEMU
Run hardpass doctor to confirm the local environment before creating a VM.
Security Notes
- SSH connections disable host key checking and known-host persistence for loopback convenience.
- The default cloud-init config creates an
ubuntuuser with passwordless sudo. - Guest networking uses QEMU user networking, not bridged networking.
Testing
The real-QEMU integration smoke test is opt-in:
HARDPASS_REAL_QEMU_TEST=1