Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Multipass

Multipass is the recommended method to create Ubuntu VMs on Ubuntu. It’s designed for developers who want a fresh Ubuntu environment with a single command and works on Linux, Windows and macOS.

On Linux it’s available as a snap:

sudo snap install multipass

Usage

Find available images

$ multipass find
Image                       Aliases           Version          Description
snapcraft:core18            18.04             20201111         Snapcraft builder for Core 18
snapcraft:core20            20.04             20210921         Snapcraft builder for Core 20
snapcraft:core22            22.04             20220426         Snapcraft builder for Core 22
snapcraft:devel                               20221128         Snapcraft builder for the devel series
core                        core16            20200818         Ubuntu Core 16
core18                                        20211124         Ubuntu Core 18
18.04                       bionic            20221117         Ubuntu 18.04 LTS
20.04                       focal             20221115.1       Ubuntu 20.04 LTS
22.04                       jammy,lts         20221117         Ubuntu 22.04 LTS
22.10                       kinetic           20221101         Ubuntu 22.10
daily:23.04                 devel,lunar       20221127         Ubuntu 23.04
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 Appliance
anbox-cloud-appliance                         latest           Anbox Cloud Appliance
charm-dev                                     latest           A development and testing environment for charmers
docker                                        latest           A Docker environment with Portainer and related tools
jellyfin                                      latest           Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media.
minikube                                      latest           minikube is local Kubernetes

Launch a fresh instance of the current Ubuntu LTS

$ multipass launch ubuntu
Launched: cleansing-guanaco

Check out the running instances

$ multipass list                                                  
Name                    State             IPv4             Image
cleansing-guanaco       Running           10.140.26.17     Ubuntu 22.04 LTS

Learn more about the VM instance you just launched

$ multipass info cleansing-guanaco 
Name:           cleansing-guanaco
State:          Running
IPv4:           10.140.26.17
Release:        Ubuntu 22.04.1 LTS
Image hash:     dc5b5a43c267 (Ubuntu 22.04 LTS)
Load:           0.45 0.19 0.07
Disk usage:     1.4G out of 4.7G
Memory usage:   168.3M out of 969.5M
Mounts:         --

Connect to a running instance

$ multipass shell cleansing-guanaco 
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-53-generic x86_64)
(...)
$

Don’t forget to logout (or Ctrl-D) or you may find yourself heading all the
way down the Inception levels… :wink:

Run commands inside an instance from outside

$ multipass exec cleansing-guanaco -- lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

Stop an instance to save resources

$ multipass stop cleansing-guanaco

Delete the instance

$ multipass delete cleansing-guanaco

It will now show up as deleted:

$ multipass list
Name                    State             IPv4             Image
cleansing-guanaco       Deleted           --               Not Available

And when you want to completely get rid of it:

$ multipass purge

Integrate into the rest of your virtualization

You might have other virtualization already based on libvirt either through using the similar older uvtool already or through the common virt-manager.

You might for example want those guests to be on the same bridge to communicate to each other or you need access to the graphical output for some reason.

Fortunately it is possible to integrate this by using the libvirt backend of multipass

$ sudo multipass set local.driver=libvirt

After that when you start a guest you can also access it via tools like virt-manager or virsh

$ multipass launch ubuntu
Launched: engaged-amberjack 

$ virsh list
 Id    Name                           State
----------------------------------------------------
 15    engaged-amberjack              running

Get help


multipass help
multipass help <command>

See the multipass documentation for more details.

Last updated a month ago. Help improve this document in the forum.