Multipass: Ubuntu VMs Made Simple

Overview

Multipass is a streamlined solution for creating and managing Ubuntu VMs locally. It offers a "just works" experience that's perfect for:

  • Isolating different project environments
  • Testing with different dependency versions (PHP, Node.js, Go, etc.)
  • DevOps learning and experimentation
  • Container operations with Podman
  • Ansible automation practice

Installation

sudo snap install multipass

Verify installation:

multipass version

Basic VM Operations

Create VM with Custom Resources

multipass launch --name dev-vm -c2 -m4G -d20G "24.10"

-c2: 2 CPU cores -m4G: 4GB RAM -d20G: 20GB disk "24.10": Ubuntu 24.10 (includes latest Podman with Quadlet support)

Create VM with SSH Key

  1. Create cloud-init.yaml:
ssh_authorized_keys:
  - YOUR_PUBLIC_KEY_HERE
  1. Launch with cloud-init:
multipass launch --name dev-vm -c2 -m4G -d20G --cloud-init cloud-init.yaml "24.10"

Connect to VM

Get VM IP address:

multipass list

SSH directly:

ssh ubuntu@VM_IP_ADDRESS

Or use built-in shell:

multipass shell vm1

File Sharing

Mount local directory to VM:

multipass mount /path/to/local/directory vm1:/path/in/vm

VM Management

  • List VMs: multipass list
  • Start VM: multipass start vm1
  • Stop VM: multipass stop vm1
  • Delete VM: multipass delete vm1
  • Permanently remove: multipass purge