Last updated on February 21, 2016 by Dan Nanni
virt-manager is a GUI-based virtual machine manager which allows you to create and manage (local or remote) virtual machines and containers via libvirt APIs. It supports multiple hypervisors such as KVM, QEMU, Xen, as well as LXC containers. While virt-manager is available in most distros' base repositories, the pre-built virt-manager package always falls behind the latest releases available from the official website. For example, Ubuntu 15.10 and Debian 8 come with virt-manager 1.1, while the latest virt-manager is version 1.3.2.
If you want to try the latest and greatest features of virt-manager, you need to build and install it from the source. In this post, I show how to compile virt-manager on Debian, Ubuntu or Linux Mint. If you want to build virt-manager on Red Hat based distribution, refer to this tutorial instead.
Before you start, you need to uninstall the existing virt-manager if you have already installed it from your distro's repositories.
$ sudo apt-get remove virt-manager
Next, set up the build environment for virt-manager and install any necessary prerequisites.
$ sudo apt-get build-dep virt-manager $ sudo apt-get install python-libvirt libgtk-3-dev libvirt-glib-1.0 gir1.2-gtk-vnc-2.0 gir1.2-spice-client-gtk-3.0 libosinfo-1.0 python-ipaddr gir1.2-vte-2.90 python-libxml2 python-requests
Finally, download the latest source and install it as follows.
$ wget https://virt-manager.org/download/sources/virt-manager/virt-manager-1.3.2.tar.gz $ tar -xf virt-manager-1.3.2.tar.gz $ cd virt-manager-1.3.2 $ sudo python setup.py install
To launch virt-manager from the command line:
Here are solutions to various errors that you may encounter while building virt-manager from the source on a Debian-based distro.
$ sudo apt-get install python-libvirt
$ sudo apt-get install python-libxml2
$ sudo apt-get install python-requests
$ sudo apt-get install gir1.2-gtk-vnc-2.0
$ sudo apt-get install gir1.2-spice-client-gtk-3.0
$ sudo apt-get install libvirt-glib-1.0
$ sudo apt-get install libosinfo-1.0
$ sudo apt-get install python-ipaddr
$ sudo apt-get install libgtk-3-dev
$ sudo apt-get install gir1.2-vte-2.90
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.