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.

  • Could you please be more specific: When and where does it show the error? Is that the complete error message? Please add screenshots of your virt-manager window and the error message to yourquestion.
    – ridgy
    Commented Jul 5, 2017 at 13:23

5 Answers 5


You are likely going to need to make sure your user owns the libvirt socket, change out the username:username with your actual username

sudo chown username:username /var/run/libvirt/libvirt-sock
  • After trying all of the other answers here, this is what made it finally work! Thanks!
    – hawk
    Commented Feb 25, 2023 at 10:46
  • This is the way. This fixed my issue as well. Commented Apr 4, 2023 at 18:46
  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

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

  • sudo usermod -a -G libvirt <username> if the user already exists
    – bobmcn
    Commented Apr 19, 2023 at 0:31

Try restarting the libvirtd service:

sudo service libvirtd stop
sudo service libvirtd start

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.

  • Most of the other answers here are listing out stuff you definitely shouldn't have to do on a modern linux distro. Rebooting did the trick for me just fine, thanks.
    – JP Duffy
    Commented Nov 22, 2023 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .