Multipass3 November 2026 · 5 min read
Reproducible Ubuntu dev VMs with Multipass and cloud-init
By Origin Clouds Engineering, Platform team
Containers solved shipping software, but many teams still need a full Linux machine for development: systemd services, kernel modules, nested virtualization, or tooling that assumes a real host. Multipass gives you one in a single command, and cloud-init makes it identical every time.
Describe the machine once
yaml
#cloud-config
package_update: true
packages:
- build-essential
- git
- jq
- qemu-system-x86
runcmd:
- [sh, -c, 'echo provisioned > /var/tmp/provisioned']Launch it
bash
multipass launch 24.04 --name dev \
--cpus 4 --memory 8G --disk 40G \
--cloud-init dev.yaml
multipass mount ./project dev:/home/ubuntu/project
multipass shell devThe mount keeps your editor on the host and your build inside the VM. For heavy I/O, such as large dependency trees, keep those directories inside the VM's own disk instead of the mount.
Snapshot a clean state
Snapshots let you get back to a freshly provisioned machine in seconds, which is perfect before trying a risky upgrade. Stop the instance first.
bash
multipass stop dev
multipass snapshot dev --name clean
# ...later
multipass restore dev.cleanRolling it out to a team
- Keep the cloud-init file in the repository it serves, and review changes like code
- Pin the Ubuntu release in the launch command so upgrades are a deliberate choice
- Use the same file for CI runners, so local and CI failures match
- Document resource sizes per role; a frontend dev and a kernel dev need different VMs
Running this in production?
We help teams design, harden and tune platforms like this one.
Talk to an engineer
Origin Clouds