How to Use Virt-Manager on Linux Mint/Ubuntu: A Step-by-Step Guide
Tags: linuxmint, ubuntu, virtmanager, virtualmachine
Published: 2024-04-04 15:54:18

---
title: How to Use Virt-Manager on Linux Mint/Ubuntu: A Step-by-Step Guide
published: true
date: 2024-02-08 17:31:43 UTC
tags: linuxmint,ubuntu,virtmanager,virtualmachine
canonical_url: https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/
---

![](https://diegocarrasco.com/images/social-images/how-to-use-virt-manager-linux-mint-ubuntu.jpg)

 

- [TLDR](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#tldr)
- [Context](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#context)
  - [Why Virt-Manager?](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#why-virt-manager)
- [Steps](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#steps)
  - [1. Installing Virt-Manager](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#1-installing-virt-manager)
  - [2. Adding Your User to Relevant Groups](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#2-adding-your-user-to-relevant-groups)
  - [3. Using Virt-Manager](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#3-using-virt-manager)
  - [4. Managing Virtual Machines](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#4-managing-virtual-machines)
- [Troubleshooting](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#troubleshooting)
  - [1. Unable to Connect to libvirt qemu:///system Error on Linux Mint/Ubuntu](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#1-unable-to-connect-to-libvirt-qemusystem-error-on-linux-mintubuntu)
    - [Steps to solve](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#steps-to-solve)
      - [1. Ensure libvirt Service is Active](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#1-ensure-libvirt-service-is-active)
      - [2. Check libvirt Configuration](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#2-check-libvirt-configuration)
      - [Reboot the System](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#reboot-the-system)
- [References](https://diegocarrasco.com/how-to-use-virt-manager-linux-mint-ubuntu/#references)

### TLDR

This article guides you through the installation and usage of Virt-Manager on Linux Mint or Ubuntu, providing an easy way to manage virtual machines (VMs).

### Context

[Virt-Manager](https://virt-manager.org/) is a graphical tool for managing virtual machines via libvirt. It's user-friendly and supports KVM/QEMU and Xen virtualization.

#### Why Virt-Manager?

- **Graphical Interface** : Easy for beginners.
- **Wide Support** : Works with KVM, QEMU, and Xen.
- **Linux Compatibility** : Ideal for Linux Mint and Ubuntu users.

### Steps

#### 1. Installing Virt-Manager

1. **Open Terminal** : You can press `Ctrl + Alt + T` or search for `terminal` in the start menu.
2. **Update Repositories** :

```
sudo apt update

```

1. **Install Virt-Manager** :

```
sudo apt install virt-manager

```

#### 2. Adding Your User to Relevant Groups

1. **Add Your User to the `libvirt` Group** :

```
sudo usermod -aG libvirt $USER

```

1. **Add Your User to the `kvm` Group** :

```
sudo usermod -aG kvm $USER

```

1. **Reload Groups** :

```
newgrp libvirt 
newgrp kvm

```

#### 3. Using Virt-Manager

1. **Open Virt-Manager** : You can search for `virt-manager` in the start menu or run the following command in the terminal:

```
virt-manager

```

1. **Create a New Virtual Machine** : Click on the `Create a new virtual machine` button.
2. **Select Installation Method** : Choose `Local install media (ISO image or CDROM)`.
3. **Select ISO Image** : Click on the `Browse` button and select the ISO image you want to use. You can downlaod Ubuntu server from here: [Ubuntu Server](https://ubuntu.com/download/server).
4. **Follow the Wizard** : Choose the installation method and configure your VM.

#### 4. Managing Virtual Machines

- **Start/Stop VMs** : Right-click on the VM and select Start or Shut Down.
- **Access VM Console** : Double-click the VM.
- **Edit VM Settings** : Right-click and choose Open.

## Troubleshooting

### 1. `Unable to Connect to libvirt qemu:///system` Error on Linux Mint/Ubuntu

#### Steps to solve

##### 1. Ensure libvirt Service is Active

1. **Check Status** :

```
sudo systemctl status libvirtd

```

1. **Start Service** :

```
sudo systemctl start libvirtd

```

1. Verify user group permissions:

```
# check groups for user
groups $(whoami)
# add required groups if missing
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER
# reload groups or log out and log in again
newgrp libvirt 
newgrp kvm

```

##### 2. Check libvirt Configuration

1. **Open libvirt Configuration File** :

```
sudo nano /etc/libvirt/libvirtd.conf

```

1. Enable TCP Connections: Uncomment `listen_tcp = 1`.
2. Restart libvirtd Service:

```
sudo systemctl restart libvirtd

```

Note: Sometimes just rebooting the service also works.

##### Reboot the System

Sometimes, even in linux, rebooting the system can solve the problem.

## References

- [Virt-Manager Official Website](https://virt-manager.org/)
- Ubuntu Community Help Wiki
- Linux Mint Documentation