DEV Community

Diego Carrasco Gubernatis
Diego Carrasco Gubernatis

Posted on • Originally published at diegocarrasco.com on

How to Use Virt-Manager on Linux Mint/Ubuntu: A Step-by-Step Guide

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 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

Enter fullscreen mode Exit fullscreen mode
  1. Install Virt-Manager :
sudo apt install virt-manager

Enter fullscreen mode Exit fullscreen mode

2. Adding Your User to Relevant Groups

  1. Add Your User to the libvirt Group :
sudo usermod -aG libvirt $USER

Enter fullscreen mode Exit fullscreen mode
  1. Add Your User to the kvm Group :
sudo usermod -aG kvm $USER

Enter fullscreen mode Exit fullscreen mode
  1. Reload Groups :
newgrp libvirt 
newgrp kvm

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode
  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.
  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

Enter fullscreen mode Exit fullscreen mode
  1. Start Service :
sudo systemctl start libvirtd

Enter fullscreen mode Exit fullscreen mode
  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

Enter fullscreen mode Exit fullscreen mode
2. Check libvirt Configuration
  1. Open libvirt Configuration File :
sudo nano /etc/libvirt/libvirtd.conf

Enter fullscreen mode Exit fullscreen mode
  1. Enable TCP Connections: Uncomment listen_tcp = 1.
  2. Restart libvirtd Service:
sudo systemctl restart libvirtd

Enter fullscreen mode Exit fullscreen mode

Note: Sometimes just rebooting the service also works.

Reboot the System

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

References

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs