yum install -y vim qemu libvirt edk2-aarch64 glib2-devel zlib-devel pixman-devel gtk3-devel vte291-devel libaio-devel libcap-devel libiscsi-devel libvirt-devel meson rpcgen libpciaccess-devel yajl-devel CUnit-devel libtirpc-devel-1.2.6 libxml2-devel autoconf automake libtool openssl-devel ncurses-devel gcc-c++.aarch64 gperftools-libs.aarch64 librbd-devel-14.2.8
python3 -m pip install -U matplotlib pip install rst2html5 pip install prettytable pip3 install pyelftools pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --user meson==0.57.1
使用pip3安装meson 0.57.1的速度比较慢,如果失败,请重新执行安装命令,也可手动下载对应的meson-0.57.1的包进行手动安装。
wget https://pypi.tuna.tsinghua.edu.cn/packages/0f/f8/e67e447cb3c8fe391ad8cedd67cab81486831e37a3a028c9a6974fe63a38/meson-0.57.1.tar.gz
systemctl start libvirtd systemctl enable libvirtd
wget https://download.qemu.org/qemu-5.0.0.tar.xz --no-check-certificate tar -xf qemu-5.0.0.tar.xz cd qemu-5.0.0 ./configure --prefix=/usr --enable-tcmalloc make -j make -j install
wget https://libvirt.org/sources/libvirt-7.1.0.tar.xz --no-check-certificate tar -xf libvirt-7.1.0.tar.xz cd libvirt-7.1.0 sed -i "s/^[^#].*subdir('docs')/#&/g" meson.build meson build --prefix=/usr ninja -C build ninja -C build install
git clone https://github.com/spdk/spdk cd spdk git reset --hard v21.04 git submodule update --init ./configure --with-shared --enable-debug --disable-tests --disable-unit-tests --with-rbd make -j && make install
cd dpdk git reset --hard v19.11 meson --prefix=/usr --libdir=/usr/lib64 --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include/dpdk -Dc_args="-fstack-protector-strong" -Dc_link_args="-Wl,-z,relro,-z,now,-z,noexecstack" build ninja -C build && ninja -C build install && ldconfig
vi /etc/ld.so.conf
/usr/local/lib
ldconfig
[update] name=update baseurl=http://repo.openeuler.org/openEuler-20.03-LTS-SP1/update/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS-SP1/OS/$basearch/RPM-GPG-KEY-openEuler
yum clean all yum makecache
yum install -y virt-install
下载链接:https://repo.openeuler.org/openEuler-20.03-LTS-SP1/ISO/aarch64/
virt-install --name openEuler --vcpus=4 --ram 8192 --location=/home/iso/openEuler-20.03-LTS-SP1-aarch64-dvd.iso --nographics --disk path=/home/kvm/images/openEuler.qcow2,size=20,bus=virtio,format=qcow2 --extra-args="console=ttyS0,115200n8"
上述命令中,“/home/iso”为iso镜像存放路径,path用于指定虚拟机qcow2文件的保存路径,请根据实际情况修改。