Libvirterror:no Connection driver available for Qemu:///system solution

Source: Internet
Author: User

After a set of K-version OpenStack environments were deployed today, after starting the Nova-compute, the log reported the following error (because there is a scheduled task within it to connect to the LIBVIRTD process):

2015-08-14 10:01:00.061 28580 TRACE nova.virt.libvirt.host   "/usr/lib64/python2.7/site-packages/ libvirt.py" in openauth2015-08-14 10:01:00.061 28580 TRACE nova.virt.libvirt.host     If is None:raise libvirterror ('Virconnectopenauth () failed ' )libvirterror:no Connection driver available for Qemu:///system

Just beginning to see this error, first the first reaction is not the LIBVIRTD process does not start up, so PS view OK, the discovery has started up:

[[Email protected] ~] # PS aux | grep libvirtdroot      2648  0.0  0.0 112640   980 pts/1    s+   10:34   0:00 grep-- color=Auto libvirtdroot     31850  0.1  0.0 1053776 7264?        SSL  10:17   /usr/sbin/libvirtd --listen

Later, attempting to execute the next Virsh List command directly, the same error is obtained:

[[Email protected] ~] # Virsh List   for <null>error:failed to reconnect to the hypervisor

And then wondering if the URI is incorrect, so I specify the URI to try the command again and return an error:

[[Email protected] ~] # virsh-c Qemu:///system List   for Qemu:///system

To maintain the correct URI for each use, I later set the Uri_default in the/etc/libvirt/libvirt.conf configuration file directly to Qemu:///system:

[Email protected] ~]#Cat/etc/libvirt/libvirt.conf # # This can is used to setup URI aliases forfrequently# used connection URIs. Aliases contain only the# characters a-Z,0-9, _, -. # # following the'='May is any valid Libvirt connection# URI, including arbitrary parameters#uri_aliases= [#  "Hail=qemu+ssh://[email Protected]/system",#  "Sleet=qemu+ssh://[email Protected]/system", #]## This can being used to prevent probing of the hypervisor# driver when no URIs are supplied by the application. Uri_default = "Qemu:///system"

Then restart the LIBVIRTD process, through the SYSTEMCTL command to see the status of the LIBVIRTD process, found the following 3 errors:

[[Email protected] ~]# systemctl Status Libvirtdlibvirtd.service-Virtualization Daemon loaded:loaded (/usr/lib/systemd/system/libvirtd.service; enabled) Active:active (running) since Fri -- ,- - Ten: One: -CST; 4s ago Docs:Mans: LIBVIRTD (8) http://libvirt.orgMain PID:30568(LIBVIRTD) CGroup:/system.slice/libvirtd.service└─30568/USR/SBIN/LIBVIRTD--Listenaug - Ten: One: -Localhost.localdomain libvirtd[30568]: Libvirt version:1.2.8, Package: -. El7_1.3(CentOS Buildsystem //Bugs.centos.org>, 2015-05-12-20:12:58, worker1.bsys.centos.org)The - Ten: One: -Localhost.localdomain libvirtd[30568]:failed to load module/usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so/usr/lib64/libvirt/ connection-driver/ ... e reference - Ten: One: -Localhost.localdomain libvirtd[30568]:failed to load module/usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so/usr/lib64/libvirt/ connection-driver/ lib...efilecreate - Ten: One: -Localhost.localdomain libvirtd[30568]:module/usr/lib64/libvirt/connection-driver/ libvirt_driver_lxc.so not accessible - Ten: One: -Localhost.localdomain systemd[1]: Started virtualization daemon. Hint:some lines were ellipsized, use-L to showinchFull.

From the above error, two errors are due to libvirt_driver_storage.so, libvirt_driver_qemu.so load failure, one error is because there is no libvirt_driver_lxc.so module.

So look under the directory/usr/lib64/libvirt/connection-driver/to see if there are three of the above module:

[Email protected] ~]# ll/usr/lib64/libvirt/connection-driver/ Total1996-rwxr-xr-x1Root root107440May - Geneva: -libvirt_driver_interface.so-rwxr-xr-x1Root root148600May - Geneva: -libvirt_driver_network.so-rwxr-xr-x1Root root107144May - Geneva: -libvirt_driver_nodedev.so-rwxr-xr-x1Root root165688May - Geneva: -libvirt_driver_nwfilter.so-rwxr-xr-x1Root root1175776May - Geneva: -libvirt_driver_qemu.so-rwxr-xr-x1Root root86448May - Geneva: -libvirt_driver_secret.so-rwxr-xr-x1Root root233448May - Geneva: - libvirt_driver_storage.so

Found libvirt_driver_storage.so, libvirt_driver_qemu.so exist, and libvirt_driver_lxc.so does not exist.

For libvirt_driver_lxc.so does not exist, should be the corresponding RPM package is not installed, we only need to install:

Yum Install LIBVIRT-DAEMON-LXC

After installation, again through the systemctl to see the status of the LIBVIRTD process, the remaining two errors are not resolved:

[[Email protected] ~]# systemctl Status Libvirtdlibvirtd.service-Virtualization Daemon loaded:loaded (/usr/lib/systemd/system/libvirtd.service; enabled) Active:active (running) since Fri -- ,- - Ten: -: atCST; 3s ago Docs:Mans: LIBVIRTD (8) http://libvirt.orgMain PID:31204(LIBVIRTD) CGroup:/system.slice/libvirtd.service└─31204/USR/SBIN/LIBVIRTD--Listenaug - Ten: -: ALocalhost.localdomain libvirtd[31204]: Libvirt version:1.2.8, Package: -. El7_1.3(CentOS Buildsystem //Bugs.centos.org>, 2015-05-12-20:12:58, worker1.bsys.centos.org)The - Ten: -: ALocalhost.localdomain libvirtd[31204]:failed to load module/usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so/usr/lib64/libvirt/ connection-driver/ ... e reference - Ten: -: atLocalhost.localdomain libvirtd[31204]:failed to load module/usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so/usr/lib64/libvirt/ connection-driver/ lib...efilecreate - Ten: -: atLocalhost.localdomain systemd[1]: Started virtualization daemon. Hint:some lines were ellipsized, use-L to showinchFull.

Then look at the system log of the/var/log/message about the LIBVIRTD process and find the error log:

10:14:22 localhost journal:failed to load module/usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so:symbol Dm_task_get_info_with_deferred_remove,  Version Base not defined in file libdevmapper.so.1.02 with link time Referenceaug 10:14:23 localhost journal:failed to Load module/usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so/usr/lib64/libvirt/connection-driver/ libvirt_driver_qemu.so:undefined symbol:virstoragefilecreate

From the above error,undefined symbol, it is obvious, because driver required reference is undefined, so think should be libdevmapper.so.1.02 library is too old, and LIBVIRTD library does not match, so try to update the next Device-mapper:

Yum Update device-mapper

After the update, restart the LIBVIRTD process and check its status again:

[[Email protected] ~]# systemctl Restart Libvirtd[[email protected]~]# systemctl Status Libvirtdlibvirtd.service-Virtualization Daemon loaded:loaded (/usr/lib/systemd/system/libvirtd.service; enabled) Active:active (running) since Fri -- ,- - Ten: -: -CST; 2s ago Docs:Mans: LIBVIRTD (8) http://libvirt.orgMain PID:31850(LIBVIRTD) CGroup:/system.slice/libvirtd.service└─31850/USR/SBIN/LIBVIRTD--Listenaug - Ten: -: -Localhost.localdomain systemd[1]: Started Virtualization daemon.

Found no problem occurred, try to execute the Virsh List command, also OK:

[[Email protected] ~]# virsh list Id    Name                           State----------------------------------------------------

Finally, start the Openstack-nova-compute, and no more initial errors occur.

Libvirterror:no Connection driver available for Qemu:///system solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.