I have created a vswitch and placed 2 VMs with in this vswitch. I would like the VM's to use the vswitch as their default gateway but cannot see the IP address of this switch nor a way to be able to give the vswitch an IP.
Is this even possible?
My aim is to transfer files between the two VM's without having to go out via the NICs.
Any help is much appreciated.
It's not possible to add an IP address to a vSwitch as it has no interfaces, just port groups, and only vmkernel port can be assigned an IP.
To have two VMs talk to each other without leaving the host then you can create a vSwitch with no uplinks, create a VM port group on this vSwitch and add a vNIC into each VM and assign them to this port group. Address them on the same subnet and they should be able to talk to each other, might need to add a route in the OS to facilitate if there are other vNICs connected to other networks.
Hope this helps!
VCAP-DCD / VCAP-DCA / VCP-CLOUD / VCP-DT / VCP5 / VCP4
We tend to think of ESXi Hosts as 'having" an IP address.
This is not true; only virtual NIC's (VMs and VMkernels) have IP addresses, while the physical NICs are merely uplinks, no more significant than the uplink on a L2 Switch.
You could use a virtual router (like pfSense) to create an alternate gateway on your vSwitch.