玩客云只支持armv7,在ubuntu server上可以用qemu建立arm64虚拟机。
安装ubuntu server
平常安装的都是桌面版,这次安装server版,安装界面都是文本模式,安装起来比gui方式费劲多了,由于ubuntu安全服务器连不上,安装时设置了一个本地http代理,安装完成后却找不到这个代理设置在什么地方,最后在/etc/apt/apt.conf.d下找到一个名字里有proxy的文件里找到了,删除之后网络正常,不需时时挂上代理。
/etc/apt/apt.conf.d/90curtin-aptproxy
文件内容:
Acquire::http::Proxy "http://192.168.0.4:10809";
Acquire::https::Proxy "http://192.168.0.4:10809";
准备工作
- 安装qemu-system-aarch64
apt install qemu-system-aarch64
- uefi固件下载:
wget https://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd
- ubuntu arm64安装镜像下载:
wget https://old-releases.ubuntu.com/releases/16.04.3/ubuntu-16.04.3-server-arm64.iso
搭梯子下载比较快,用sftp传到主机上。 - 创建虚拟硬盘:
qemu-img create ubuntu16.04-arm64.img 16G
虚拟机安装
qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios QEMU_EFI.fd -nographic -drive if=none,file=ubuntu-16.04.3-server-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=ubuntu16.04-arm64.img,id=hd0 -device virtio-blk-device,drive=hd0
安装成功后,再启动
qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios QEMU_EFI.fd -nographic -drive if=none,file=ubuntu16.04-arm64.img,id=hd0 -device virtio-blk-device,drive=hd0
安装了很久,显示成功了,但是去掉安装镜像,就启动不起来,停止在efi启动界面,进不到操作系统,不知道是不是efi文件的问题。dc7900性能太差了,跑一个ubuntu很费劲,server要稍微好一点,里面再跑一个qemu不行了,和pixel3上跑termux-qemu-debian速度差不多。