network-programmingvirtual-machinevmwarewindows-networking

How to connect 2 VMware machines to ping each other


I would like to ping between VM1 and VM2. Using VMware Workstation 14.

IDEA

I do Windows deployment for school purposes. VM1 is server with DNS, DHCP, etc. roles. VM2 is blank, gets IP from DHCP pool, loads boot image and installs OS.

VM1 (Windows Server 2016)

Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::9f4:a874:f039:8af6%9
   IPv4 Address. . . . . . . . . . . : 192.168.1.168
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

VM2 (blank - no operating system)

Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . : UPCE.CZ
   Link-local IPv6 Address . . . . . : fe80::4f4:a874:1f7c:6c9%3
   IPv4 Address. . . . . . . . . . . : 192.168.1.20
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.168

I can ping from VM1 (server) to VM2.

I can not ping from VM2 to VM1 (server).

Both VM1 and VM2 adapters are set in VMware to Host-Only: private network shared with the host.

Since SCCM 2012 deployment fails I started to troubleshoot by IP.

Thanks for helping me to get more education.


Solution

  • One issue could be Windows Firewall running on VM1 that would block pings. Turning off Windows Firewall or adding rule to allow ICMP traffic will fix it.