Operations 6 min read

Using Multipass to Create and Manage Ubuntu Virtual Machines

This article introduces Multipass, a lightweight cross‑platform virtual machine manager, and provides step‑by‑step instructions for installing it, launching Ubuntu instances, checking status, executing commands, and automating setup with cloud‑init, highlighting its usefulness for rapid development and testing environments.

Architecture Digest
Architecture Digest
Architecture Digest
Using Multipass to Create and Manage Ubuntu Virtual Machines

Multipass is a lightweight, cross‑platform command‑line tool for creating and managing Ubuntu virtual machines. It runs on Linux, Windows, and macOS, offering a quick way to spin up disposable environments for development and testing.

Installation : Download the appropriate installer from the official website and install it on your operating system (the example uses Windows).

After installation, verify the version:

$ multipass version

Finding available Ubuntu images :

$ multipass find

The command lists various Ubuntu releases (e.g., 16.04, 18.04, 20.04, 20.10) along with their aliases.

Launching a new instance named dg :

$ multipass launch --name dg

The VM starts and you can confirm its details:

$ multipass exec dg -- lsb_release -d

Output shows the description, e.g., Ubuntu 18.04.4 LTS .

Managing the VM :

List running instances: 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 Load: 0.00 0.00 0.00 Disk usage: 1.5G out of 4.7G Memory usage: 112.1M out of 985.7M

Enter the VM shell: $ multipass shell dg

Pause and resume: $ multipass stop dg $ multipass start dg

Delete and purge: $ multipass delete dg $ multipass purge dg

Automating setup with cloud‑init : Use the --cloud-init flag to apply a 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 provision tools automatically.

Conclusion : Multipass provides a fast, low‑overhead way to create Ubuntu VMs for experiments, small database clusters, or any scenario where a reproducible environment is needed. Its limitation is that it only supports Ubuntu images, as it is maintained by Canonical.

For more information, visit the official site https://multipass.run/ and the documentation https://multipass.run/docs/ .

AutomationDevOpsVirtual MachineubuntuCloud‑InitMultipass
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

0 followers
Reader feedback

How this landed with the community

login 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.