虚拟机中没有仅主机接口

虚拟机中没有仅主机接口

我正在尝试配置“仅主机”接口,但它不起作用。

有效的方法:

  • 我可以创建仅主机接口vboxnet0
  • 我可以在我的虚拟机配置中启用一个接口来仅使用此主机接口
  • 虚拟机启动

无效的方法:

  • 连接到仅主机驱动程序的虚拟机上没有活动的接口。

我在跑步:

  • VirtualBox 版本 6.0.4 r128413(Qt5.9.5)
  • 主机是Ubuntu 18.04.01

为什么虚拟机中的界面不活跃?

在此处输入图片描述

在此处输入图片描述

VM中的接口(大多数与docker相关):

user@butler ~ » ifconfig
br-40e6fe014032: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.20.0.1  netmask 255.255.0.0  broadcast 172.20.255.255
        inet6 fe80::42:f3ff:fe74:c41b  prefixlen 64  scopeid 0x20<link>
        ether 02:42:f3:74:c4:1b  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 176 (176.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-85692f1ed6a2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:85ff:fee0:1cf1  prefixlen 64  scopeid 0x20<link>
        ether 02:42:85:e0:1c:f1  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 176 (176.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-bc449674774d: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        ether 02:42:cb:0f:b4:f3  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:eb:d2:6a:cc  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::a00:27ff:feb8:d2fd  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:b8:d2:fd  txqueuelen 1000  (Ethernet)
        RX packets 1158  bytes 78668 (78.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1059  bytes 390704 (390.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 88  bytes 6620 (6.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 88  bytes 6620 (6.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

相关内容