Virt-Manager is unable to open a connection to the libvirt management daemon

Bug #222938 reported by Ilari Mäkelä
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: virt-manager

There is already discussion about this bug in bug number #198957 but it's a bit off the line and it's stated as "Fix released". So when I try to connect remotely to my Xen dom0 host I get this error:

Unable to open a connection to the libvirt management daemon.

Verify that:
 - The 'libvirt-bin' package is installed
 - The 'libvirtd' daemon has been started

I've heard that people also have this error when connecting to local xen host but I'm only using virt-manager to manage remote host so haven't tested local domains. I have libvirt-bin installed and running on both hosts. My server is running 64bit Ubuntu 8.04 (Linux inno-xen 2.6.24-16-xen) and xen version 3.2 and my desktop, where I'm using virt-manager, is running 32bit Ubuntu 8.04 (Linux isokisu 2.6.24-16-generic) with virt-manager 0.5.3. Xm list gives me this one on my server:

Name ID Mem VCPUs State Time(s)
Domain-0 0 3888 2 r----- 3338.2

And libvirtd is also running:

root 9336 0.0 0.0 81632 2668 ? S Apr26 0:00 /usr/sbin/libvirtd -d

Here is some more details about the error:

Unable to open connection to hypervisor URI 'xen+ssh://192.168.1.5/':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed remoteDispatchClientRequest: internal error: library function returned error but did not set virterror
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 remoteDispatchClientRequest: internal error: library function returned error but did not set virterror

Revision history for this message
Shang Wu (shangwu) wrote :

Are you in the libvirtd group?

Revision history for this message
Timo (timohirt) wrote :

The same here!

Revision history for this message
Timo (timohirt) wrote :

The same here!

2.6.24-21-xen #1 SMP Wed Oct 22 01:07:57 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Alvin (alvind) wrote :

Check your ssh connections. (Maybe try to use public key authentication). If SSH is the problem, please mark this bug as a duplicate of bug #251036.

Revision history for this message
Brett Sheffield (brett-gladserv) wrote :

I can successfully connect to a local (qemu) machine using virt-manager.

I cannot connect to a remote machine (xen) using virt-manager.

I can connect via virsh to the same remote machine using xen+ssh. The same method does not work for virt-manager. The error reported is the same as above:

  Unable to open a connection to the libvirt management daemon.

  Verify that:
   - The 'libvirt-bin' package is installed
   - The 'libvirtd' daemon has been started

The attempt to connect via virt-manager kills libvirtd on the remote server. It dies with error:
 Apr 18 16:05:19 dram kernel: [ 2510.448100] libvirtd[5605] trap divide error rip:7f4ad963467a rsp:7fffe20ed730 error:0
in /var/log/syslog

This symptom has been reported by others: https://lists.ubuntu.com/archives/ubuntu-users/2008-May/145951.html

Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Brett Sheffield (brett-gladserv) wrote :

Clarification:

If libvirtd is running on the remote server, attempting to connect using virt-manager kills libvrtd as described. virt-manager returns no error - it just continues trying to connect ad inititum.

*subsequent* attempts to connect fail with the error:

  Unable to open a connection to the libvirt management daemon.

  Verify that:
   - The 'libvirt-bin' package is installed
   - The 'libvirtd' daemon has been started

because (obviously) libvirtd is no longer running.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for reporting this issue.

Are you still able to reproduce it using a more recent version of virt-manager, such as the one in Karmic or Lucid?

Changed in virt-manager (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to 'New'. Thanks again!

Changed in virt-manager (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Aaron Brady (bradya) wrote :

I can confirm this with the virsh and virt-managers in 9.10 and 10.04.

Revision history for this message
Phill Whiteside (phillw) wrote :

This error is back in 16.10

manually issuing sudo sh /etc/init.d/libvirtd start causes the daemon to start up.

Phill Whiteside (phillw)
Changed in virt-manager (Ubuntu):
status: Invalid → Confirmed
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.