LinuxCommandLibrary

multipass

Create and manage virtual machines

TLDR

List the aliases that can be used to launch an instance

$ multipass find
copy

Launch a new instance, set its name and use a cloud-init configuration file
$ multipass launch [[-n|--name]] [instance_name] --cloud-init [configuration_file]
copy

List all the created instances and some of their properties
$ multipass list
copy

Start a specific instance by name
$ multipass start [instance_name]
copy

Show the properties of an instance
$ multipass info [instance_name]
copy

Open a shell prompt on a specific instance by name
$ multipass shell [instance_name]
copy

Delete an instance by name
$ multipass delete [instance_name]
copy

Mount a directory into a specific instance
$ multipass mount [path/to/local/directory] [instance_name]:[path/to/target/directory]
copy

SYNOPSIS

multipass [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS] [ARGS...]

PARAMETERS

-h, --help
    Show help message and exit. Can be used with global command or specific subcommands (e.g., multipass launch --help).

-v, --verbose
    Enable verbose output, providing more detailed information about operations.

-q, --quiet
    Suppress most output, showing only critical errors or results.

--version
    Display the multipass version information and exit.

--timeout
    Set a timeout in seconds for a specific command to complete.

--format
    Specify the output format for commands that display data, such as 'json' or 'yaml'.

DESCRIPTION

multipass is a command-line utility developed by Canonical that provides a quick and easy way to launch, manage, and interact with Ubuntu virtual machines. It aims to simulate a fresh Ubuntu environment on your local machine, whether it's Linux, macOS, or Windows.

It handles the entire VM lifecycle from downloading the image, launching the instance, and providing shell access, to stopping and deleting the instances. multipass abstracts away the complexities of underlying hypervisors (like KVM, Hyper-V, or VirtualBox), offering a consistent interface for developers and testers to spin up Ubuntu instances quickly for various tasks, such as testing software, experimenting with new features, or running development environments.

CAVEATS

multipass relies on an underlying hypervisor, which must be installed and properly configured on your system (e.g., KVM on Linux, Hyper-V on Windows, or VirtualBox/QEMU on any supported OS). Performance can vary based on the chosen hypervisor and host system resources. While designed for simplicity, advanced networking configurations can sometimes be challenging. Instances are typically ephemeral, so persistent data should be handled carefully (e.g., via mounts or backups).

COMMON COMMANDS

multipass operates using a set of subcommands to manage instances:
launch [image] [--name ] [--cpus ] [--mem ] [--disk ]: Launch a new Ubuntu instance.
list: List all instances and their states.
start : Start a stopped instance.
stop : Stop a running instance.
shell : Open a shell into an instance.
exec -- : Execute a command inside an instance.
delete : Delete an instance (moves to trash).
purge: Permanently delete all instances from trash.
mount [:]: Mount a local directory into an instance.
transfer : or : : Transfer files between host and instance.

HYPERVISOR SUPPORT

multipass can utilize various hypervisors depending on the operating system:
Linux: KVM (via qemu-kvm) is preferred and default.
macOS: QEMU and VirtualBox are supported.
Windows: Hyper-V (default) and VirtualBox are supported.
Users can explicitly select a driver using the multipass set driver= command.

HISTORY

Developed by Canonical, the company behind Ubuntu, multipass was first introduced to provide a frictionless way for developers to get fresh Ubuntu environments. It gained traction for its simplicity, abstracting away much of the complexity associated with traditional VM management tools. Its development is ongoing, with continuous improvements in hypervisor support, performance, and feature set, aiming to be the go-to tool for quick Ubuntu instance provisioning.

SEE ALSO

virsh(1), vagrant(1), qemu(1), docker(1)

Copied to clipboard