Getting Started with Multipass: Installing, Creating, and Managing Ubuntu Virtual Machines
This tutorial introduces Multipass, a lightweight cross‑platform VM manager, and walks through downloading, installing, checking the version, listing available Ubuntu images, launching a VM, inspecting and controlling it, and automating setup with cloud‑init configuration.
Hello everyone, I'm Chen. When it comes to virtual machine tools, most people think of VMware, which is powerful but requires a paid license.
Multipass is a lightweight, cross‑platform command‑line tool for managing VMs on Linux, Windows, and macOS.
First, download and install Multipass for your operating system (the example uses Windows).
After installation, check the installed version:
$ multipass versionFind the available Ubuntu images:
$ multipass findLaunch a new Ubuntu container named dg :
$ multipass launch --name dgVerify the VM is running and view its IP address:
Name State IPv4 Image
DG Running 192.168.24.5 Ubuntu 18.04 LTSGet detailed information about the VM:
$ 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.7MEnter the VM shell:
$ multipass shell dgPause or restart the VM:
# Pause
$ multipass stop dg
# Start
$ multipass start dgDelete and purge the VM:
# Delete
$ multipass delete dg
# Purge
$ multipass purge dgAutomate VM initialization with --cloud-init and a YAML config file:
$ multipass launch --name ubuntu --cloud-init config.yamlExample config.yaml content:
#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.debMultipass is convenient for quick Linux experiments and can be used to set up small database clusters locally.
The only limitation is that Multipass currently supports only Ubuntu images, as it is developed by Canonical.
Code Ape Tech Column
Former Ant Group P8 engineer, pure technologist, sharing full‑stack Java, job interview and career advice through a column. Site: java-family.cn
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.