Operations 7 min read

Multipass: Canonical's Lightweight Free Alternative to VMware for Ubuntu VMs

This hands-on guide introduces Multipass, a free command-line VM manager from Canonical that spins up Ubuntu instances in seconds on Linux, Windows, and macOS, covering installation, image selection, VM lifecycle commands, cloud-init automation, and a comparison with paid VMware.

SpringMeng
SpringMeng
SpringMeng
Multipass: Canonical's Lightweight Free Alternative to VMware for Ubuntu VMs

Introduction

VMware is powerful and lets users tweak VM configurations easily, but it requires a paid license that can be costly to renew. A reader recommended Multipass, a lightweight, open-source VM command-line tool developed by Canonical (the company behind Ubuntu) that runs on Linux, Windows, and macOS.

Installation and Version Check

Download the installer for your OS from the official site https://multipass.run/. After installing, verify the version:

$ multipass version

Finding Available Ubuntu Images

List downloadable images with multipass find. The output shows aliases, versions, and descriptions, for example:

Image                  Aliases      Version     Description
snapcraft:core18                20201111    Snapcraft builder for Core 18
snapcraft:core20                20201111    Snapcraft builder for Core 20
core                  core16       20200818    Ubuntu Core 16
core18                              20200812    Ubuntu Core 18
16.04                 xenial       20210128    Ubuntu 16.04 LTS
18.04                 bionic       20210129    Ubuntu 18.04 LTS
20.04                 focal,lts    20210223    Ubuntu 20.04 LTS
20.10                 groovy       20210209    Ubuntu 20.10
appliance:adguard-home            20200812    Ubuntu AdGuard Home Appliance
appliance:mosquitto               20200812    Ubuntu Mosquitto Appliance
appliance:nextcloud               20200812    Ubuntu Nextcloud Appliance
appliance:openhab                 20200812    Ubuntu openHAB Home Appliance
appliance:plexmediaserver         20200812    Ubuntu Plex Media Server Appliance

Creating an Ubuntu VM

Launch a new instance named "dg" (defaults to the latest LTS):

$ multipass launch --name dg
Launched: dg

Confirm the Ubuntu version inside the VM:

$ multipass exec dg -- lsb_release -d
Description:  Ubuntu 18.04.4 LTS

Managing VMs

List VMs

Name   State    IPv4            Image
dg     Running  192.168.24.5    Ubuntu 18.04 LTS

Show Detailed 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.7M

Access the Shell

$ multipass shell dg

Alternatively, run single commands without entering the shell via multipass exec.

Stop and Start

# Stop
$ multipass stop dg
# Start
$ multipass start dg

Delete and Purge

delete

removes the VM but retains its data; purge frees the disk space completely:

# Delete
$ multipass delete dg
# Purge
$ multipass purge dg

Automating Setup with cloud-init

To keep dev and production environments consistent and save deployment time, use --cloud-init with a YAML file:

$ multipass launch --name ubuntu --cloud-init config.yaml

Example config.yaml that installs Node.js and a CLI tool on first boot:

#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.deb

The runcmd section specifies commands executed once on initial startup.

Summary and Limitation

After extended use, the author finds Multipass excellent for quick Linux experiments and spinning up local database clusters in minutes. The only drawback: Multipass only supports Ubuntu images because it is a Canonical project.

References

Official site: https://multipass.run/

Documentation: https://multipass.run/docs/

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxvirtualizationvmwareubuntucloud-initmultipassvm-managementcanonical
SpringMeng
Written by

SpringMeng

Focused on software development, sharing source code and tutorials for various systems.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.