I am new to VMware and I am trying to set up Vmotion VLANs in my environment. I have multiple clusters in my setup and I want to ensure that VMs are not able to move between clusters using Vmotion. To do this, I believe I need to set up a Vmotion VLAN for each cluster and then segregate these VLANs so that VMs cannot move between clusters using Vmotion.
How can I verify that the Vmotion VLANs are properly segregated for different clusters, and how can I check that the movement of VMs between clusters is being correctly limited? Any tips or guidance on this topic would be greatly appreciated. Thank you in advance for your help.
First VLAN need to be create on physical layer ( switch) then you can create Vmotion port group and assign that VLAN to this port group
Refer this docs
I tried on CLI and API but there is no easy way to list this information. Three scenarios arise:
1. If using standard switches: doing a esxcfg-vswitch -l will get you the portgroup name and VLAN details but this has to be run using ESXcli and has to be run for every cluster (one host per cluster).
2. If you are running on DVS then the only feasible option i found out was to export the DVS configuration. Open the zip file. Open the xml file "data.xml" under the folder META-INF. In this XML file you can see all the port groups of the DVS along with their VLANs. Check the screenshot.
3. You can write powerCLI scripts to get all that info with one click.