virt-manager needs libvirt-bin, but is not marked as required

Bug #198957 reported by jhmos
16
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: virt-manager

It seems that the libvirt-bin package is not marked as required in the virt-manager package in Hardy Alpha5 so virt-manager gets installed without some needed library files.
Subsequently when trying to use Virtual Machine Manager an error message appears that suggests a missing library.

Once I installed libvirt-bin, virt-manager worked fine.

Release: Hardy Alpha5
Package Version: virt-manager.py 0.5.3
Related Bug: Bug #116897

Related branches

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 198957] [NEW] virt-manager needs libvirt-bin, but is not marked as required

On Thu, Mar 06, 2008 at 01:04:42AM -0000, <email address hidden> wrote:
> It seems that the libvirt-bin package is not marked as required in the
> virt-manager package in Hardy Alpha5 so virt-manager gets installed
> without some needed library files.

> Subsequently when trying to use Virtual Machine Manager an error
> message appears that suggests a missing library.

It would be helpful if you could tell me what the error message actually
said.

> Once I installed libvirt-bin, virt-manager worked fine.

libvirt-bin does not contain any libraries.

--
Soren Hansen |
Virtualisation specialist | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/

Revision history for this message
jhmos (jhmos) wrote :

OK,
I removed the libvirt-bin package and the error appeared again after starting virtual manager and trying to connect.
An error window entitled "Virtual Machine Manager Connection Failure" pops up with the following text:
----------------------------------------------------------------------------------------------
Verify that:
 - The 'libvirtd' daemon has been started

Unable to open connection to hypervisor URI 'qemu:///session':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 306, 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
------------------------------------------------------------------------------------------------
Since libvirtd is in in the libvirt-bin I would think it should be required by virt-manager or one of its dependencies like python-libvirt (if I understand dependencies well enough).

Also, I notice that the libvirt0 package description has a typo too:
"library for interfacing with differeny virtualization systems"

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 198957] Re: virt-manager needs libvirt-bin, but is not marked as required

On Fri, Mar 07, 2008 at 01:47:11AM -0000, <email address hidden> wrote:
> I removed the libvirt-bin package and the error appeared again after
> starting virtual manager and trying to connect. An error window
> entitled "Virtual Machine Manager Connection Failure" pops up with the
> following text:
> ----------------------------------------------------------------------------------------------
> Verify that: - The 'libvirtd' daemon has been started
>
> Unable to open connection to hypervisor URI 'qemu:///session':
> <class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed
> Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/connection.py", line 306, 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
> ------------------------------------------------------------------------------------------------

The error message even explicitly tells you that you should check if
libvirtd is running. It's not a library that's missing, you're just
trying to connect to a local libvirtd instance, but you have no such
thing (as you don't have libvirtd running). virt-manager doesn't *need*
a local libvirtd instance, as it can be used to manage remote ones
instead.

> Also, I notice that the libvirt0 package description has a typo too:
> "library for interfacing with differeny virtualization systems"

Ah, thanks. I'll fix that.

--
Soren Hansen |
Virtualisation specialist | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/

Soren Hansen (soren)
Changed in virt-manager:
status: New → Invalid
Revision history for this message
jhmos (jhmos) wrote :

I understand that its not a library package, thats not the point.
The point is that in a default installation a user will always get this error message when trying to connect to the local machine (which is the default connection offered at startup). I would suggest that connecting to a remote libvirtd is not the first option most people would be trying.

Anyone trying to use Virtmanager for the first time, with default options, will always get this error and won't be able to do anything until libvirtd is running (which is contained in the libvirt-bin package, not installed by default). No one should have to look at that error message and work out for themselves what has to be done to get thing working when the default install of one small package could resolve the problem or perhaps a change to the user interface to make it explicit what the dependencies are.

Revision history for this message
Soren Hansen (soren) wrote :
Download full text (3.2 KiB)

On Mon, Mar 10, 2008 at 10:44:34AM -0000, <email address hidden> wrote:
> I understand that its not a library package, thats not the point.

When you start your initial bug report saying "[...] so virt-manager
gets installed without some needed library files", then I think it's
quite relevant.

> The point is that in a default installation a user will always get
> this error message when trying to connect to the local machine (which
> is the default connection offered at startup). I would suggest that
> connecting to a remote libvirtd is not the first option most people
> would be trying.

That might be true, but I'm not convinced that virt-manager depending on
libvirt-bin is the correct solution to this that "problem". (Referring
to a simple fact (that most people will not attempt to connect to a
remote libvirtd as the first thing) as a problem seems a bit off to me,
hence the quotation marks)

> Anyone trying to use Virtmanager for the first time, with default
> options, will always get this error and won't be able to do anything
> until libvirtd is running (which is contained in the libvirt-bin
> package, not installed by default).

Erm, no. Anyone trying to use virt-manager for the first time, with
default options, will get an entirely *different* error, namely a
failure to connect to Xen.

> No one should have to look at that error message and work out for
> themselves what has to be done to get thing working when the default
> install of one small package could resolve the problem or perhaps a
> change to the user interface to make it explicit what the dependencies
> are.

The size of the package is not really all that interesting. There are
quite a few libraries of <100k in size, but I'm not going to add those
as a dependency either :)

