Convert Figma logo to code with AI

canonical logomultipass

Multipass orchestrates virtual Ubuntu instances

7,789
643
7,789
481

Top Related Projects

26,246

Vagrant is a tool for building and distributing development environments.

:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:

5,336

Little helper to run CNCF's k3s in Docker

13,406

Kubernetes IN Docker - local clusters for testing Kubernetes

14,984

Linux virtual machines, with a focus on running containers

Quick Overview

Multipass is an open-source tool developed by Canonical that allows users to quickly create, manage, and use Ubuntu virtual machines on various operating systems. It provides a lightweight, easy-to-use solution for developers and system administrators to set up isolated environments for testing, development, and experimentation.

Pros

  • Cross-platform compatibility (Windows, macOS, and Linux)
  • Simple and intuitive command-line interface
  • Seamless integration with Ubuntu images and packages
  • Efficient resource management and quick VM creation

Cons

  • Limited to Ubuntu-based virtual machines
  • May require more system resources compared to container-based solutions
  • Less flexibility in customization compared to full-fledged hypervisors
  • Learning curve for users unfamiliar with command-line tools

Getting Started

To get started with Multipass, follow these steps:

  1. Install Multipass from the official website: https://multipass.run/

  2. Launch a new Ubuntu VM:

multipass launch --name my-vm
  1. Access the VM shell:
multipass shell my-vm
  1. List all running VMs:
multipass list
  1. Stop and delete a VM:
multipass stop my-vm
multipass delete my-vm
multipass purge

For more advanced usage and configuration options, refer to the official Multipass documentation: https://multipass.run/docs

Competitor Comparisons

26,246

Vagrant is a tool for building and distributing development environments.

Pros of Vagrant

  • Supports multiple providers (VirtualBox, VMware, Hyper-V, etc.)
  • More extensive configuration options and customization
  • Larger ecosystem with a wide range of pre-built boxes

Cons of Vagrant

  • Steeper learning curve for beginners
  • Requires more system resources due to full VM virtualization
  • Slower startup times compared to lightweight alternatives

Code Comparison

Multipass:

multipass launch ubuntu
multipass shell ubuntu

Vagrant:

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/bionic64"
  config.vm.provision "shell", inline: "echo Hello, World!"
end

Key Differences

  • Multipass focuses on quick, lightweight Ubuntu VMs, while Vagrant offers more flexibility for various OS and configurations
  • Vagrant uses a Vagrantfile for configuration, whereas Multipass relies on command-line options
  • Multipass is designed specifically for Ubuntu, while Vagrant supports a wide range of operating systems

Use Cases

  • Multipass: Ideal for quick Ubuntu development environments and testing
  • Vagrant: Better suited for complex, multi-machine setups and cross-platform development

Community and Ecosystem

  • Vagrant has a larger community and more extensive plugin ecosystem
  • Multipass is newer but growing, with strong backing from Canonical

:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:

Pros of Docker CE

  • Widely adopted containerization platform with extensive ecosystem
  • Supports multiple operating systems and cloud platforms
  • Lightweight and efficient resource utilization

Cons of Docker CE

  • More complex setup and configuration compared to Multipass
  • Requires more system resources for running containers
  • Potential security concerns due to shared kernel with host

Code Comparison

Multipass:

multipass launch --name myvm
multipass shell myvm

Docker CE:

docker run -it --name mycontainer ubuntu
docker exec -it mycontainer /bin/bash

Summary

Multipass and Docker CE are both tools for creating and managing virtualized environments, but they serve different purposes. Multipass focuses on quickly spinning up lightweight Ubuntu VMs, while Docker CE is a comprehensive containerization platform. Multipass is simpler to use and provides full VM isolation, making it ideal for development and testing. Docker CE offers greater flexibility and portability for application deployment across various environments. The choice between the two depends on specific use cases and requirements.

5,336

Little helper to run CNCF's k3s in Docker

Pros of k3d

  • Lightweight and focused specifically on Kubernetes development
  • Faster setup and teardown of clusters
  • Supports multi-node clusters and custom images

Cons of k3d

  • Limited to container-based virtualization
  • Less flexibility for general-purpose development environments
  • Requires Docker to be installed and running

Code Comparison

k3d:

k3d cluster create mycluster
k3d kubeconfig get mycluster > kubeconfig
export KUBECONFIG=./kubeconfig
kubectl get nodes

Multipass:

