Uninstall KVM without affecting LXD

This is a bit of a noob question, so apologies, but anyway…

I previously used KVM for virtualisation on my Ubuntu server. I’ve since switched over to exclusively using LXD containers and so am now looking to clean up the server by removing KVM.

I want to make sure in doing so I don’t affect LXD.

The Ubuntu documentation lists the packages qemu-kvm, libvirt-daemon-system, libvirt-clients and bridge-utils as being required for an Ubuntu server installation (18.10+). I recently upgraded my server to Ubuntu 20.04.

I use Linux bridges for my LXD containers so I won’t uninstall bridge-utils. If I simply remove the other three packages - qemu-kvm, libvirt-daemon-system and libvirt-clients - will this cause any issues for LXD?

LXD has been installed on my system via snap and is currently version 4.6.


Everything LXD needs is directly in the snap package.

That’s the nice thing with the snap, it may be heavy but we don’t depend on any bits from the host distribution, making it possible to run on all kind of distribution and releases without having to test compatibility with the packages on the host system.

If your bridges are managed by LXD directly, then you don’t even need bridge-utils.
If those are manually created bridges outside of LXD, then this may indeed be used by whatever script or network configuration tooling you may be using.

1 Like

Excellent, thanks so much for the reply.

I asked my question because I’m aware that LXD uses qemu for its VMs, and the libvirt library says it supports LXC, so I was concerned that there may be some linkages broken when removing KVM. It’s comforting to know that LXD is self-contained.

The bridges I use for LXD are created via netplan, and some further research shows that bridge-utils is not strictly needed in that case but is helpful for debugging, so I will still keep that package.

Again, thanks for the great support. I’ve now got 5 containers running for various services that were previously on the host or in VMs, and I think LXD is just brilliant.

1 Like