joe 发表于 2022-8-1 15:58:58

Windows 7使用QEMU安装arm Ubuntu18

准备工作
参考https://www.huaweicloud.com/kunpeng/software/qemu.html
准备qemu安装包qemu-w64-setup-20190218.exe
准备操作系统镜像:ubuntu-18.04.5-server-arm64.iso
准备bios文件:QEMU_EFI.fd
准备目录:D:\qemu\vm\test,D:\qemu\iso,D:\qemu\bios
把操作系统镜像ubuntu-18.04.2-live-server-amd64.iso放入D:\qemu\iso目录中
把bios文件QEMU_EFI.fd放入D:\qemu\bios中
安装QEMU
运行qemu-w64-setup-20190218.exe安装qemu,各种下一步
运行cmd窗口,进入qemu的安装目录
安装操作系统
启动安装
在qemu的安装目录运行命令qemu-img.exe create d:\qemu\vm\test\hdd1.img 40G创建虚拟磁盘
在qemu的安装目录运行命令开启虚拟机界面:
qemu-system-aarch64.exe -m 2048 -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 -M virt -bios D:\qemu\bios\QEMU_EFI.fd -net nic,model=pcnet -device VGA -drive if=none,file=D:\qemu\iso\ubuntu-18.04.5-server-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=D:\qemu\vm\test\hdd1.img,id=hd0 -device virtio-blk-device,drive=hd0

此时会打开ubuntu的安装界面,在弹出的QEMU窗口中选择View->serial0即可看到安装界面
选择语言地区
选择语言English
选择地区,other->Asia->China
选择默认语言United States
配置网络
如果启动安装的命令中取出-net nic则不会提示网络配置
configure the network选择continue
选择Configure network manually,一次填写IP、掩码、网关、host名
配置用户名
Set up users and passwords这里配置Full name for the new user,如root1
然后配置Username for your account:如root1
然后配置密码,如果用root作为密码会提示这是个弱密码,选择yes即可继续
磁盘分区
Partition disks里选择Guided - use entire disk
select disk to partition选择唯一的按个磁盘按回车
提示write the changes ot disks?选择yes,然后漫长的等待
配置代理
Configure the pack manager中会要求配置代理,直接continue即可跳过
自动更新
Configuring tasksel这里选择No automatic updates
软件预安装
Software selection中会有以下几个预安装项:
DNS server
LAMP server
Mail server
PostgreSQL database
Print server
Samba file server
OpenSSHserver
选择需要的即可,光标移动到需要的软件前按空格即可选中,然后continue
如果选择安装Mail server,会要求选择一个邮件服务器,continue然后选local only即可,随便写个hostname继续,之后的过程也很漫长
安装结束
Finish the installation中选择continue
提示login的时候,输入之前的username和密码登录
执行sudo passwd root,输入当前账号的密码,然后输入两次自定义的root账号密码,即可设置root权限登录密码
执行su,然后输入root权限密码即可提权至root权限
运行arch命令可以看到aarch64,表示是以amr架构运行的虚拟机
再次启动
之间关闭QEMU窗口即可关闭虚拟机,再次启动时在qemu的安装目录中运行以下命令即可启动虚拟机,在开启的QEMU窗口中选择View然后选择serial0即可查看界面:
qemu-system-aarch64.exe -m 2048 -cpu cortex-a72 -smp 2 -M virt -bios D:\qemu\bios\QEMU_EFI.fd -device VGA -device virtio-scsi-device -drive if=none,file=D:\qemu\vm\test\hdd1.img,id=hd0 -device virtio-blk-device,drive=hd0

备注
这个安装的操作系统是没有图形界面的
网络联通情况可能需要额外配置
————————————————
版权声明:本文为CSDN博主「于水丶」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_33037487/article/details/112472759

joe 发表于 2022-8-1 16:09:14

QEMU Binaries for Windows (64 bit)https://qemu.weilnetz.de/w64/2022/
各种芯片架构的iso: http://mirrors.ustc.edu.cn/ubuntu-releases/

joe 发表于 2022-8-2 14:35:14

arm芯片架构iso:https://old-releases.ubuntu.com/releases/18.04.1/
页: [1]
查看完整版本: Windows 7使用QEMU安装arm Ubuntu18