multipass launch --name k8s-node
multipass exec k8s-node -- sudo snap install microk8s --classic
multipass exec k8s-node -- sudo microk8s status --wait-ready
multipass exec k8s-node -- sudo microk8s kubectl get nodes

Summary

k3d is a specialized tool for Kubernetes development, offering quick cluster creation and management. It's ideal for developers focused on Kubernetes workloads but requires Docker and has a narrower scope.

Multipass provides a more versatile virtual machine solution, supporting various Linux distributions and use cases beyond Kubernetes. It offers greater flexibility but may require more setup time for specific development environments.

The choice between k3d and Multipass depends on the specific needs of the project and the developer's preference for container-based or VM-based solutions.

13,406

Kubernetes IN Docker - local clusters for testing Kubernetes

Pros of kind

  • Specifically designed for Kubernetes development and testing
  • Faster cluster creation and teardown compared to Multipass
  • Supports multi-node clusters out of the box

Cons of kind

  • Limited to running Kubernetes environments only
  • Requires Docker to be installed and running on the host system
  • Less flexible for general-purpose VM management

Code Comparison

kind:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker

Multipass:

multipass launch -n my-instance
multipass exec my-instance -- sudo apt-get update
multipass exec my-instance -- sudo apt-get install -y docker.io

Key Differences

  1. Purpose: kind is focused on Kubernetes development, while Multipass is a general-purpose VM manager.
  2. Technology: kind uses Docker containers to simulate nodes, Multipass creates lightweight VMs.
  3. Flexibility: Multipass offers more versatility for various development environments, kind is Kubernetes-specific.
  4. Resource usage: kind is generally lighter on resources due to its container-based approach.
  5. Learning curve: kind may be easier for those already familiar with Kubernetes, while Multipass has a gentler learning curve for general VM management.

Both tools have their strengths, and the choice between them depends on the specific use case and development requirements.

14,984

Linux virtual machines, with a focus on running containers

Pros of Lima

  • Native macOS support with better integration and performance
  • More flexible configuration options and customization
  • Supports a wider range of Linux distributions

Cons of Lima

  • Limited to macOS, not cross-platform like Multipass
  • Less mature project with potentially fewer resources and community support
  • May require more manual setup and configuration

Code Comparison

Lima configuration example:

images:
- location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
  arch: "x86_64"

Multipass launch command:

multipass launch --name myvm ubuntu

Summary

Lima offers more flexibility and native macOS integration, while Multipass provides a simpler, cross-platform solution. Lima's configuration-based approach allows for more customization, but may require more setup. Multipass focuses on ease of use and quick VM deployment across different operating systems. Choose Lima for macOS-specific needs and advanced configurations, or Multipass for a straightforward, cross-platform virtual machine solution.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

What is Multipass?

Multipass is a lightweight VM manager for Linux, Windows and macOS. It's designed for developers who want to spin up a fresh Ubuntu environment with a single command. It uses KVM on Linux, Hyper-V on Windows and QEMU on macOS to run virtual machines with minimal overhead. It can also use VirtualBox on Windows and macOS. Multipass will fetch Ubuntu images for you and keep them up to date.

Since it supports metadata for cloud-init, you can simulate a small cloud deployment on your laptop or workstation.

Project status

ServiceStatus
CIBuild Status
SnapBuild Status
CodecovCodecov Status

Installation

  • On Linux, Multipass is available as a snap:

    sudo snap install multipass
    
  • On macOS, you can download the installer from GitHub or use Homebrew:

    brew install --cask multipass
    

    Please note that you may be required to enter your password for some sudo operations during installation. You may also need to disable the firewall to launch a multipass instance successfully on macOS.

  • On Windows, download the installer from GitHub.

For more information, see How to install Multipass.

Usage

Here are some pointers to get started with Multipass. For a more comprehensive learning experience, please check out the Multipass Tutorial.

Find available images

$ multipass find

Image                       Aliases           Version          Description
20.04                       focal             20240731         Ubuntu 20.04 LTS
22.04                       jammy             20240808         Ubuntu 22.04 LTS
24.04                       noble,lts         20240806         Ubuntu 24.04 LTS

Blueprint                   Aliases           Version          Description
anbox-cloud-appliance                         latest           Anbox Cloud Appliance
charm-dev                                     latest           A development and testing environment for charmers
docker                                        0.4              A Docker environment with Portainer and related tools
jellyfin                                      latest           Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media.
minikube                                      latest           minikube is local Kubernetes
ros-noetic                                    0.1              A development and testing environment for ROS Noetic.
ros2-humble                                   0.1              A development and testing environment for ROS 2 Humble.

