virt-manager utility launches GUI virtual machine manager. This manager visually displays domain and hypervisor stats. Like virsh, it can manage domains, and when run on the same system as the hypervisor, it can even be used to configure new systems. It has a couple of useful options for controlling how it starts. virsh is the frontend command line that interacts with the libvirt service and virt-manager is its GUI frontend.
In case if you encounter the below error:
virt-manager: command not found
You may need to install the virt-manager package according to your choice of distribution.
Distribution | Command |
---|---|
Debian | apt-get install virt-manager |
Ubuntu | apt-get install virt-manager |
Alpine | apk add virt-manager |
Arch Linux | pacman -S virt-manager |
Kali Linux | apt-get install virt-manager |
CentOS | yum install virt-manager |
Fedora | dnf install virt-manager |
Raspbian | apt-get install virt-manager |
Docker | docker run cmd.cat/virt-manager virt-manager |
Starting the libvirt service
After installing the KVM virtualization packages, the first thing that you should do is start a libvirt service. As soon as you start the libvirt service, it will expose a rich Application Programmable Interface (API) to interact with qemu-kvm binary. Clients such as virsh and virt-manager, among others, use this API to talk with qemu-kvm for virtual machine life cycle management. To enable and start the service, run the following command:
# systemctl enable libvirtd && systemctl start libvirtd
Starting the Virtual Machine Manager
Begin by launching Virtual Machine Manager from the command-line in a terminal window by running virt-manager. Once loaded, the virtual machine manager will prompt for the password of the currently active user prior to displaying the following screen:
The main screen lists the current virtual machines running on the system. By default the manager should be connected to the system libvirtd instance. If it is not, connect to the host system by right-clicking on the entry in the list and selecting Connect from the popup menu.