Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install a Windows 8 VM using KVM and the Virtual Machine Manager GUI. Upon installing KVM and VMM, and starting VMM I get the error Unable to connect to libvirt.

Verify that:
   - The 'libvirt-bin' package is installed
   - The 'libvirtd' daemon has been started
   - You are member of the 'libvirtd' group

I tried apt-get install libvirt-bin and it was installed.

But I do not know how to check if the daemon has started or check / add myself as a member.

share|improve this question
Please note I posted this exact question on super user as well... I hope this doesn't get my question marked down – Daniel Toebe Apr 3 '13 at 19:13

Just solved this issue for myself.

Generate a public key pair on the machine virt-manager is used. Note that this is placed into the default key file. If you already have one it will ask you to override. If you do you will have to distribute this key everywhere you used it previously.

# ssh-keygen -t rsa

Remote login without a password, or with a passphrase, requires an SSH key to be distributed to the systems being managed. Use the ssh-copy-id to do this. Change root to be the user you want to log into the daemon as, logging in as root is risky. I use my local user on the host machine. Replace with the public part of the key you generated above. is the default. You will be asked to log into the remote machines via ssh for the copy to take place. This is your users (in my case root) ssh password not the pass-phrase of the key you just created.

# ssh-copy-id -i ~/.ssh/'s password:

Now try logging into the host machine, with the ssh. Check that .ssh/authorized_keys file to make sure unexpected keys have not been added. A simple cat of the file to see if its the same should do.

Do this step for all other systems you wish to log into via virt-manager from your current system.

Now to make things automatic in the GUI you need to add the key to the ssh-agent so that it can log in for you.

# ssh-add ~/.ssh/

Now you should be able to shh into the machine through a terminal and not be asked for any passphrase or password.

Now try virt-manager.

If your getting issues with the agent failing to authenticate you, check out the last link in the sources with regards to a bug that hit me at this stage.


Managing Virtual Hosts:

shh-agent bug:

Seems that ssh-agent can crash at some points and not accept keys from calling ssh-add for some reason. Not clear on this however the suggest setting of the SSH_AUTH_SOCK=0 helped get past this for me.

Once the key and its linked into the agent you should automatically be logged in via virt-manager.

share|improve this answer
Any clue how to do this using a key with a password on it? I prefer to use both. – flickerfly Sep 30 '13 at 0:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.