Limit the number of VTEPs for NSX

Everyone who has deployed NSX for vSphere must have configured the VXLAN Transport Parameters.

VTEPs
 

Nothing really fancy about this and pretty straight forward. But, what if you want to limit the number of VTEPs for NSX due to a specific requirement of the deployment? The number of VTEPs is not editable in the UI as described in the NSX documentation:

The number of VTEPs is not editable in the UI. The VTEP number is set to match the number of dvUplinks on the vSphere Distributed Switch being prepared.

So when you configure the VXLAN Transport Parameters for a host that is connected to a vSphere Distributed Switch (vDS) with 6 dvUplinks it will automatically create 6 VMkernel interfaces.

VTEP-6

But but… (due to questionable requirements) we need it only with 2 VMkernel interfaces on a vDS with 6 dvUplinks, how can we solve this? Well fire up your PowerNSX.
 

Limit the number of VTEPs for NSX with PowerNSX

Not familiar with PowerNSX? Well you should be, PowerNSX is a PowerShell module that contains PowerShell functions that can call the VMware NSX for vSphere API. It will make you life so much more easier and is almost indispensable when consistency and speed is key. Here you can find how to install PowerNSX and here you can find how to use PowerNSX.

Please alter the script below to match your environment.

After the script has run successfully, the result will be only 2 VMkernel interfaces instead of the “default” 6 VMkernel interfaces:

VTEP-2

Don’t forget to configure the uplink assignment on the VTEP portgroup afterwards and set the uplinks to “Active” where the VTEP VLANs are configured on and the rest to “Unused”.

VTEP-Assignment

Thanks to Alexander Ries for helping with the script.

Marco van Baggum

Marco van Baggum

Works as a Virtualization Consultant for ITQ. More details can be found on the About page

Leave a Reply

Your email address will not be published. Required fields are marked *