[libvirt] fail to run virsh

Hi, I installed libvirt (cvs version), and can confirm that libvirtd is running. However, virsh failed to work. I got the below message when running virsh with debugging information. How to fix this problem? Many thanks, Jun # LIBVIRT_DEBUG=1 virsh DEBUG: libvirt.c: virInitialize (register drivers) DEBUG: libvirt.c: virConnectOpenAuth (name=(null), auth=0xb7f53b84, flags=0) DEBUG: libvirt.c: do_open (Probed qemu:///system) DEBUG: lxc_driver.c: lxcCheckContainerSupport (clone call returned EINVAL, container support is not enabled) DEBUG: libvirt.c: do_open (Using qemu:///system as default URI, 1 hypervisor found) DEBUG: libvirt.c: do_open (name "qemu:///system" to URI components: scheme qemu opaque (null) authority (null) server (null) user (null) port 0 path /system ) DEBUG: libvirt.c: do_open (trying driver 0 (Test) ...) DEBUG: libvirt.c: do_open (driver 0 Test returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 1 (QEMU) ...) DEBUG: libvirt.c: do_open (driver 1 QEMU returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 2 (Xen) ...) DEBUG: libvirt.c: do_open (driver 2 Xen returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 3 (OPENVZ) ...) DEBUG: libvirt.c: do_open (driver 3 OPENVZ returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 4 (LXC) ...) DEBUG: libvirt.c: do_open (driver 4 LXC returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 5 (remote) ...) DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = qemu:///system) libvir: Remote error : No such file or directory DEBUG: libvirt.c: do_open (driver 5 remote returned ERROR) DEBUG: hash.c: virUnrefConnect (unref connection 0x806b588 qemu:///system 1) DEBUG: hash.c: virReleaseConnect (release connection 0x806b588 qemu:///system) error: failed to connect to the hypervisor

Please can somebody help? I am kind of stucked here. Thanks, Jun On Thu, Aug 14, 2008 at 5:27 PM, Jun Koi <junkoi2004@gmail.com> wrote:
Hi,
I installed libvirt (cvs version), and can confirm that libvirtd is running. However, virsh failed to work. I got the below message when running virsh with debugging information.
How to fix this problem?
Many thanks, Jun
# LIBVIRT_DEBUG=1 virsh DEBUG: libvirt.c: virInitialize (register drivers) DEBUG: libvirt.c: virConnectOpenAuth (name=(null), auth=0xb7f53b84, flags=0) DEBUG: libvirt.c: do_open (Probed qemu:///system) DEBUG: lxc_driver.c: lxcCheckContainerSupport (clone call returned EINVAL, container support is not enabled) DEBUG: libvirt.c: do_open (Using qemu:///system as default URI, 1 hypervisor found) DEBUG: libvirt.c: do_open (name "qemu:///system" to URI components: scheme qemu opaque (null) authority (null) server (null) user (null) port 0 path /system ) DEBUG: libvirt.c: do_open (trying driver 0 (Test) ...) DEBUG: libvirt.c: do_open (driver 0 Test returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 1 (QEMU) ...) DEBUG: libvirt.c: do_open (driver 1 QEMU returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 2 (Xen) ...) DEBUG: libvirt.c: do_open (driver 2 Xen returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 3 (OPENVZ) ...) DEBUG: libvirt.c: do_open (driver 3 OPENVZ returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 4 (LXC) ...) DEBUG: libvirt.c: do_open (driver 4 LXC returned DECLINED) DEBUG: libvirt.c: do_open (trying driver 5 (remote) ...) DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = qemu:///system) libvir: Remote error : No such file or directory DEBUG: libvirt.c: do_open (driver 5 remote returned ERROR) DEBUG: hash.c: virUnrefConnect (unref connection 0x806b588 qemu:///system 1) DEBUG: hash.c: virReleaseConnect (release connection 0x806b588 qemu:///system) error: failed to connect to the hypervisor

On Thu, Aug 14, 2008 at 05:27:14PM +0900, Jun Koi wrote:
Hi,
I installed libvirt (cvs version), and can confirm that libvirtd is running. However, virsh failed to work. I got the below message when running virsh with debugging information.
# LIBVIRT_DEBUG=1 virsh DEBUG: libvirt.c: virInitialize (register drivers)
...
DEBUG: libvirt.c: do_open (trying driver 5 (remote) ...) DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = qemu:///system) libvir: Remote error : No such file or directory
This suggests that its not able to connect to the daemon. Are you using the version of virsh that matches the libvirtd daemon you compiled ? If you have a pre-built virsh from your distro installed, and then do a CVS build with a different '--prefix' to configure that could explain this. Daniel -- |: Red Hat, Engineering, London -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 :|

On Fri, Aug 15, 2008 at 4:21 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Thu, Aug 14, 2008 at 05:27:14PM +0900, Jun Koi wrote:
Hi,
I installed libvirt (cvs version), and can confirm that libvirtd is running. However, virsh failed to work. I got the below message when running virsh with debugging information.
# LIBVIRT_DEBUG=1 virsh DEBUG: libvirt.c: virInitialize (register drivers)
...
DEBUG: libvirt.c: do_open (trying driver 5 (remote) ...) DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = qemu:///system) libvir: Remote error : No such file or directory
This suggests that its not able to connect to the daemon. Are you using the version of virsh that matches the libvirtd daemon you compiled ? If you have a pre-built virsh from your distro installed, and then do a CVS build with a different '--prefix' to configure that could explain this.
I tried to recompile libvirt cvs again, then got this error: ./.libs/libvirt.so: undefined reference to `xenUnifiedRegister' ./.libs/libvirt.so: undefined reference to `xenUnifiedRegister' collect2: ld returned 1 exit status make[3]: *** [virsh] Error 1 I searched around, but dont see how to fix this. (this is on Ubuntu 8.04) Thank you, Jun
participants (2)
-
Daniel P. Berrange
-
Jun Koi