win10_x64(vmware) --> ubuntu(qume)–> kylin_arm64
一、windows下安装vmware虚拟机
二、ubuntu下载地址 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/20.04/ubuntu-20.04.3-live-server-amd64.iso
三、vmware中新建虚拟机,并使用ubuntu-20.04.3-live-server-amd64.iso作为启用盘 。。。在虚拟机中安装ubuntu(略)
四、配置ssh(如果ssh登录不上时配置)
- 修改openssh的配置
vi /etc/ssh/sshd_config
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
systemctl restart sshd
五、配置虚拟机的网络为br0
cat > /etc/netplan/01-network-manager-all.yaml << 'EOF'
network:
version: 2
renderer: networkd
ethernets:
ens32:
dhcp4: no
dhcp6: no
bridges:
br0:
addresses: [192.168.11.220/24]
dhcp4: no
dhcp6: no
gateway4: 192.168.11.2
nameservers:
addresses: [192.168.11.2,223.5.5.5]
interfaces:
- ens32
EOF
重启网络
netplan apply
六、在虚拟机中安装qemu
apt-get update -y
apt install net-tools lrzsz wget unzip -y
apt openssh-server -y
apt install qemu -y
apt-get install qemu-kvm -y
apt install qemu-system-arm -y
apt-get install bridge-utils
七、下载centos7(aarch64) 和UEFI固件
wget http://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd
鲲鹏,飞腾版本 下载地址 https://pan.baidu.com/s/1GOLao-6WmGqUkCXf1CA6qg 提取码:1vt8
八、创建centos7(aarch7)虚拟机 把下载好的Kylin-Server-10-SP2-aarch64-Release-Build09-20210524.iso放到/test02目录下
sudo su -
mkdir /test02
cd /test02
qemu-img create -f qcow2 kylin-arm64.qcow2 40G
modprobe nbd max_part=12
qemu-nbd --connect=/dev/nbd0 kylin-arm64.qcow2
cat << END | fdisk /dev/nbd0
g
w
END
qemu-nbd --disconnect /dev/nbd0
cat > start.sh << 'EOF'
#!/bin/bash
#创建桥接网络
#visodu
#szgd ALL=(ALL) NOPASSWD: ALL
sudo ip tuntap add dev tap0 mod tap
sudo brctl addif br0 tap0
sudo ifconfig tap0 0.0.0.0 promisc up
sudo brctl showstp br0
SYSTEMISO=$(ls *.iso)
DISKFILE=$(ls *.qcow2)
qemu-system-aarch64 -m 6144 -cpu cortex-a72 -smp 6 -M virt \
-bios QEMU_EFI.fd \
-nographic \
-drive if=none,file=${DISKFILE},id=hd0 \
-device virtio-blk-device,drive=hd0 \
-device virtio-scsi-device \
-net nic,macaddr=`dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(.\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\14:\2:\3:\4:\5:\6/g'` \
-net tap,ifname=tap0,script=no,downscript=no \
# -drive if=none,file=${SYSTEMISO},id=cdrom,media=cdrom \
# -device scsi-cd,drive=cdrom \
EOF
九、安装银河麒麟V10_飞腾版
- 启动后选择 Troubleshooting -->
- 选择为基本显示模式
- 选择文本模式
- 配置这几项
- 开始安装 ,输入"b(开始)"
等待安装结果。。。(约半小时)
|