Here is the current setup.
1 Nic card connected to physical host, it has vswitch0 and connected to all the VMS. I have 1 VM have public IP address and have no problem accessing to it.
VM1: It has access to internet
I created 2 NIC cards on the server and configured,
NIC1= Public IP address
NIC2= 192.168.0.25
VM2
NIC : 192.168.0.25
All using Vswitch0, but I can't ping each other. What am I missng?
Since my local IP addresses are in same subnet, I don't the gatway IP address right?
vSwitch0, we will call Internal and Local vSwitch.
Create this vSwitch0, with a Virtual Machine Portgroup called e.g Internal LAN (192.168.0.x).
Attach this vSwitch to the Internal LAN physical uplink, network interface in the Host. eg. nic1
vSwitch1, we will call this Public.
Create this vSwitch1, with a Virtual Machine Portgroup called e.g Public LAN (this will server your public internet access).
Attach this vSwitch to the External/Public LAN physical uplink, network interface in the Host. (eg nic2)
In the VM, add two network interfaces, give nic1 internal IP Address 192.168.0.x, and the other IP Address - public IP Address.
Edit the VM Settings, and edit the VM nic interface and select Internal for nic1, and External for nic2.
see my EE Article
Part 14: HOW TO: Configure basic networking on a VMware vSphere Hypervisor 5.1 (ESXi 5.1) Host Server
(valid for all versions of ESXi)