Why Multipass Is the Fastest Way to Spin Up Ubuntu VMs on Any Platform
This article introduces Multipass, a lightweight free‑open‑source VM manager from Canonical, walks through its installation on Windows, demonstrates how to list, launch, inspect, enter, pause, restart, delete and automate Ubuntu instances using concrete command‑line examples and configuration files.
Overview
Multipass is a lightweight command‑line tool for creating and managing Ubuntu virtual machines. It runs on Linux (using QEMU/KVM), Windows (using Hyper‑V), and macOS (using HyperKit), selecting the most efficient hypervisor for the host OS. The tool is open‑source, maintained by Canonical, and currently provides only Ubuntu images.
Installation
Download the installer for the target platform from the official site:
https://multipass.run/install
Run the installer, then verify the installed version:
$ multipass versionListing available Ubuntu images
Use multipass find to enumerate all published images. A typical table includes:
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:plexmediaserver20200812 Ubuntu Plex Media Server ApplianceCreating a VM
Launch a new instance named dg with the default Ubuntu image:
$ multipass launch --name dg
Launched: dgConfirm the OS release inside the VM:
$ multipass exec dg -- lsb_release -d
Description: Ubuntu 18.04.4 LTSInspecting instances
List running instances:
Name State IPv4 Image
dg Running 192.168.24.5 Ubuntu 18.04 LTSShow detailed resource usage:
$ 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.7MAccessing the VM
Open an interactive shell: $ multipass shell dg Or run a single command without entering the shell (as shown above with multipass exec).
Lifecycle management
Pause the instance: $ multipass stop dg Start it again: $ multipass start dg Delete marks the VM for removal; purge releases the allocated resources:
$ multipass delete dg
$ multipass purge dgAutomating initialization with cloud‑init
Provide a cloud‑init YAML file to run commands on first boot. Launch with:
$ multipass launch --name ubuntu --cloud-init config.yamlSample config.yaml that installs Node.js 12 and the LeanCloud 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.debThe runcmd section executes these commands automatically during the first boot of the instance.
Java Web Project
Focused on Java backend technologies, trending internet tech, and the latest industry developments. The platform serves over 200,000 Java developers, inviting you to learn and exchange ideas together. Check the menu for Java learning resources.
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.
