手欠把自用的一台宿主机的OS进行yum update 升级,升级的同时kvm也进行了升级。升级后,发现虚拟化服务libvirtd启不来了,报错:error : virModuleLoadFile:53 : internal error: Failed to load module ‘/usr/lib64/libvirt/storag e-backend/libvirt_storage_backend_rbd.so’: /usr/lib64/libvirt/storage-backend/libvirt_storage_backend_rbd.so: undefined symbol: rbd_diff_iterate2 。把libvirtd相关的包删除再重装,问题依旧。其报错信息如下:
Jan 15 10:33:17 localhost systemd: Starting Virtualization daemon... Jan 15 10:33:17 localhost libvirtd: 2019-01-15 02:33:17.873+0000: 5879: info : libvirt version: 4.5.0, package: 10.el7_6.3 (CentOS BuildSystem <http://bugs.centos.org>, 2018-11-28-20:51:39, x86-01.bsys.centos.org) Jan 15 10:33:17 localhost libvirtd: 2019-01-15 02:33:17.873+0000: 5879: info : hostname: localhost.localdomain Jan 15 10:33:17 localhost libvirtd: 2019-01-15 02:33:17.873+0000: 5879: error : virModuleLoadFile:53 : internal error: Failed to load module '/usr/lib64/libvirt/storage-backend/libvirt_storage_backend_rbd.so': /usr/lib64/libvirt/storage-backend/libvirt_storage_backend_rbd.so: undefined symbol: rbd_diff_iterate2 Jan 15 10:33:17 localhost systemd: libvirtd.service: main process exited, code=exited, status=3/NOTIMPLEMENTED Jan 15 10:33:17 localhost systemd: Failed to start Virtualization daemon. Jan 15 10:33:17 localhost systemd: Unit libvirtd.service entered failed state. Jan 15 10:33:17 localhost systemd: libvirtd.service failed. Jan 15 10:33:18 localhost systemd: libvirtd.service holdoff time over, scheduling restart.
放狗(google)搜索了下,发现是红帽的bug https://bugzilla.redhat.com/show_bug.cgi?id=1658652 ,红帽在 https://access.redhat.com/solutions/3746691 页面(需红帽帐号)给出了原因和解决方案。
问题原因:older version of libvirt-daemon-driver-storage-rbd usually used in older RHEL 7.x version which is missing the librbd1 dependency。(动态链接库缺失)
具体可以通过如下方法查看:
[root@rhvh42 storage-backend]# file libvirt_storage_backend_rbd.so libvirt_storage_backend_rbd.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f0289019f4ff9a0c87c47c928457be3672448e47, stripped
缺失的链接库文件在librbd1包里,解决方法如下:
yum update librbd1 systemctl restart libvirtd