Spin Up Ubuntu VMs Fast with Multipass – A Lightweight VMware Alternative
This guide introduces Multipass, a lightweight cross‑platform VM manager, walks through installation on Windows, demonstrates how to list, launch, and configure Ubuntu instances, shows essential commands for inspecting, pausing, restarting, deleting, and automating setups with cloud‑init, and compares it to paid tools like VMware Workstation.
When it comes to virtual machine tools, most people think of VMware Workstation, which is powerful and allows easy configuration changes, but it requires a paid license.
Multipass
A reader recently recommended Multipass, a lightweight command‑line VM management tool that runs on Linux, Windows, and macOS.
Getting Started
First, download and install Multipass from the official website for your operating system; the example uses Windows.
After installation, check the installed version:
$ multipass versionCreate an Ubuntu Virtual Machine
First, list the available Ubuntu images: $ multipass find The command returns a list of images, such as core18, core20, 16.04, 18.04, 20.04, etc.
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:plexmediaserver 20200812 Ubuntu Plex Media Server ApplianceCreate a new container named dg:
$ multipass launch --name dg
Launched: dgThen download the latest Ubuntu image and use it:
$ multipass exec dg -- lsb_release -d
Description: Ubuntu 18.04.4 LTSOperating the Virtual Machine
View VM List
After the VM is created, you can list all VMs:
Name State IPv4 Image
dg Running 192.168.24.5 Ubuntu 18.04 LTSThe VM is running with IP address 192.168.24.5.
View VM Information
Use the following command to see detailed information about the running 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
Open a shell inside the VM: $ multipass shell dg If you prefer not to enter the shell, you can run commands directly with exec.
Pause / Restart the VM
# Pause
$ multipass stop dg
# Start
$ multipass start dgDelete / Purge the VM
Deleting removes the VM entry, but the data remains until you purge it:
# Delete
$ multipass delete dg
# Purge
$ multipass purge dgConfigure Automation
To keep development and production environments consistent and save deployment time, you can use --cloud-init to initialize the container:
$ multipass launch --name ubuntu --cloud-init config.yamlThe config.yaml file might contain:
#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 runs commands on first boot.
Summary
After using Multipass for a while, I find it a great tool: it can spin up a Linux environment in minutes for small experiments, and it’s also handy for quickly setting up a local database cluster.
The only drawback is that Multipass only supports Ubuntu images because it is developed by Canonical, the company behind Ubuntu.
Related Links
Official site: https://multipass.run/
Documentation: https://multipass.run/docs/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
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.
