Operations 6 min read

How to Quickly Spin Up Ubuntu VMs with Multipass: A Step‑by‑Step Guide

This article walks you through installing Multipass, launching and managing Ubuntu virtual machines on Windows, macOS, or Linux, covering commands for version checking, image selection, VM creation, inspection, shell access, pause/restart, deletion, and automated cloud‑init configuration.

Architect's Tech Stack
Architect's Tech Stack
Architect's Tech Stack
How to Quickly Spin Up Ubuntu VMs with Multipass: A Step‑by‑Step Guide

Multipass Overview

Multipass is a lightweight command‑line tool for managing virtual machines across Linux, Windows, and macOS. It offers a simple way to create, run, and control Ubuntu instances without the cost of commercial solutions like VMware.

Installation

Download the appropriate installer from the official Multipass website and install it on your operating system (the example uses Windows). $ multipass version Running the above command shows the installed version.

Creating an Ubuntu VM

First, list available Ubuntu images: $ multipass find The command returns a table of image aliases and versions, such as 16.04, 18.04, 20.04, etc.

Create a new instance named dg: $ multipass launch --name dg The VM starts automatically. Verify the instance:

Name    State    IPv4          Image
 dg      Running  192.168.24.5  Ubuntu 18.04 LTS

Inspecting the VM

Show detailed information about the running VM: $ multipass exec dg -- lsb_release -d Output:

Description: Ubuntu 18.04.4 LTS

Accessing the VM

Open an interactive shell inside the instance: $ multipass shell dg If you prefer not to enter the shell, you can execute commands directly with multipass exec.

Pausing and Restarting

# Pause
$ multipass stop dg
# Restart
$ multipass start dg

Deleting and Purging

# Delete (marks for removal)
$ multipass delete dg
# Purge (removes completely)
$ multipass purge dg

Automating Configuration with Cloud‑Init

Use the --cloud-init flag to apply an initial configuration file when launching a VM:

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

Example config.yaml:

#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 runs these commands on first boot, allowing you to pre‑install tools such as Node.js and the LeanCloud CLI.

Conclusion

Multipass provides a fast, cost‑free way to spin up Ubuntu environments for testing, small database clusters, or any Linux‑based experiment. Its limitation is that it only supports Ubuntu images, as it is developed by Canonical.

Related Links

Official site: https://multipass.run/

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

CLIvirtual machineUbuntuCloud‑InitMultipass
Architect's Tech Stack
Written by

Architect's Tech Stack

Java backend, microservices, distributed systems, containerized programming, and more.

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.