QEMU运行CentOS arm64虚拟机无法联网?(使用TAP)

APlus
  • 0
新手上路,请多包涵

环境

物理机环境:Windows 10 x64 20H2
使用的QEMU版本:5.1.92.0
虚拟机系统:CentOS 7.6 aarch64

问题

虚拟机无法联网,也无法连接物理机(ping物理机不通)

启动命令:

qemu-system-aarch64.exe \
-m 2048 -cpu cortex-a53 -smp 4 \
-M virt -bios QEMU_EFI.fd \
-nographic \
-device virtio-scsi-device \
-drive if=none,file=centos7aarch64.qcow2,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-device virtio-net-device,netdev=network0,mac=52:54:01:4a:1f:e4 \
-netdev tap,id=network0,ifname="OpenVPN TAP-Windows6",script=no,downscript=no

虚拟机下ip addr命令结果:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:01:4a:1f:e4 brd ff:ff:ff:ff:ff:ff

虚拟机/etc/sysconfig/network-scripts/ifcfg-eth0文件内容:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPADDR=192.168.137.10
NETMASK=255.255.255.0
GATEWAY=192.168.137.1
DNS1=223.5.5.5
DNS2=192.168.30.1
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=3c48ee54-958e-4812-98e5-454411f93f56
DEVICE=eth0
ONBOOT=no

物理机网络配置

image
image
image
image

回复
阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