Operations 7 min read

Master Multipass: Quickly Spin Up Ubuntu VMs on Any OS

This guide walks you through installing Multipass, launching Ubuntu virtual machines, managing them with commands, and automating setup via cloud‑init, providing a lightweight, cross‑platform solution for developers and ops engineers.

Programmer DD
Programmer DD
Programmer DD
Master Multipass: Quickly Spin Up Ubuntu VMs on Any OS

Multipass

Multipass is a lightweight, cross‑platform virtual‑machine command‑management tool that runs on Linux, Windows, and macOS.

Getting Started

Download and install Multipass for your operating system; the example below uses the Windows installer.

Check Version

$ multipass version

Create an Ubuntu VM

First, list available Ubuntu images: $ multipass find The command returns a list of images such as core18, 20.04, 18.04, etc.

Create a new instance named dg:

$ multipass launch --name dg
Launched: dg

Verify the VM is running:

Name   State    IPv4          Image
 dg    Running  192.168.24.5  Ubuntu 18.04 LTS

Inspect the VM

Show detailed information about the instance:

$ 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

Interact with the VM

Open a shell inside the instance: $ multipass shell dg Or run a single command without entering the shell:

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

Pause, Restart, and Delete

Pause the VM:

# pause
$ multipass stop dg

Restart the VM:

# start
$ multipass start dg

Delete (mark for removal) and purge (release resources):

# delete
$ multipass delete dg
# purge
$ multipass purge dg

Automate with Cloud‑Init

Use the --cloud-init flag to apply an initialization script 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

Conclusion

Multipass provides a fast way to spin up Ubuntu environments for testing, small‑scale database clusters, or any Linux‑based experiment, though it currently supports only Ubuntu images because it is developed by Canonical.

Related Links

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.

CLIAutomationvirtual machineUbuntuMultipass
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

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.