1

I am running an Ubuntu 22.04 (KDE Neon) on an Intel Haswell i5-4570 CPU. I installed Virtualbox (6.1.38-dfsg-3~ubuntu1.22.04.1) to be able to run the occasional Windows application, and I installed Canonical's Multipass (snap, 1.11.0) to quickly and automatically create, bootstrap and discard Ubuntu VMs for software development and testing.

The problem is, these two systems cannot run at the same time in the default configuration, where Multipass uses the qemu driver. There is a qemu process which - I think - hogs the virtualization capabilities of the CPU:

/snap/multipass/8465/usr/bin/qemu-system-x86_64 -bios OVMF.fd 
  --enable-kvm -cpu host 
  -nic tap,ifname=tap-cd3bd910945,script=no,downscript=no,model=virtio-net-pci,mac=52:54:00:a8:fa:0f 
  -device virtio-scsi-pci,id=scsi0 
  -drive file=/var/snap/multipass/common/data/multipassd/vault/instances/testnc/ubuntu-22.04-server-cloudimg-amd64.img,if=none,format=qcow2,discard=unmap,id=hda
  -device scsi-hd,drive=hda,bus=scsi0.0
  -smp 1 -m 4096M -qmp stdio -chardev null,id=char0 -serial chardev:char0
  -nographic
  -cdrom /var/snap/multipass/common/data/multipassd/vault/instances/testnc/cloud-init-config.iso

While this process is running, Virtualbox VMs can resume, but cannot start, they are then frozen and unusable.

How do I configure multipass and Virtualbox to be able to run VMs at the same time?

I know that Multipass can use a Virtualbox backend, but this seems to be usable only for MacOS and also includes a performance penalty (?). There is an option to use a "libvirt" driver for Multipass instead but this requires additional libraries to be installed (~120MB) and unless I know this helps I'm hesitant to try it out.

Jens
  • 133
  • 5

1 Answers1

2

Answer : They can both exist on the same computer, just can't both run at the same time.

Bug report MultiPass services and VirtualBox cannot run simultaneously #1386 defines the problem:

Currently it is impossible to use VirtualBox and MultiPass at the same time because VirtualBox machines will fail to start while multipass services are running, due to competition over resources (presumably).

The answer was :

If qemu is running, then VirtualBox cannot run and vice versa. This is not an issue in Multipass, but is just a problem in general. The solution would be for Multipass to use VirtualBox as a backend as that bug is requesting.

The same problem is the subject of Add support for VirtualBox backend on Linux #1289, where the following was posted as workaround:

My workaround is if I want to use VirtualBox I quit Multipass.

Explicitely, it is multipass stop --all.

harrymc
  • 498,455