VMWare:客户机互联网随机工作

时间:2016-04-21 12:08:50

标签: vmware-fusion

我的VMWare客户机中的互联网出现问题非常随机(大部分都不能正常工作),我不确定问题是什么。

有时互联网有效(这也包括ssh到主机的可能性),但大部分时间它都没有。

重新启动networking没有任何帮助,也没有任何ifdown / ifup。它可能开始工作的唯一情况是重新启动整个VM。即便如此,它也许会在10年开始工作一次。

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

详细说明:

  • host:OS X El Capitan 10.11.4运行VMWare Fusion 8.0.1
  • guest:Linux debian 3.2.0-4-amd64#1 SMP Debian 3.2.65-1 + deb7u2 x86_64 GNU / Linux

VMWare虚拟机网络设置:

  • 网络适配器1 - NAT - 静态MAC地址00:50:56:38:CC:21
  • 网络适配器2 - 仅限主机 - 静态MAC地址00:50:56:38:CC:22

在我的虚拟机.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地址是相反的。

当互联网运作时:

  • 来自客人,ping所有192.168.195。*工作正常(.200,.2和.1)
  • 来自主机,我可以ping自己(.1)和来宾(.200),ping .2给我“请求超时”#39;错误

什么时候不起作用:

    来自客人的
  • 我可以自己ping(192.168.195.200),但ping任何其他192.168.195。*(。2或.1)给我“Destinaton Host Unreachable&#39;错误。 ping互联网时也是如此(例如8.8.4.4)
  • 来自主机我可以ping自己(192.168.195.1),但ping任何其他192.168.195。*(。2或.200)给我“请求超时”#39;错误。

知道为什么会发生这种情况,还有什么可以尝试?

谢谢!

1 个答案:

答案 0 :(得分:0)

现在问题已经解决了。

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

以防万一我保留原有问题虚拟机的副本,然后在获得help from the VMWare employee之后 - 建议从虚拟机中删除NAT适配器设置(所有ethernet0.条目)&#39; s .vmx配置文件,然后删除网络适配器本身,然后重新添加它 - 一切都开始正常工作。

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