[Libvir] error : could not connect to xen:///; error: failed to connect to the hypervisor

I can't find the reason for the following error: # virsh libvir: error : could not connect to xen:/// error: failed to connect to the hypervisor # virsh -c ///var/lib/xend/xend-socket libvir: error : could not connect to ///var/lib/xend/xend-socket error: failed to connect to the hypervisor # lsof|grep xend-socket python 3655 root 18u unix 0xffff88001edce340 11774 /var/lib/xend/xend-socket system: Debian etch on amd64 Xen version 3.2.0 (compiled from sources) Linux 2.6.21 (patched Sources from redhat git) libvirtd and xend are running, `xm list` etc works fine # virsh -v 0.4.0 (installed from etch-backports) Output from `strace -s 1024 -f virsh list --all` is here: http://krohnjob.de/files/virsh.strace Can't see the reason for the above mentioned error in there... Kind regards, Felix Krohn -- Felix Krohn / After silence, that which comes ] |-> smtp, xmpp: felix@kro.hn / nearest to expressing the inexpres-] |-> gpg: 0x1C246E3B / sible is music. [Aldous Huxley] |-> https://kro.hn / http://www.flickr.com/kro_royal ]

On Tue, Mar 25, 2008 at 01:00:27PM +0100, Felix Krohn wrote:
I can't find the reason for the following error:
# virsh libvir: error : could not connect to xen:/// error: failed to connect to the hypervisor [...] Output from `strace -s 1024 -f virsh list --all` is here: http://krohnjob.de/files/virsh.strace Can't see the reason for the above mentioned error in there...
Really strange. Is xen configured as a backend (ie. ./configure --without-xen or something like that?) You can also run with debugging enabled, if you configured that: LIBVIRT_DEBUG=1 virsh which will print a lot more useful info. (We should really enable debugging support in configure by default ...) Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v

On Wed, Mar 26, 2008 at 01:02:00PM +0000, Richard W.M. Jones wrote:
On Tue, Mar 25, 2008 at 01:00:27PM +0100, Felix Krohn wrote:
I can't find the reason for the following error:
# virsh libvir: error : could not connect to xen:/// error: failed to connect to the hypervisor [...] Output from `strace -s 1024 -f virsh list --all` is here: http://krohnjob.de/files/virsh.strace Can't see the reason for the above mentioned error in there...
Really strange. Is xen configured as a backend (ie. ./configure --without-xen or something like that?)
You can also run with debugging enabled, if you configured that:
LIBVIRT_DEBUG=1 virsh
which will print a lot more useful info. (We should really enable debugging support in configure by default ...)
We do enable it by default now since 0.4.1 Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Hi, Richard W.M. Jones wrote:
libvir: error : could not connect to xen:/// error: failed to connect to the hypervisor
Really strange. Is xen configured as a backend (ie. ./configure --without-xen or something like that?)
Since I was using the version from etch-backports (http://packages.qa.debian.org/libv/libvirt.html) I don't think so. I got it working now with libvirt 0.4.1 and both Xen 3.1.4-rc1 and 3.2.0, all self-compiled. Perhaps I should rather have filed a bug at backports.org then...
You can also run with debugging enabled, if you configured that:
LIBVIRT_DEBUG=1 virsh
The Debian package obviuosly doesn't have debugging-support compiled in, so I don't get more output. Don't know if this makes a difference, but ARCH is x86_64. Thanks for your answer! Kind regards, Felix Krohn -- Felix Krohn / After silence, that which comes ] |-> smtp, xmpp: felix@kro.hn / nearest to expressing the inexpres-] |-> gpg: 0x1C246E3B / sible is music. [Aldous Huxley] |-> https://kro.hn / http://www.flickr.com/kro_royal ]

On Wed, Mar 26, 2008 at 02:52:14PM +0100, Felix Krohn wrote:
Since I was using the version from etch-backports (http://packages.qa.debian.org/libv/libvirt.html) I don't think so.
libvirt was compiled without Xen in Debian for some time because the requisite Xen headers were missing. However that should have been fixed months ago. Currently (libvirt 0.4.0-6) the logic is: ifneq (,$(findstring $(DEB_HOST_ARCH), i386 amd64)) BUILD_XEN=--with-xen LDFLAGS += -lpthread else BUILD_XEN=--without-xen endif because Xen itself is only ported to a subset of platforms.
Don't know if this makes a difference, but ARCH is x86_64.
Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v

On Wed, Mar 26, 2008 at 02:23:05PM +0000, Richard W.M. Jones wrote:
Currently (libvirt 0.4.0-6) the logic is: There's a 0.4.1 package in exprimental but the autobuilder didn't pick it up yet so it's only available on ppc: http://packages.debian.org/experimental/libvirt-bin I'll move that one around once 0.4.0 has been built on all architectures: http://buildd.debian.org/~jeroen/status/package.php?p=libvirt Cheers, -- Guido

Quoting Guido Günther <agx@sigxcpu.org>:
On Wed, Mar 26, 2008 at 02:23:05PM +0000, Richard W.M. Jones wrote:
Currently (libvirt 0.4.0-6) the logic is: There's a 0.4.1 package in exprimental but the autobuilder didn't pick it up yet so it's only available on ppc: http://packages.debian.org/experimental/libvirt-bin I'll move that one around once 0.4.0 has been built on all architectures: http://buildd.debian.org/~jeroen/status/package.php?p=libvirt
You can backport the package yourself: 1) download the .tar.gz, the .diff.gz and the .dsc 2) dpkg-source -x file.dsc 3) go into the dir 4) dpkg-buildpackage -rfakeroot If dependency problems arise and you don't want to pollute your system installing those packages, replace step 4 with: 4a) debuild -S -sa 4b) sudo pbuilder build ../file.dsc But you need to have installed pbuilder and have run pbuilder create before 4b (pbuilder is an UML environment which downloads all the dependencies, builds the packages and stores them usually in /var/cache/pbuilder/result ) -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer)

Since I was using the version from etch-backports (http://packages.qa.debian.org/libv/libvirt.html) I don't think so. The version on backports.org doesn't even have xen support enabled due to the missing libxen in Debian Lenny and Etch at that point - I tried to make that obvous from the changelog but obviously failed. There's now a libxenstore on backports.org since recently, so the new
Hi Felix, On Wed, Mar 26, 2008 at 02:52:14PM +0100, Felix Krohn wrote: packages on backports.org will have xen support. [..snip..]
The Debian package obviuosly doesn't have debugging-support compiled in, so I don't get more output. The LIBVIRT_DEBUG stuff isn't available in libvirt as of 0.4.0 so this is expected, the debug build is as easy as passing DEB_BUILD_OPTS=debug to the build though. Cheers, -- Guido

Hallo Guido, Guido Günther wrote:
The version on backports.org doesn't even have xen support enabled due to the missing libxen in Debian Lenny and Etch at that point - I tried to make that obvous from the changelog but obviously failed.
D'oh! Or I didn't read it...
There's now a libxenstore on backports.org since recently, so the new packages on backports.org will have xen support.
OK, good to know. Thanks for your informations! Felix -- Felix Krohn / After silence, that which comes ] |-> smtp, xmpp: felix@kro.hn / nearest to expressing the inexpres-] |-> gpg: 0x1C246E3B / sible is music. [Aldous Huxley] |-> https://kro.hn / http://www.flickr.com/kro_royal ]
participants (5)
-
Daniel P. Berrange
-
Felix Krohn
-
Guido Günther
-
Pau Garcia i Quiles
-
Richard W.M. Jones