Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

  1. Blog
  2. Article

Joshua Powers
on 2 April 2018


This article originally appeared on Joshua Powers’ blog

cloud-init + Multipass

Multipass is a quick and easy way to launch virtual machine instances running Ubuntu. Cloud-init is the standard for customizing cloud instances and now Multipass can also make use of cloud-init to customize an instance during launch.

Below is an example of launching a new VM with cloud-init user-data:

multipass launch -n my-test-vm --cloud-init cloud-config.yaml

user-data Format

Currently Multipass only supports YAML cloud-config files. Passing a script, a MIME archive, or any of the other user-data formats cloud-init supports will result in an error from the YAML syntax validator. Check out the cloud-init docs for examples of YAML cloud-config.

YAML Syntax Validation

Multipass will validate the YAML syntax of the cloud-config file before attempting to start the VM! A nice addition to help save time when experimenting with launching instances with various cloud-configs.

vendor-data

Multipass uses cloud-init to pass in vendor-data to setup the VM for access by the user. If the user overrides any of the required keys (e.g. packages, ssh_authorized_keys, users, etc.) in his or her user-data then Multipass will merge its own data so that the end-user will not lose access to the system.

If interested, a user can examine the executed user-data and vendor-data by looking at the files in /var/lib/cloud/instances/.

Got Questions?

As always, you can chat with the cloud-init developers in #cloud-init on Freenode or email the cloud-init mailing list.

The Multipass team is also on Freenode at #multipass and to view the code and report bugs check them out on GitHub.

Related posts


Nathan Hart
28 January 2022

Single-command Docker environments on any machine with Multipass

Ubuntu Article

Multipass has a new workflow tailored to run Docker containers on macOS, Windows or Linux. One single command, no dependencies, full flexibility. Multipass exists to bring Ubuntu-based development to the operating system of your choice. Whether you prefer the GUI of macOS (even on M1), Windows or any other Linux, the unmatched experience ...


Nathan Hart
23 December 2021

How-To: Docker on Windows and Mac with Multipass

Tutorials Article

Update: there is now a more streamlined way to run Docker on Multipass – see this tutorial for more details. Original blog below: If you’re looking for an alternative to Docker Desktop or to integrate Docker into your Multipass workflow, this how-to is for you.  Multipass can host a docker engine inside an Ubuntu VM ...


Oliver Smith
17 May 2024

Migrating from CentOS to Ubuntu: a guide for system administrators and DevOps

Cloud and server Article

CentOS 7 is on track to reach its end-of-life (EoL) on June 30, 2024. Post this date, the CentOS Project will cease to provide updates or support, including vital security patches. Moving away from the RHEL-based ecosystem might appear daunting, but if you’re considering Ubuntu the switch can be both straightforward and economically viabl ...