Multipass is a quick and easy way to launch virtual machines running Ubuntu. It uses “cloud-init” standard to install and configure all the necessary parts automatically.
Let’s install Multipass from Snap and launch a new VM using “charm-dev” cloud-init config:
sudo snap install multipass multipass launch -c 4 -m 8G -d 10G -n my-vm charm-dev # tune CPU/RAM/HDD accordingly to your needs
Note: all ‘multipass launch’ parameters are described here.
Multipass list of commands is short and self-explanatory, e.g. show all running VMs:
As soon as new VM started, enter inside using:
multipass shell my-vm
Note: if at any point you’d like to leave Multipass VM, enter
Ctrl+d or type
All the necessary parts have been pre-installed inside VM already, like Microk8s and Juju (files ‘/var/log/cloud-init.log’ and ‘/var/log/cloud-init-output.log’ contains all low-level installation details). Inside VM, Juju can be used out of the box:
juju status juju deploy ...
If you’re done with testing and would like to free up resources on your machine, just remove Multipass VM.
Warning: when you remove VM as shown below you will lose all the data and all applications inside Multipass VM!
multipass delete --purge my-vm