Virt-Manager Error: Unable to open a connection to the Xen hypervisor/daemon.

Bug #220985 reported by Drake Martin
32
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: virt-manager

When trying to connect to the Xen hypervisor on localhost, I get the following error:

Unable to open a connection to the Xen hypervisor/daemon.

Verify that:
 - A Xen host kernel was booted
 - The Xen service has been started

Details:
Unable to open connection to hypervisor URI 'xen:///':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed could not use Xen hypervisor entry /tmp/livirt_proxy_conn
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 332, in _open_thread
    self.vmm = libvirt.openReadOnly(self.uri)
  File "/usr/lib/python2.5/site-packages/libvirt.py", line 144, in openReadOnly
    if ret is None:raise libvirtError('virConnectOpenReadOnly() failed')
libvirtError: virConnectOpenReadOnly() failed could not use Xen hypervisor entry /tmp/livirt_proxy_conn

I am running Xen kernel:
drake@Gantrithor:~$ uname -r
2.6.24-16-xen

xm list shows Dom0:
drake@Gantrithor:~$ sudo xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 1878 2 r----- 139.7

/var/log/xen/xend-debug.log:
Xend started at Wed Apr 23 13:55:29 2008.

Package libvirt0 is installed, no clue whats wrong.

Is there more information I can post to clarify things and help finding the bug?

I am thankful for help and suggestions.

Revision history for this message
Drake Martin (s3ppel) wrote :

Reinstalling 8.04 final from scratch didn't help. I am running 64 bit, might that cause the problem?

Revision history for this message
Jerome Charaoui (jcharaoui) wrote :

Same problem here with the same kernel amd64. I tried enabling these two settings in xend-config.sxp, but without auccess :

(xen-api-server ((unix)))
(xend-unix-server yes)

Revision history for this message
ktulu (eric-duda) wrote :

Same error with x86_64 kernel.
I tried it on two fresh installs, so I think it's a global hardy problem.

Also xenman (convirt) iss broken, so there iss currently no xen-gui available in hardy.

Revision history for this message
Adesfire (marcellin-s) wrote :

Hi,
i have the same problem with a fresh Hardy Server edition on a Intel Q6600 :

Name ID Mem VCPUs State Time(s)
Domain-0 0 3855 4 r----- 396.8

Really boring ....

Revision history for this message
smemorex (luca-consales) wrote :

Hello,
i had same problem with ubuntu 8,04 i386 , i don't know if work eith amd64.

I added this line in /etc/xen/xend-config.sxp

(xend-http-server yes)
(xend-unix-server yes)

and now it work fine.

Revision history for this message
terets (alex-lembcke) wrote :

smemorex,

I read on a Fedora mailing list that the first one you have there about http, is a remote security hole and should not be enabled. I tried your approach anyways, and it did not help for me on an AMD64 fresh install of Hardy. I have been searching the net and can't find a solution that works for everyone. I hope someone comes and saves the day soon.

Revision history for this message
randall (randall-redigital) wrote :

hi - i am experiencing the same problem when trying to connect an ubuntu 8.0.4 i386 to an ubuntu 8.0.4 x86_64 (intel)

Unable to open a connection to the libvirt management daemon.

details of server:
root@vm5:~# uname -a
Linux vm5.isber.ucsb.edu 2.6.24-16-xen #1 SMP Thu Apr 10 14:35:03 UTC 2008 x86_64 GNU/Linux
root@vm5:~# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 7930 2 r----- 49.0
root@vm5:~# dpkg -l | grep libvirt
ii libvirt-bin 0.4.0-2ubuntu8 the programs for the libvirt library
ii libvirt-dev 0.4.0-2ubuntu8 development files for the libvirt library
ii libvirt-doc 0.4.0-2ubuntu8 documentation for the libvirt library
ii libvirt0 0.4.0-2ubuntu8 library for interfacing with different virtu
ii python-libvirt 0.4.0-2ubuntu8 libvirt python bindings

