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 driver.

Install an alternative driver

Warning

Support for libvirt driver will be deprecated and removed in a future release.

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.

Note

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, …

Virtual Machine Manager GUI

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.

Note

This will make you lose any customisations you made to the instance in libvirt. [/note]