How To Install libvirt-daemon on Ubuntu 20.04

In this tutorial we learn how to install libvirt-daemon on Ubuntu 20.04. libvirt-daemon is Virtualization daemon Virtualization daemon Virtualization daemon

Introduction

In this tutorial we learn how to install libvirt-daemon on Ubuntu 20.04.

What is libvirt-daemon

libvirt-daemon is:

Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). The library aims at providing a long term stable C API for different virtualization mechanisms. It currently supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.

This package contains the daemon libvirtd to manage the hypervisors.

Package: libvirt-daemon Architecture: amd64 Version: 6.0.0-0ubuntu8.3 Priority: optional Section: admin Source: libvirt Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Libvirt Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2091 Depends: libblkid1 (>= 2.17.2), libc6 (>= 2.14), libcap-ng0 (>= 0.7.9), libdbus-1-3 (>= 1.9.14), libdevmapper1.02.1 (>= 2:1.02.97), libfuse2 (>= 2.8), libgcc-s1 (>= 3.3.1), libglib2.0-0 (>= 2.30.0), libparted2 (>= 3.1), libpcap0.8 (>= 1.0.0), libpciaccess0, libselinux1 (>= 2.0.82), libudev1 (>= 183), libvirt0 (= 6.0.0-0ubuntu8.3), libxml2 (>= 2.9.2+really2.9.1+dfsg1-0.2), libvirt-daemon-driver-qemu Recommends: qemu-kvm | qemu (>= 0.9.1), libxml2-utils, netcat-openbsd, libvirt-daemon-driver-storage-rbd Suggests: libvirt-daemon-driver-lxc, libvirt-daemon-driver-vbox, libvirt-daemon-driver-xen, libvirt-daemon-driver-storage-gluster, libvirt-daemon-driver-storage-zfs, libvirt-daemon-system, numad Enhances: qemu, qemu-kvm, xen Filename: pool/main/libv/libvirt/libvirt-daemon_6.0.0-0ubuntu8.3_amd64.deb Size: 406292 MD5sum: 594eb528622077de68053ffde8cccddd SHA1: 27072c9583aa63d26e107811fa5432e90b099f48 SHA256: a9bb23398af385e6d7e2980473b5e51ef023b1e22417c5063205f7a132f83f2e SHA512: 6d15ae4495dfee0cdfe50be8aebcfa588cbf0cd276f88b6c2ef80f5575b1ea513ea6b5a35b249bdda8daefee39870d73b5c99dcb8cd06cb1b01aa5b0c4c0567e Homepage: https://libvirt.org/ Description-en: Virtualization daemon Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). The library aims at providing a long term stable C API for different virtualization mechanisms. It currently supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.

This package contains the daemon libvirtd to manage the hypervisors.

Package: libvirt-daemon Architecture: amd64 Version: 6.0.0-0ubuntu8 Priority: optional Section: admin Source: libvirt Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Libvirt Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2091 Depends: libblkid1 (>= 2.17.2), libc6 (>= 2.14), libcap-ng0 (>= 0.7.9), libdbus-1-3 (>= 1.9.14), libdevmapper1.02.1 (>= 2:1.02.97), libfuse2 (>= 2.8), libgcc-s1 (>= 3.3.1), libglib2.0-0 (>= 2.30.0), libparted2 (>= 3.1), libpcap0.8 (>= 1.0.0), libpciaccess0, libselinux1 (>= 2.0.82), libudev1 (>= 183), libvirt0 (= 6.0.0-0ubuntu8), libxml2 (>= 2.9.2+really2.9.1+dfsg1-0.2), libvirt-daemon-driver-qemu Recommends: qemu-kvm | qemu (>= 0.9.1), libxml2-utils, netcat-openbsd, libvirt-daemon-driver-storage-rbd Suggests: libvirt-daemon-driver-lxc, libvirt-daemon-driver-vbox, libvirt-daemon-driver-xen, libvirt-daemon-driver-storage-gluster, libvirt-daemon-driver-storage-zfs, libvirt-daemon-system, numad Enhances: qemu, qemu-kvm, xen Filename: pool/main/libv/libvirt/libvirt-daemon_6.0.0-0ubuntu8_amd64.deb Size: 404340 MD5sum: a28044cfcd934ea42f8f703520e6df02 SHA1: 8d4f85ed9d047e5348d16188ed7d858c1ef33aab SHA256: 8185b0413b851b28973a67ce9cf71d46d14286b2df38693ce1e07fb56008d783 Homepage: https://libvirt.org/ Description-en: Virtualization daemon Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). The library aims at providing a long term stable C API for different virtualization mechanisms. It currently supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.

This package contains the daemon libvirtd to manage the hypervisors.

There are three methods to install libvirt-daemon on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libvirt-daemon Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libvirt-daemon using apt-get by running the following command:

sudo apt-get -y install libvirt-daemon

Install libvirt-daemon Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libvirt-daemon using apt by running the following command:

sudo apt -y install libvirt-daemon

Install libvirt-daemon Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libvirt-daemon using aptitude by running the following command:

sudo aptitude -y install libvirt-daemon

How To Uninstall libvirt-daemon on Ubuntu 20.04

To uninstall only the libvirt-daemon package we can use the following command:

sudo apt-get remove libvirt-daemon

Uninstall libvirt-daemon And Its Dependencies

To uninstall libvirt-daemon and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove libvirt-daemon

Remove libvirt-daemon Configurations and Data

To remove libvirt-daemon configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge libvirt-daemon

Remove libvirt-daemon configuration, data, and all of its dependencies

We can use the following command to remove libvirt-daemon configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libvirt-daemon

References

Summary

In this tutorial we learn how to install libvirt-daemon package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.