Let's all just take a step back and look at the *problem*, rather than
what any of us guesses it the right solution. That tends to lead to the
correctest solutions.

Initial analysis: There are many Ubuntu users who'd like to try out the
new, cool virtualisation stuff. These users will often just have a
single machine for this and thus will want to have the daemon and the
management tools running on the same system. The essential packages
involved are: virt-manager, kvm, libvirt-bin. We'll refer to a system
with those packages installed as "a useful system".

Good so far?

Additional information: libvirt-bin is useful on its own. virt-manager
is useful on its own. kvm is useful on its own.

Problem: Getting from a clean install to a useful system is proving
difficult, inconvenient, or unobvious.

There are a number of different ways to turn a given system into a
useful system. Dependencies between the three relevant packages is
wrong, due to the fact that each package is useful on its own.

A new metapackage depending on all three packages is equally unobvious
(undiscoverable to the innocent bystander).

A useful notice when failing to connect to libvirtd saying that
"Connection to local libvirtd failed. Is libvirt-bin installed?" or
something to that effect is simple to implement, to the point, and
doesn't introduce wrong dependencies. Sounds like a plan?

--
Soren Hansen |
Virtualisation...

Read more...

Revision history for this message
Soren Hansen (soren) wrote :

On Tue, Mar 11, 2008 at 03:18:04PM -0000, Soren Hansen wrote:
> > Anyone trying to use Virtmanager for the first time, with default
> > options, will always get this error and won't be able to do anything
> > until libvirtd is running (which is contained in the libvirt-bin
> > package, not installed by default).
> Erm, no. Anyone trying to use virt-manager for the first time, with
> default options, will get an entirely *different* error, namely a
> failure to connect to Xen.

Sorry, my mistake. That used to be the case, but I seem to have fixed
that already. You don't get an error until you actively try to connect
to the hypervisor, though.

--
Soren Hansen |
Virtualisation specialist | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/

Revision history for this message
jhmos (jhmos) wrote :

Yes I did make refer to a library at first, in my haste to try out the manager I didn't look to see what was in the package, just assumed most anything beginning with lib had to do with a library.

>A useful notice when failing to connect to libvirtd saying that
>"Connection to local libvirtd failed. Is libvirt-bin installed?" or
>something to that effect is simple to implement, to the point, and
>doesn't introduce wrong dependencies. Sounds like a plan?

That should make it clear enough, good. I recall some applications even offering to initiate installing a package but I guess that would be more involved. Thanks for explaining the difficulties of package management, almost sounds like the dining philosopher problem.

Virt-manager works pretty well otherwise with KVM, have not tried Xen yet.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 0.5.3-0ubuntu8

---------------
virt-manager (0.5.3-0ubuntu8) hardy; urgency=low

  * Clean up: Use patches instead of editing stuff directly in the tree.
  * Add Vcs-Bzr header to debian/control.
  * Make the error message when failing to connect to the hypervisor more
    helpful. (LP: #198957)
  * Use separate libvirt connection when saving a domain. (LP: #201221)
  * Detect magic string in saved qemu/kvm images.

 -- Soren Hansen <email address hidden> Thu, 13 Mar 2008 10:07:03 +0100

Changed in virt-manager:
status: Invalid → Fix Released
Revision history for this message
reliable-robin-22 (nicolasdiogo) wrote :

hi,

i am trying to run the virt-manager i get the same error message described earlier.
since i do no know how to start the necessary libvirtd, could you post an means to get it working.

many thanks

i am using hardy on an intel laptop - current error message are:

Unable to open a connection to the libvirt management daemon.

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

details:

Unable to open connection to hypervisor URI 'qemu:///session':
<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 331, 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

Revision history for this message
Soren Hansen (soren) wrote :

nicolas, that's a completely different problem. Please file a new bug
about it.

--
Soren Hansen |
Virtualisation specialist | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/

Revision history for this message
reliable-robin-22 (nicolasdiogo) wrote :

thanks,

i will be posting a new bug.

Revision history for this message
Daniel Gimpelevich (daniel-gimpelevich) wrote :

Sorry, Soren, but what Nicolas is reporting _is_ this same bug, which has _not_ been fixed. I was just bitten by it myself. I see two possible, non-mutually-exclusive solutions:

1) Make libvirt-bin a "Recommended" package of virt-manager.
2) Make both libvirt-bin and virt-manager required dependencies of the ubuntu-desktop metapackage.

