Who:数字基建质检员Yison
What:源码编译libvirt
When:2022/05/09
Where:openEuler20.03虚拟机
Why:恰饭!
How:如下
- 下载libvirt源码包
cd /root/ && wget https://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS-SP3/source/Packages/libvirt-6.2.0-16.oe1.src.rpm
- 下载打包工具
yum install rpmdevtools rpm-build
- 配置打包路径
rpmdev-setuptree
- 解开qemu的源码rpm包,并安装构建qemu包的依赖
cd /root/rpmbuild/SOURCES/ && rpm2cpio /root/libvirt-6.2.0-16.oe1.src.rpm|cpio -ivd && yum builddep libvirt.spec
- 开始打包qemu包
cd /root/rpmbuild/SPECS/ && cp /root/rpmbuild/SOURCES/libvirt.spec . && rpmbuild -ba libvirt.spec
configure报错"rbd_get_features no",同样也是升级glibc后成功编译。
安装libvirt系列包和运行依赖后,报错如下
5月 09 17:51:48 localhost.localdomain systemd[1]: Failed to start Virtualization daemon. -- Subject: libvirtd.service 单元已失败 -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- libvirtd.service 单元已失败。 -- -- 结果为“failed”。 5月 09 17:51:48 localhost.localdomain systemd[1]: libvirtd-admin.socket: Failed with result 'service-start-limit-hit'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The unit libvirtd-admin.socket has entered the 'failed' state with result 'service-start-limit-hit'. 5月 09 17:51:48 localhost.localdomain systemd[1]: libvirtd.socket: Failed with result 'service-start-limit-hit'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The unit libvirtd.socket has entered the 'failed' state with result 'service-start-limit-hit'. 5月 09 17:51:48 localhost.localdomain systemd[1]: libvirtd-ro.socket: Failed with result 'service-start-limit-hit'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The unit libvirtd-ro.socket has entered the 'failed' state with result 'service-start-limit-hit'. 5月 09 17:51:48 localhost.localdomain systemd[1]: Closed Libvirt local read-only socket. -- Subject: libvirtd-ro.socket 单元已结束停止操作 -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
后升级libiscsi为1.19.0版本后,libvirt即可正常运行。



