16

When I tried to install new virtual machine in virt-manager, virtualization - localhost (QEMU) is not connected.

It shows Error: No active connection to installed on. How to fix this problem.

muru
  • 207,228
aditya
  • 161

5 Answers5

10

You are likely going to need to make sure your user owns the libvirt socket

sudo chown $USER:$USER /var/run/libvirt/libvirt-sock
Jab
  • 85
David SHainidze
  • 2,718
  • 2
  • 8
  • 13
5
  1. Verify you have all packages you need

    sudo apt install -y qemu-kvm libvirt0 libvirt-bin virt-manager bridge-utils
    sudo systemctl enable libvirt-bin
    
  2. Verify that libvirtd and libvirt-bin are up and running

    sudo service libvirtd status
    sudo service libvirt-bin status
    
  3.  sudo systemctl reboot
    
kurdtpage
  • 187
  • 1
  • 8
Zeh
  • 151
  • 1
  • 3
5

Make sure your username is part of the libvirt group. Try running sudo adduser <username> libvirt. This fixed the problem for me.

ayeiser
  • 51
3

In my case I had the error when trying to run it right after the installation.

I tried restarting the libvirtd service in that same session but with no success.

I tried logging out and logging back in still with no success.

But after rebooting the machine, all was fine.

Wadih M.
  • 392
2

Try restarting the libvirtd service:

sudo service libvirtd stop
sudo service libvirtd start
kurdtpage
  • 187
  • 1
  • 8