qemu工具搭建aarch64系统
下载准备
-
下载qemu: https://qemu.weilnetz.de/w64/2022/qemu-w64-setup-20220831.exe
-
下载固件:https://publishing-ie-linaro-org.s3.amazonaws.com/releases/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd?Signature=lueMJ1QvyHn%2FcKm%2BG6IQF56e%2Bs8%3D&Expires=1733195413&AWSAccessKeyId=AKIAIELXV2RYNAHFUP7A
-
使用的openEuler欧拉系统,下载镜像后进行解压:https://repo.openeuler.org/openEuler-20.03-LTS/virtual_machine_img/aarch64/openEuler-20.03-LTS.aarch64.qcow2.xz
构建
-
打开win10 下powershell,构建img
qemu-img create -f qcow2 openeuler.img 80G
-
构建系统,hostfwd=tcp::8081-:22很重要,用于ssh可以访问qemu内的系统,否则无法传输文件和远程访问操作,系统内22映射到外部8081端口(可以自行更改)
qemu-system-aarch64 -m 4096 -cpu cortex-a57 -smp 4 -M virt -net user,hostfwd=tcp::8081-:22 -net nic,model=virtio -bios D:\soft\qemu\arm\QEMU_EFI.fd -hda D:\Users\Downloads\openEuler-20.03-LTS.aarch64.qcow2\openEuler-20.03-LTS.aarch64.qcow2
- 会弹出界面,按ctrl+alt+2后进行安装,之后输入用户名:root,密码:openEuler12#$
系统一些准备
-
安装之后不能上外网,发现没有ifcfg-eth0文件,可以手动创建后重启
cd /etc/sysconfig/network-scripts/ [root@localhost network-scripts]# cat ifcfg-eth0 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eth0 DEVICE=eth0 ONBOOT=yes
-
service NetworkManager restart,ifconfig后发现有对应ip了
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
-
yum源,可以install包
cd /etc/yum.repos.d vi openEuler_aarch64.repo[base] name=base baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ enabled=1 gpgcheck=0
-
执行
yum clean all yum makecache
-