[Libvir] virsh command is getting a connecting error

Hi, It was working fine on March 8th, but today it failed to do virsh command with an error message. # virsh list libvir: error : no support for hypervisor lt-virsh: error: failed to connect to the hypervisor This message is printed here because nb_network_drivers is 0. --- libvirt.c : virConnectOpen 317 if (ret->nb_drivers == 0 || ret->nb_network_drivers == 0) { 318 /* we failed to find an adequate driver */ 319 virLibConnError(NULL, VIR_ERR_NO_SUPPORT, name); 320 goto failed; 321 } I think the cause is because it failed to bind the socket at qemuOpenClientUNIX. --- qemu_internal.c : qemuOpenClientUNIX 232 /* 233 * now bind the socket to that address and listen on it 234 */ 235 if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { They are setting members of sockaddr: {sun_family = 1, sun_path = "/usr/var/run/libvirt/qemud-sock", '\0'} and connect returned -1 with errno that was 2(ENOENT). Is there any problem? Please tell me how I can use current virsh command. Thanks, Saori Fukuta.

On Tue, Mar 13, 2007 at 11:37:24AM +0900, Saori Fukuta wrote:
Hi,
It was working fine on March 8th, but today it failed to do virsh command with an error message.
# virsh list libvir: error : no support for hypervisor lt-virsh: error: failed to connect to the hypervisor
This message is printed here because nb_network_drivers is 0. --- libvirt.c : virConnectOpen 317 if (ret->nb_drivers == 0 || ret->nb_network_drivers == 0) { 318 /* we failed to find an adequate driver */ 319 virLibConnError(NULL, VIR_ERR_NO_SUPPORT, name); 320 goto failed; 321 }
I think the cause is because it failed to bind the socket at qemuOpenClientUNIX. --- qemu_internal.c : qemuOpenClientUNIX 232 /* 233 * now bind the socket to that address and listen on it 234 */ 235 if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
They are setting members of sockaddr: {sun_family = 1, sun_path = "/usr/var/run/libvirt/qemud-sock", '\0'} and connect returned -1 with errno that was 2(ENOENT).
Is there any problem? Please tell me how I can use current virsh command.
Make sure the libvirt daemon is running - eg with /etc/init.d/libvirt start This should give you a libvirt_qemud process listening on the desired socket. NB, even though the daemon has _qemud in the name, it *is* also used for Xen management - it provides managed virtual networking for guests. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Tue, 13 Mar 2007 03:01:03 +0000, "Daniel P. Berrange" wrote:
On Tue, Mar 13, 2007 at 11:37:24AM +0900, Saori Fukuta wrote:
Hi,
It was working fine on March 8th, but today it failed to do virsh command with an error message.
# virsh list libvir: error : no support for hypervisor lt-virsh: error: failed to connect to the hypervisor
Is there any problem? Please tell me how I can use current virsh command.
Make sure the libvirt daemon is running - eg with
/etc/init.d/libvirt start
This should give you a libvirt_qemud process listening on the desired socket. NB, even though the daemon has _qemud in the name, it *is* also used for Xen management - it provides managed virtual networking for guests.
Regards, Dan.
Thank you Dan! Maybe I made a mistake in using the configure options. I did below. # ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var and followed your advice. # /etc/init.d/libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] # ps -ef | grep libvirt root 11082 1 0 14:56 ? 00:00:00 libvirt_qemud --system --daemon root 11111 3522 0 14:56 pts/2 00:00:00 grep libvirt So now I can use virsh command. # /usr/bin/virsh list Id Name State ---------------------------------- 0 Domain-0 running Thanks, Saori Fukuta.
participants (2)
-
Daniel P. Berrange
-
Saori Fukuta