如果对图形化界面没有诉求,能够使用命令行进行虚拟化相关操作,建议使用系统自 带的libvirt-4.5.0。 由于libvirt-4.5.0代码存在bug,所以在使用virt-manager时会触发一些报错,例如: internal error: Socket 6378 can't be handled (max socket is 4095),如果一定要用 virt-manager操作,可按照以下所述安装更高版本。
一、安装edk2
在线安装 执行如下命令在线安装edk2(服务器需要配置外网环境)
1) wget https://www.kraxel.org/repos/firmware.repo -O /etc/yum.repos.d/firmware.repo --no-check-certificate
#--no-check-certificate:不验证证书
yum clean all
yum repolist
2)yum -y install edk2.git-aarch64
离线安装
访问以下地址下载安装包:https://www.kraxel.org/repos/jenkins/edk2/
二、安装依赖包
yum -y install gluster* 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 libcapng-devel fuse-devel netcf-devel libcurl-devel audit-libs-devel systemtap-sdt-devel nfs-utils dbusdevel scrub numad libcap-ng-devel dbus-devel
三、获取源码包
在线执行以下命令
wget https://libvirt.org/sources/libvirt-5.6.0-1.fc30.src.rpm --no-check-certificate
四、编译安装
1) 安装获取的源码包
rpm -ivh libvirt-5.6.0-1.fc30.src.rpm
2) 编译生成rpm包
cd /root/rpmbuild/SPECS
rpmbuild -ba libvirt.spec
3) 安装rpm包
cd /root/rpmbuild/RPMS/aarch64/
yum -y install *.rpm
4) 修改配置文件
在/etc/libvirt/QEMU.conf文件中添加以下内容
nvram = ["/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"]
5) 重启libvirtd服务
systemctl restart libvirtd.service
6) 关闭SELinux
setenforce 0
五、验证环境
libvirtd –version
手机扫一扫
移动阅读更方便
你可能感兴趣的文章