Launch a fresh instance of the current Ubuntu LTS

$ multipass launch lts

Launched: dancing-chipmunk

Check out the running instances

$ multipass list

Name                    State             IPv4             Image
dancing-chipmunk        Running           192.168.64.8     Ubuntu 24.04 LTS
phlegmatic-bluebird     Stopped           --               Ubuntu 22.04 LTS
docker                  Running           192.168.64.11    Ubuntu 22.04 LTS
                                          172.17.0.1               

Learn more about an instance

$ multipass info dancing-chipmunk

Name:           dancing-chipmunk
State:          Running
Snapshots:      0
IPv4:           192.168.64.8
Release:        Ubuntu 24.04 LTS
Image hash:     e2608bfdbc44 (Ubuntu 24.04 LTS)
CPU(s):         1
Load:           5.70 4.58 2.63
Disk usage:     3.3GiB out of 4.8GiB
Memory usage:   769.0MiB out of 953.0MiB
Mounts:         --

Connect to a running instance

$ multipass shell dancing-chipmunk

Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-39-generic aarch64)
...

Don't forget to logout (or Ctrl-D) or you may find yourself heading all the way down Inception levels... ;)

Run commands inside an instance from outside

$ multipass exec dancing-chipmunk -- lsb_release -a

No LSB modules are available.
Distributor ID:  Ubuntu
Description:     Ubuntu 24.04 LTS
Release:         24.04
Codename:        noble

Stop an instance to save resources

$ multipass stop dancing-chipmunk

Delete an instance

$ multipass delete dancing-chipmunk

The instance will now show up as deleted:

$ multipass list

Name                    State             IPv4             Image
dancing-chipmunk        Deleted           --               Ubuntu 24.04 LTS
phlegmatic-bluebird     Stopped           --               Ubuntu 22.04 LTS
docker                  Running           192.168.64.11    Ubuntu 22.04 LTS
                                          172.17.0.1               

If you want to completely get rid of it:

$ multipass purge

Get help

multipass help
multipass help <command>

Start developing Multipass

Here's a set of steps to build the Multipass source code on Linux.

Please note that these instructions do not support building packages for macOS or Windows systems.

Build dependencies

cd <multipass>
sudo apt install devscripts equivs
mk-build-deps -s sudo -i

Build Multipass

cd <multipass>
git submodule update --init --recursive
mkdir build
cd build
cmake ../
make

Please note that if you're working on a forked repository that you created using the "Copy the main branch only" option, the repository will not include the necessary git tags to determine the Multipass version during CMake configuration. In this case, you need to manually fetch the tags from the upstream by running git fetch --tags https://github.com/canonical/multipass.git in the <multipass> source code directory.

Run the Multipass daemon and client

First, install Multipass's runtime dependencies. On AMD64 architecture, you can do this with:

sudo apt update
sudo apt install libgl1 libpng16-16 libqt6core6 libqt6gui6 \
    libqt6network6 libqt6widgets6 libxml2 libvirt0 dnsmasq-base \
    dnsmasq-utils qemu-system-x86 qemu-utils libslang2 iproute2 \
    iptables iputils-ping libatm1 libxtables12 xterm

Then run the Multipass daemon:

sudo <multipass>/build/bin/multipassd &

Copy the desktop file that Multipass clients expect to find in your home:

mkdir -p ~/.local/share/multipass/
cp <multipass>/data/multipass.gui.autostart.desktop ~/.local/share/multipass/

Optionally, enable auto-complete in Bash:

source <multipass>/completions/bash/multipass

Now you can use the multipass command from your terminal (for example <multipass>/build/bin/multipass launch --name foo) or launch the GUI client with the command <multipass>/build/bin/multipass.gui.

Contributing guidelines

The Multipass team appreciates contributions to the project, through pull requests, issues, or discussions and questions on the Discourse forum.

Please read the following guidelines carefully before contributing to the project.

Code of Conduct

When contributing, you must adhere to the Code of Conduct.

Copyright

The code in this repository is licensed under GNU General Public License v3.0. See LICENSE for more information.

License agreement

All contributors must sign the Canonical contributor license agreement (CLA), which gives Canonical permission to use the contributions. Without the CLA, contributions cannot be accepted.

Pull requests

Changes to this project should be proposed as pull requests. Proposed changes will then go through review and once approved, be merged into the main branch.

Additional information

Multipass documentation