win10(x86)安装银河麒麟(arm) 虚拟机

返回
Author Avatar
钢翼
2022-09-09
编程
776

参考 https://blog.csdn.net/weixin_44255842/article/details/120652227

1.下载qemu虚拟机

https://qemu.weilnetz.de/w64/2021/qemu-w64-setup-20210505.exe

下载并安装qemu

2.UEFI

http://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd

3.创建硬盘文件

请自行指定路径

qemu-img create -f qcow2 H:\vm\arm64\kylindisk.qcow2 50G

4.加载镜像启动

需准备银河麒麟的ios镜像。这里我用了pe镜像。正常安装镜像安装时报Unable to satisfy all constraints on the partition.无法安装。

pe有个问题,你所有更改在重启后都会消失。我这里只是用来编译和打deb包,用pe问题不大。但每次都得设置密码,才能使用ssh连接还是挺麻烦的。还是得找个时间研究下为啥安装不成功的问题。

在qemu安装目录下执行,其中QEMU_EFI.fd和iso和qcow2的路径请自行修改。

qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -bios H:\vm\arm64\QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=H:\vm\arm64\kylindisk.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -drive if=none,file=G:\Downloads\Kylin-desktop-ft-pe-1101-test.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom  -net nic -net user,hostfwd=tcp::2222-:22

5.ssh连接

启动后,通过 sudo passwd root修改密码后,即可在宿主机上通过本机2222端口访问

ssh 127.0.0.1:2222

6.银河麒麟V10更改源

由于默认的源会报域名无法解析

vi /etc/apt/sources.list

添加以下源,并通过#号注释其他源。不过试过有些包依然会走原来的源下载,报域名无法解析。

deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse



deb     http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb     http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb     http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb     http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib


导入公钥

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys {NO_PUBKEY的值} 

7.安装谷歌浏览器

安装能成功,启动不来,不知道是不是pe的问题。

apt-get install chromium-browser