I have installed debian 6.0.1a. I have install all XEN stuff. including xen kernel, libvirtd, ... but when i want to connect xend, virt-manager shows me this:

Verify that:

  • A Xen host kernel was booted
  • The Xen service has been started details:

    Unable to open connection to hypervisor URI 'xen:///': unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Permission denied Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/connection.py", line 971, in _try_open None], flags) File "/usr/lib/python2.6/dist-packages/libvirt.py", line 111, in openAuth if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Permission denied here is uname output:

    Linux debian 2.6.32-5-xen-amd64 #1 SMP Tue Mar 8 00:01:30 UTC 2011 x86_64 GNU/Linux

and also xend and libvirtd is runnig:

root@debian:/home/mazimi# /etc/init.d/libvirt-bin status
Checking status of libvirt management daemon: libvirtd running.

root@debian:/home/mazimi# /etc/init.d/xend start
Starting Xen daemons: xenstored xenconsoled xend.

permissions for livbirt-sock:

root@debian:/home/mazimi# ls -alih /var/run/libvirt/
total 12K
671017 drwxr-xr-x  3 root root    4.0K Apr 15 13:54 .
654083 drwxr-xr-x 18 root root    4.0K Apr 15 13:54 ..
670901 srwxrwx---  1 root libvirt    0 Apr 15 13:54 libvirt-sock
670928 srwxrwxrwx  1 root libvirt    0 Apr 15 13:54 libvirt-sock-ro
670870 drwxr-xr-x  2 root root    4.0K Apr 15 02:34 qemu

and also we have group named libvirt in /etc/group

When running libvirtd with verbose mode it behaves kind of stange:

root@debian:/var/log/libvirt# /usr/sbin/libvirtd --verbose
17:26:55.841: warning : qemudStartup:1832 : Unable to create cgroup for driver: No such device or address
17:26:56.128: warning : lxcStartup:1900 : Unable to create cgroup for driver: No such device or address

and waits infinitely.

  • Did you check libvirtd is realy running? What about permissions on /var/run/libvirt/libvirt-sock?
    – HUB
    Apr 15, 2011 at 6:58
  • it seems permissions are OK. I edited the question and added libvirtd and xend status. But it gives me the same error. Apr 15, 2011 at 9:38
  • Just a guess: In /etc/xen/xend-config.sxp: (xend-unix-server yes) ?
    – HUB
    Apr 15, 2011 at 10:51
  • I chnaged (xend-unix-server yes). but it doesn't work again. Apr 15, 2011 at 12:58
  • I was running a CentOS box and had similar issues. I found the root of my issue was I wasn't booting from a xen kernel. Had to update the default boot in /boot/grub/menu.lst and I was good.
    – VenomFangs
    Oct 10, 2014 at 22:10

3 Answers 3


The problem is with the xen config I think. I had a similar issue with connecting.

To solve this on you need to edit /etc/xen/xend-config.sxp, and uncomment the following line:

(xend-unix-server yes)

and then restart xend



Try with a different URI. For example, mine works with qemu:// on a xen host

# cat /etc/redhat-release 
CentOS release 5.4 (Final)

# uname -a
Linux xen01.example.com 2.6.18-164.6.1.el5xen #1 SMP Tue Nov 3 16:48:13 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

# virsh -c qemu:///system version
Compiled against library: libvir 0.6.3
Using library: libvir 0.6.3
Using API: QEMU 0.6.3
Running hypervisor: QEMU 0.9.0

Different host running kvm

# cat /etc/debian_version 

xen02:~# uname -a
Linux xen02.example.com 2.6.32-bpo.5-amd64 #1 SMP Fri Jun 11 08:42:31 UTC 2010 x86_64 GNU/Linux

xen02:~# virsh -c qemu:///system version
Compiled against library: libvir 0.8.1
Using library: libvir 0.8.1
Using API: QEMU 0.8.1
Running hypervisor: QEMU 0.12.5

You can do it over TLS too from a remote host. See this post


I just figured this one out. I administer CentOS servers and I have Ubuntu workstation. I wanted to use virt-manager over SSH to my Xen dom0 servers.

The basic premise is that you have to have the same user account on your client (virt-manager) and server (Xen dom0), which basically means you have to use 'root' account on your workstation to run virt-manager. Since I've setup SSH keys on both of my Xen servers this also means I have to add keys to my root account.

Instructions (for Ubuntu 10.04.3 workstation)

First, you login as root and copy the SSH keys you need for the server:

sudo -i
cp /home/user/.ssh/id_rsa_xenServer /root/.ssh/id_rsa_xenServer
chown root.root /root/.ssh/id_rsa_xenServer
chmod 600 /root/.ssh/id_rsa_xenServer

You have to fork the ssh-agent to the 'root' shell:

ssh-agent /bin/bash
ssh-add /root/.ssh/id_rsa_xenServer

Now you connect to the server to check the authentication with the server:

ssh root@xenServer

You have to open virt-manager in "privileged" mode for this to work. This can be done with 'Alt+F2' in GNOME where you enter 'gksu virt-manager'.

It's not necessary to add or edit anything on the server side.

After the virt-manager is up and running you need to add connections to your Xen server:

  • File > Add connection (a new window pops up)
  • select 'Hypervisor': Xen
  • select 'Connection': Remote tunnel over SSH (available hosts show up below)
  • you can select a host from the list or enter a specific hostname in the 'Hostname' field, if you server is not listed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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