我要评分
获取效率
正确性
完整性
易理解

Installing libvirt

Perform the following operations on the compute nodes (x86-compute and arm-compute). Use libvirt 5.6.

  1. Disable the SSL verification.
    1. Open the file.
      1
      vi /etc/yum.conf
      
    2. Press i to enter the insert mode and add the following content to the file:
      1
      sslverify=false
      
    1. Press Esc, type :wq!, and press Enter to save the file and exit.
  2. Install edk2.
    1
    wget https://www.kraxel.org/repos/firmware.repo --no-check-certificate -O /etc/yum.repos.d/firmware.repo
    
    On the x86-compute node:
    1
    yum -y install edk2.git.x86_64
    
    On the arm-compute node:
    1
    yum -y install edk2.git-aarch64
    
  3. Install dependencies.
    1
    yum -y install gnutls-devel libnl-devel libxml2-devel yajl-devel device-mapper-devel libpciaccess-devel
    
  4. Install libvirt-5.6.0 by compiling the source code.
    1. Download the libvirt source code.
      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
      
    2. Compile the source code.
      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
      

      If the following information is displayed during the compilation:

      "gcc ../src/libvirt_probes.o.dtrace-temp.c" failed
      Usage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]

      Modify the /bin/dtrace file. In line 308, modify keep_temps = False to keep_temps = True.

    3. Install libvirt.
      • On the Arm compute nodes:
        1
        yum install -y /root/rpmbuild/RPMS/aarch64/*.rpm
        
      • On the x86 compute nodes:
        1
        yum install -y /root/rpmbuild/RPMS/x86_64/*.rpm
        
    4. Restart the libvirt service.
      1
      systemctl restart libvirtd
      
  5. Modify the /etc/libvirt/qemu.conf configuration file on the Arm compute node.
    1. Open the file.
      vi /etc/libvirt/qemu.conf
    2. Press i to enter the insert mode and add the content related to AAVMF to the file:
      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"]
      

    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  6. Check the libvirt and QEMU version information.
    1
    virsh version
    

    The following information is displayed indicating that the libvirt version is 5.6.0 and the QEMU version is 4.0.0 when QEMU is installed. If QEMU is not installed, the default QEMU version is 2.12.0.