The second solution is the sledgehammer approach, but may prove beneficial in the long run. In any case, I strongly recommend the first solution above.

Revision history for this message
Omega (atrauzzi) wrote :

Just a quick note, but I encountered the same error while trying to explore XEN/KVM/QEMU.

Not sure what I've got to do to get things rolling here, but it clearly isn't working. I also don't have "KVM" as an option in `virt-manager`..........

Unrelated and correct me if I'm wrong: I am foreseeing some real confusion and chaos between all the virtualization options going around these days. XEN for running VMs, KVM for developing on them, and QEMU as some kind of neglected sibling.

The software packages for sure need some structuring love and I think some wiki documents are due.

Revision history for this message
Nick Barcet (nijaba) wrote : Re: [Bug 198957] Re: virt-manager needs libvirt-bin, but is not marked as required

Omega wrote:
> The software packages for sure need some structuring love and I think
> some wiki documents are due.

Would this help?

 * https://wiki.ubuntu.com/KvmVirtManagerEtc
 * http://doc.ubuntu.com/ubuntu/serverguide/C/virtualization.html

Revision history for this message
Nikolaus Filus (nfilus) wrote :

I'm using version 0.5.3-0ubuntu8 virt-manager and it's still showing a not helping error message
for a local xen instance.
It shows only
  Verify that:
    - A Xen host kernel was booted
    - The Xen service has been started

But:
  niko@mobile:~$ uname -a
  Linux mobile 2.6.24-16-xen #1 SMP Thu Apr 10 15:51:04 UTC 2008 i686 GNU/Linux
  niko@mobile:~$ ps ax
   18 ? S< 0:00 [xenwatch]
   19 ? S< 0:00 [xenbus]
   8053 ? S 0:00 xenstored --pid-file /var/run/xenstore.pid
   8289 ? Sl 0:00 xenconsoled
  12432 ? S 0:00 python /usr/sbin/xend start
  12433 ? Sl 0:00 python /usr/sbin/xend start
  11211 ? S 0:00 /usr/sbin/libvirtd -d

I think "fix released" is not quite right!

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

Yupp, got the same problem as Nikolaus,

xend and libvirtd are running. Xm list shows the Dom0.

However when I try to connect to local Xen via virt-manager, I get:

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

Unable to open connection to hypervisor URI 'xen:///':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 331, 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

Any other info I might provide?

Drake Martin (s3ppel)
Changed in virt-manager:
status: Fix Released → In Progress
Revision history for this message
Nick Barcet (nijaba) wrote :

Nikolaus and Drake, I beleive your issue is not at all related to this bug. Could one of you please open a new one so that it can be tracked separately? Thanks a lot.

Changed in virt-manager:
status: In Progress → Fix Released
Revision history for this message
Ilari Mäkelä (iler) wrote :

I got this error when trying to work with Ubuntu Hardy RC and virt-manager + xen:

Unable to open a connection to the libvirt management daemon.

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

And details:

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 331, 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

I have libvirt-bin installed and ssh-connetion is working properly. Still not working...

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

Nick, I am sorry if I confused things a bit, I understand now what you mean. Our bugs are not related, because we don't complain about missing libvirt-packages during install but rather the non-working of virt-manager *inspite* of having them installed, right?

I thus opened a new bug as you requested here: https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/220985

Kind regards and thanks for all the help!

Revision history for this message
Daniel Kulesz (kuleszdl) wrote :

Actually there are two problems I see there:

(1) You are trying to connect to the Host with xen+ssh. This will not work on Ubuntu until you set the root password (which is ugly of course), since virt-manager has the username "root" as username hardcoded in. Although you can specify a different user name, it will not work. The manual also outlines this briefly:

http://virt-manager.et.redhat.com/page/RemoteSSH

And there is also a bug report available on this issue:

https://bugzilla.redhat.com/show_bug.cgi?id=470416

To verify it's not a virt-manager problem, I would suggest to try connecting with virsh first. (i.e. virsh -c xen+ssh://hostname/system)

(2) I am getting the following error as well, when trying to connect using TLS/SSL to a 8.04 box where Xen is obviously working:

"libvirtError: virConnectOpenReadOnly() failed remoteDispatchClientRequest: internal error: library function returned error but did not set virterror"

This error message is not helpful at all. Any ideas?

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

> virt-manager has the username "root" as username hardcoded in. Although you can specify a different user name, it will not work.

Using user@host works on virt-manager for karmic and lucid. Tested today.

Revision history for this message
dancer (dongdianjing) wrote :

when i followed the url: http://www.wongkey.com/archives/ubuntu-11-10-install-xen
i got the same problem. but in /etc/xen/xend-config.sxp file, change this line
# (xen-unix-server no)
into
(xen-unix-server yes)
and it works. pay attention to '#' and the word 'yes'.

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.