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.
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
http://www.xen-support.com/?p=338
Try with a different URI. For example, mine works with qemu:// on a xen host
Different host running kvm
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:
You have to fork the ssh-agent to the 'root' shell:
Now you connect to the server to check the authentication with the server:
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: