1、Vmware centos7开启虚拟化支持
虚拟机设置 / 虚拟化引擎 / 虚拟化 Intel VT-x/EPT
执行命令 egrep '(vmx|svm)' /proc/cpuinfo,有输出即表示开启了虚拟化
2、下载编译 qemu
cd /opt/qemu-centos
wget https://download.qemu.org/qemu-8.1.0-rc1.tar.xz
tar xvJf qemu-8.1.0-rc1.tar.xz
cd qemu-8.1.0-rc1
./configure --target-list=aarch64-softmmu
make –j2
make install
3、下载 centos arm64系统iso
/opt/qemu-centos /CentOS-7-aarch64-Everything-2009.iso
4、创建硬盘文件
qemu-img create -f qcow2 CentOS-7-aarch64-Everything-2009.qcow2 20G
5、安装 CentOS-7-aarch64
qemu-system-aarch64 \
-m 1024 \
-cpu cortex-a57 \
-smp 2 \
-M virt \
-bios QEMU_EFI.fd \
-nographic \
-device scsi-cd,drive=cdrom \
-drive if=none,file=CentOS-7-aarch64-Everything-2009.iso,id=cdrom,media=cdrom \
-device virtio-scsi-device \
-drive if=none,file=CentOS-7-aarch64-Everything-2009.qcow2,id=hd0 \
-device virtio-blk-device,drive=hd0
6、关闭 CentOS-7-aarch64
shutdown –h now
7、启动 CentOS-7-aarch64
qemu-system-aarch64 \
-m 1024 \
-cpu cortex-a57 \
-smp 2 \
-M virt \
-bios QEMU_EFI.fd \
-nographic \
-device virtio-scsi-device \
-drive if=none,file=CentOS-7-aarch64-Everything-2009.qcow2,id=hd0 \
-device virtio-blk-device,drive=hd0