Multipass a dead simple, cross-platform way of running Ubuntu virtual machines, including Ubuntu Core.

In this post we’ll show you how to get Ubuntu Core running on Multipass. If you’re not familiar with Multipass, it’s a tool for running Ubuntu virtual machines. It’s similar to VirtualBox or VMWare; however currently it only supports Ubuntu virtual machiens. It’s definitely the easiest way of getting Ubuntu Core up and running. Also, it’s available on Windows, Mac and all major Linux distros.

Step 0: Get Multipass installed

If you are running widows or Mac you can get the installers here: Windows installer & Mac Install

Linux Install instructions:

If you don’t have multipass already installed on your system run the following command. snap install multipass --edge --classic It’s important to note that the --classic flag installs multipass with no confinement (you can read more about snap confinement here).

Step 1: Launch the Ubuntu Core Instance

If you run multipass find you’ll gett a list of available images. The output should be similar to below:

Image                   Aliases           Version          Description
snapcraft:core          core16            20191025         Snapcraft builder for Core 16
snapcraft:core18                          20191025         Snapcraft builder for Core 18
core                    core16            20190806         Ubuntu Core 16
core18                                    20190806         Ubuntu Core 18
16.04                   xenial            20191024         Ubuntu 16.04 LTS
18.04                   bionic,lts        20191021         Ubuntu 18.04 LTS
19.04                   disco             20191022         Ubuntu 19.04
19.10                   eoan              20191023         Ubuntu 19.10
daily:20.04             devel,focal       20191029         Ubuntu 20.04 LTS     

We’re specifically interested in core and core18. To lauch your vm run: multipass launch -n my-ubunutu-core core18. It will take a bit to down load the image and launch it. (You can name your vm anything you want; you don’t have to use “my-ubuntu-core”.)

Step 2: Logging in

To connect to your vm you’ll type multipass shell my-ubuntu-core And that’s it! You not have Ubuntu Core running in a VM.

Step 3: Transferring file to the vm (bonus step :)

One common workflow that would take advantage of this setup would be to build a snap, copy it into the vm and then install it for testing purposes. The transfer subcommand for multipass allows you to copy files to and from the vm. Here’s an example: