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

How to set up the driver

See also: Driver, local.driver

This document demonstrates how to choose, set up, and manage the drivers behind Multipass. Multipass already has sensible defaults, so this is an optional step.

Default driver

By default, Multipass on Linux uses the qemu or lxd driver (depending on the architecture).

Install an alternative driver

If you want more control over your VMs after they are launched, you can also use the experimental libvirt driver.

To install libvirt, run the following command (or use the equivalent for your Linux distribution):

sudo apt install libvirt-daemon-system

Now you can switch the Multipass driver to libvirt. First, enable Multipass to use your local libvirt by connecting to the libvirt interface/plug:

sudo snap connect multipass:libvirt

Then, stop all instances and tell Multipass to use libvirt, running the following commands:

multipass stop --all
multipass set local.driver=libvirt

All your existing instances will be migrated and can be used straight away.

You can still use the multipass client and the tray icon, and any changes you make to the configuration of the instance in libvirt will be persistent. They may not be represented in Multipass commands such as multipass info, though.

Use the driver to view Multipass instances

You can view instances with libvirt in two ways, using the virsh CLI or the virt-manager GUI.

To use the virsh CLI, launch an instance and then run the command virsh list (see man virsh for a command reference):

virsh list                             

The output will be similar to the following:

 Id   Name                   State
--------------------------------------
 1    unaffected-gyrfalcon   running

Alternatively, to use the virt-manager GUI, …

obraz

Use VirtualBox to set up port forwarding for a Multipass instance

This option only applies to macOS and Windows systems.

Use VirtualBox to set up network bridging for a Multipass instance

This option only applies to macOS systems.

Switch back to the default driver

See also: stop, local.driver

To switch back to the default qemu driver, first you need to stop all instances again:

multipass stop --all
multipass set local.driver=qemu

Here, too, existing instances will be migrated.

This will make you lose any customisations you made to the instance in libvirt.


Errors or typos? Topics missing? Hard to read? Let us know or open an issue on GitHub.

Last updated 6 months ago. Help improve this document in the forum.