details of desktop:
root@vm5:~# uname -a
Linux vm5.isber.ucsb.edu 2.6.24-16-xen #1 SMP Thu Apr 10 14:35:03 UTC 2008 x86_64 GNU/Linux
root@vm5:~# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 7930 2 r----- 49.0
root@vm5:~# dpkg -l | grep libvirt
ii libvirt-bin 0.4.0-2ubuntu8 the programs for the libvirt library
ii libvirt-dev 0.4.0-2ubuntu8 development files for the libvirt library
ii libvirt-doc 0.4.0-2ubuntu8 documentation for the libvirt library
ii libvirt0 0.4.0-2ubuntu8 library for interfacing with different virtu
ii python-libvirt 0.4.0-2ubuntu8 libvirt python bindings

Revision history for this message
Paul McEnery (pmcenery) wrote :

I think this is a feature. If you launch virt-manager as root (sudo), you are able to connect. Here is an extract from the libvirt site:

========== >8 ==============
 Legacy: Xen proxy

Libvirt continues to support connections to a separately running Xen proxy daemon.
This provides a way to allow non-root users to make a safe (read-only) subset of queries to the hypervisor.

There is no specific "Xen proxy" URI. However if a Xen URI of any of the ordinary or legacy forms is used (eg. NULL, "", "xen", ...)
which fails, and the user is not root, and the Xen proxy socket can be connected to (/tmp/libvirt_proxy_conn), then libvirt will use a proxy connection.

You should consider using libvirt remote support in future.
========== 8< ==============

Ref:
http://libvirt.org/uri.html

Revision history for this message
Drake Martin (s3ppel) wrote :

Runnig as root user doesn't help. I get the same error.

Revision history for this message
Fastguy (erenoglu) wrote :

I confirm the bug. This installation is a fresh minimal installation of Hardy 8.04, 32 bit.

Error message:
Unable to open connection to hypervisor URI 'xen:///':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed Connection reset by peer
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 332, in _open_thread
    self.vmm = libvirt.openReadOnly(self.uri)
  File "/usr/lib/python2.5/site-packages/libvirt.py", line 144, in openReadOnly
    if ret is None:raise libvirtError('virConnectOpenReadOnly() failed')
libvirtError: virConnectOpenReadOnly() failed Connection reset by peer

If I try to connect using SSH, another type of error:
Unable to open connection to hypervisor URI 'xen+ssh://localhost/':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed Connection reset by peer
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 332, in _open_thread
    self.vmm = libvirt.openReadOnly(self.uri)
  File "/usr/lib/python2.5/site-packages/libvirt.py", line 144, in openReadOnly
    if ret is None:raise libvirtError('virConnectOpenReadOnly() failed')
libvirtError: virConnectOpenReadOnly() failed Connection reset by peer

Emre

Revision history for this message
bakvendt (larseik) wrote :

As smemorex wrote, but changing only one line of config fixed it.

Change 'no' to 'yes' in /etc/xen/xend-config.sxp
(xend-unix-server yes)

Revision history for this message
Laurent Léonard (laurent-open-minds) wrote :

Same problem with a 64 bits Ubuntu 8.04 installation.

Corrected by adding
(xend-unix-server yes)
in /etc/xen/xend-config.sxp

But there is an other problem. After the modification in the Xen configuration file and Xend restarting, Virt-manager can be successfully connected to the local Xen host, but it closes directly and silently after the connection. There is nothing visible on stdout/stderr because when Virt-manager is launched it becomes a detached process. So I used strace with the -s option and when I try to connect to the local Xen host I get a floating point exception...

Revision history for this message
Emilio Scalise (emisca) wrote :

I can confirm this:
enabling (xend-unix-server yes), virt-manager starts but the windows disappear suddenly.

read(18, "\n", 1) = 1
read(18, "(node (system Linux) (host camer"..., 852) = 852
close(18) = 0
--- SIGFPE (Floating point exception) @ 0 (0) ---
Process 9342 detached

Revision history for this message
dahias (wengahias) wrote :

Since this is a Duplicate of bug #223993 i installed a new version of "libvirt-bin" from the backport repository like suggested in Bug: #223993 Comment: #16
This fixed the problem for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.