Multipass: A Lightweight, Faster Alternative to VMware for Ubuntu VMs
This tutorial introduces Multipass, Canonical's open-source CLI tool for quickly launching and managing Ubuntu virtual machines on Linux, Windows, and macOS, covering installation, image selection, VM lifecycle commands, cloud-init automation, and a comparison with VMware.
Multipass
Multipass is a lightweight virtual machine management tool developed by Canonical, the company behind Ubuntu. It runs on Linux, Windows, and macOS, providing a command-line interface for creating and managing Ubuntu VMs quickly.
Getting Started
Download and install Multipass from the official website https://multipass.run/. After installation, verify the version:
$ multipass versionCreating an Ubuntu Virtual Machine
First, list available Ubuntu images: $ multipass find Sample output shows images like Ubuntu 16.04 LTS (xenial), 18.04 LTS (bionic), 20.04 LTS (focal), 20.10 (groovy), and various appliance images (AdGuard Home, Mosquitto, Nextcloud, etc.).
Launch a new VM named "dg" using the default LTS image:
$ multipass launch --name dg
Launched: dgVerify the Ubuntu version inside the VM:
$ multipass exec dg -- lsb_release -d
Description: Ubuntu 18.04.4 LTSManaging Virtual Machines
List VMs
Name State IPv4 Image
dg Running 192.168.24.5 Ubuntu 18.04 LTSView Detailed VM Info
$ multipass info --all
Name: dg
State: Running
IPv4: 192.168.24.5
Release: Ubuntu 18.04.4 LTS
Image hash: fe3030933742 (Ubuntu 18.04 LTS)
Load: 0.00 0.00 0.00
Disk usage: 1.5G out of 4.7G
Memory usage: 112.1M out of 985.7MAccess the VM Shell
$ multipass shell dgAlternatively, run single commands without entering the shell using multipass exec.
Stop and Start VMs
# Stop
$ multipass stop dg
# Start
$ multipass start dgDelete and Purge VMs
Deleting a VM retains its data; purging removes it completely:
# Delete
$ multipass delete dg
# Purge (permanent removal)
$ multipass purge dgAutomated Configuration with cloud-init
Use --cloud-init to run initialization scripts on first boot:
$ multipass launch --name ubuntu --cloud-init config.yamlExample config.yaml installing Node.js and Lean CLI:
#cloud-config
runcmd:
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
- wget https://releases.leanapp.cn/leancloud/lean-cli/releases/download/v0.21.0/lean-cli-x64.deb
- sudo dpkg -i lean-cli-x64.debSummary
Multipass excels for quick Linux experiments and local cluster testing — spinning up Ubuntu VMs in minutes. Its main limitation is supporting only Ubuntu images, as it is a Canonical project.
References
Official website: https://multipass.run/
Documentation: https://multipass.run/docs/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
