Chris Townsend, engineering manager for Canonical's Multipass team, joins Bret and Nirmal to discuss using Multipass as the easiest local VM for Docker and Kubernetes. They explore automating VM creation, virtualization backends, networking options, and Multipass blueprints. They also cover running Docker in a VM while using it from the host, spinning up Ubuntu with FitElement, using PowerShell with Hyper-V, assuming prior knowledge, exposing Multi-Pass to networks, running multi-architecture VMs, and upcoming features.
Multipass is a tool that allows for quick creation of local virtual machines of Ubuntu, making it easy for Windows and macOS users.
Multipass offers features like file transfer and the ability to mount local directories into instances, facilitating efficient collaboration and file sharing.
Deep dives
Overview of Multi-pass and its Origin Story
Multi-pass is a tool developed by Canonical that allows for the quick creation of local virtual machines of Ubuntu. It was created to make it easy for people on Windows and macOS machines to have Ubuntu running without the need for complex setups. The goal was to provide a simple CLI with default resources and assumptions, allowing users to get started quickly. Multi-pass supports different hypervisors such as QEMU, LXD, Hyper-V, and VirtualBox on different platforms. The focus is on simplicity, multi-platform support, and providing a clean user experience.
Interacting with Multi-pass Instances
Users can interact with Multi-pass instances using commands like 'multi-pass shell' or 'multi-pass exec'. The 'shell' command provides access to the actual shell of the instance, allowing users to perform tasks within the Linux machine. The 'exec' command executes commands within the instance, while still maintaining the context of the host command line. Multi-pass also offers features like file transfer, allowing users to copy files in and out of the instances. Additionally, it provides the ability to mount local directories into the instances, making it easy to work with shared files.
Networking and Hypervisor Support
Multi-pass sets up a local natted network on Linux, allowing instances to communicate with each other and the host machine. On Windows, Multi-pass supports both Hyper-V and VirtualBox, each with their own networking implementations. For Mac, Multi-pass uses the VM net virtualization network provided by the macOS hypervisor framework. Multi-pass supports Ubuntu cloud images by default and provides the ability to use other distros by specifying the image URL or local file path. The drivers used by Multi-pass vary depending on the platform and can include QEMU, LXD, Hyper-V, and VirtualBox.
Future Developments and Features
The Multi-pass team is working on exciting new features to enhance the user experience. They are developing a graphical user interface (GUI) that aims to be as clean and opinionated as the CLI. Snapshotting of VMs is another major feature in the works, making it easier for users to manage and roll back VM states. Additionally, Multi-pass plans to introduce cloning of VMs, allowing users to create copies of base VMs with pre-installed software. These upcoming features and many more demonstrate the continued commitment of the Multi-pass team to improving the tool and providing a seamless VM experience.
Bret and Nirmal are joined by Chris Townsend, the engineering manager for Canonical's Multipass team, to discuss how to use Multipass as the easiest local virtual machine for Docker, Kubernetes and more!
Multipass is my go-to solution for quickly creating local virtual machines of Ubuntu. I teach it in my courses, I've used it for many years, and I was excited to have Chris on to talk about the ways to automate the creation of a VM in Multipass, and dig into the various virtualization, backends and networking options.
We also talk about Multipass blueprints where in a demo, he shows off how to create a VM with Docker installed in a single command. It actually reminds me of Docker Machine, if you've been around a while. That also mounts your code directly into the VM and sets a host alias so that the Docker commands will pass through to Docker in the VM transparently.
If you can imagine that it basically means that you can run Docker in the VM and use it from the host as if it isn't in a VM. And then we had some great audience questions about various features of Multipass and how to use it for multi-node clustering and exposing VMs to your local network.
Live recording of the complete show from September 21, 2023 is on YouTube (Ep. #235). Includes demos.