VMWare:来宾计算机互联网随机工作

VMWare: guest machine internet working randomly

我的 VMWare 来宾计算机中的互联网出现问题,随机工作(大部分情况下不工作),我不确定可能是什么问题。

有时互联网可以工作(这也包括通过 ssh 连接到主机的可能性),但大多数时候不能。

重新启动 networking 没有帮助,ifdown/ifup 也没有帮助。它可能开始工作的唯一情况是重新启动整个虚拟机。即便如此,它也可能开始工作 10 次。

到目前为止我注意到的唯一潜在问题是,当它不起作用时,VM 网络适配器的 MAC 地址会被交换 - 如果它起作用,则它们是配置的。

详情:

VMWare虚拟机网络设置:

在我的虚拟机 .vmx 配置文件中我有这个(与接口相关):

ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "static"
ethernet0.linkStatePropagation.enable = "FALSE"
ethernet0.pciSlotNumber = "33"
ethernet0.address = "00:50:56:38:CC:21"
ethernet0.startConnected = "TRUE"
ethernet0.vnet = "vmnet2"
ethernet0.bsdName = "en0"
ethernet0.displayName = "Wi-Fi"
...
ethernet1.present = "TRUE"
ethernet1.connectionType = "hostonly"
ethernet1.virtualDev = "e1000"
ethernet1.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "static"
ethernet1.linkStatePropagation.enable = "FALSE"
ethernet1.pciSlotNumber = "37"
ethernet1.address = "00:50:56:38:CC:22"
ethernet1.startConnected = "TRUE"

主持人ifconfig:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 ::1 prefixlen 128 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether a0:99:9b:0b:bf:c5 
    inet6 fe80::a299:9bff:fe0b:bfc5%en0 prefixlen 64 scopeid 0x4 
    inet 10.230.82.42 netmask 0xffffc000 broadcast 10.230.127.255
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 6a:00:01:ba:d6:30 
    media: autoselect <full-duplex>
    status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 6a:00:01:ba:d6:31 
    media: autoselect <full-duplex>
    status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether a2:99:9b:b0:3e:00 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 5 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    nd6 options=1<PERFORMNUD>
    media: <unknown type>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 02:99:9b:0b:bf:c5 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether 7a:81:75:a1:0f:87 
    inet6 fe80::7881:75ff:fea1:f87%awdl0 prefixlen 64 scopeid 0x9 
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 00:50:56:c0:00:01 
    inet 192.168.247.1 netmask 0xffffff00 broadcast 192.168.247.255
vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 00:50:56:c0:00:08 
    inet 192.168.195.1 netmask 0xffffff00 broadcast 192.168.195.255

嘉宾/etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.195.200
    netmask 255.255.255.0
    gateway 192.168.195.2

auto eth1
iface eth1 inet static
    address 192.168.247.200
    netmask 255.255.255.0

访客ifconfig(互联网可用时):

eth0      Link encap:Ethernet  HWaddr 00:50:56:38:cc:21  
          inet addr:192.168.195.200  Bcast:192.168.195.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe38:cc21/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:470 errors:0 dropped:0 overruns:0 frame:0
          TX packets:461 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:74106 (72.3 KiB)  TX bytes:53650 (52.3 KiB)
          Interrupt:19 Base address:0x2000 

eth1      Link encap:Ethernet  HWaddr 00:50:56:38:cc:22  
          inet addr:172.16.121.132  Bcast:172.16.121.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe38:cc22/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1648 (1.6 KiB)  TX bytes:578 (578.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:61 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:24465 (23.8 KiB)  TX bytes:24465 (23.8 KiB)

访客ifconfig(当互联网不工作时):

eth0      Link encap:Ethernet  HWaddr 00:50:56:38:cc:22  
          inet addr:192.168.195.200  Bcast:192.168.195.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe38:cc22/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2472 (2.4 KiB)  TX bytes:9398 (9.1 KiB)

eth1      Link encap:Ethernet  HWaddr 00:50:56:38:cc:21  
          inet addr:192.168.247.200  Bcast:192.168.247.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe38:cc21/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3498 (3.4 KiB)  TX bytes:620 (620.0 B)
          Interrupt:19 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:219 errors:0 dropped:0 overruns:0 frame:0
          TX packets:219 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:42755 (41.7 KiB)  TX bytes:42755 (41.7 KiB)

在这里我可以看到唯一的区别 - MAC 地址与它们的配置方式相反。

当互联网可用时:

当它不起作用时:

知道为什么会这样吗?我还能尝试什么?

谢谢!

问题现已解决。

我尝试了 https://communities.vmware.com/message/2350978#2350978 中描述的解决方法 - 通常使用现有的 VMDK 虚拟磁盘创建一个新的 VM(它重新创建了所有外部 VM 设置) - 它工作完美,即使有点矫枉过正.

以防万一我保留了原始有问题的 VM 的副本,然后在获取 help from the VMWare employee 后 - 建议从 VM 的 .vmx 配置文件,然后删除网络适配器本身,然后重新添加它 - 一切开始完美运行。

我猜我只是在 .vmx 文件中有一些旧设置,来自以前版本的 VMWare,或者旧的 VM 配置...