在计算节点(x86-compute和arm-compute)执行以下操作。使用的是libvirt-5.6版本。
1
|
vi /etc/yum.conf
|
1
|
sslverify=false |
1
|
wget https://www.kraxel.org/repos/firmware.repo --no-check-certificate -O /etc/yum.repos.d/firmware.repo |
1
|
yum -y install edk2.git.x86_64 |
1
|
yum -y install edk2.git-aarch64 |
1
|
yum -y install gnutls-devel libnl-devel libxml2-devel yajl-devel device-mapper-devel libpciaccess-devel |
1
|
wget https://libvirt.org/sources/libvirt-5.6.0-1.fc30.src.rpm --no-check-certificate -O /root/libvirt-5.6.0-1.fc30.src.rpm |
1 2 3 4 5 |
cd /root/ rpm -i libvirt-5.6.0-1.fc30.src.rpm yum -y install gcc git rpm-build iscsi-initiator-utils libxml2-devel readline-devel ncurses-devel libtasn1-devel gnutls-devel libattr-devel libblkid-devel augeas systemd-devel libpciaccess-devel yajl-devel sanlock-devel libpcap-devel libnl3-devel libselinux-devel dnsmasq radvd cyrus-sasl-devel libacl-devel parted-devel device-mapper-devel xfsprogs-devel librados2-devel librbd1-devel glusterfs-api-devel glusterfs-devel numactl-devel libcap-ng-devel fuse-devel netcf-devel libcurl-devel audit-libs-devel systemtap-sdt-devel nfs-utils dbus-devel scrub numad bash-completion qemu-img cd ~/rpmbuild/SPECS/ rpmbuild -bb libvirt.spec |
如果编译过程中提示如下信息:
"gcc ../src/libvirt_probes.o.dtrace-temp.c" failed Usage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]
请修改文件“ /bin/dtrace”,找到第308行,将keep_temps = False修改为keep_temps = True。
1
|
yum install -y /root/rpmbuild/RPMS/aarch64/*.rpm |
1
|
yum install -y /root/rpmbuild/RPMS/x86_64/*.rpm |
1
|
systemctl restart libvirtd |
vi /etc/libvirt/qemu.conf
1
|
nvram = ["/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd","/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"] |
1
|
virsh version
|
返回如下信息,其中libvirt版本为5.6.0,如果安装了QEMU,则QEMU应该为4.0.0,否则为默认版本2.12.0。