Deploy an NSX load balancer for vRA easily

I was chatting to a colleague recently and they were talking about using NSX Edge Gateway for load balancing a distributed install of vRA7. Amongst other things they mentioned that it would be good to consistently deploy a new load balancer for each lab vRA was deployed in. Whilst simple enough to configure via the UI it is easy to automate it. Challenge accepted.

After looking at the contents of the vRA7 Load Balancing guide it became quite clear that this was something that used a number of load balancer features and could be quite time-consuming doing manually.

This PowerNSX script will deploy the edge quickly and efficiently. Located here the script will deploy an NSX edge and configure the following specific for vRA7:

  • Pools with defined members
  • Service Monitors with specific probes and checks
  • Multiple VIPs for IaaS, Appliance, and Manager
  • Application Profiles to listen for traffic
  • Deploy the Edge with aforementioned configuration

You can find it here

It current does not have any networks connected on the south side of the edge. This allows the user to add their own manually after the fact or further add with examples such as the 3 Tier App having a DLR and Logical Switches southbound.

If anything needs to be changed for your environment modify the variables in the parameter block or append the changes when running the script with ./vRA_Load_Balancer.ps1 -VraEdgeName vRA-Edge-001

Reference for settings can be found in this guide

VMware Fusion memory overcommit

VMware Fusion is the Workstation equivalent on OSX. It has come along way but there is not the same feature parity as there is in Windows. One handy feature is the ability to overcommit memory usage. This will swap memory usageĀ from the host memory to disk when the host memory exceeds its threshold.

This is great for laptop lab warriors like myself who work offline when on planes or want to demo/test/validate something without latency.

The config file that needs to be edited or created is /Library/Preferences/VMware\ Fusion/config . This can be done with nano and you may need to sudo for write permissions.

The config file needs the following command added to it.

prefvmx.minVmMemPct = %

Where % equals a numerical value listed below. There are three levels of host memory reservation

  • 75 – which will use 75% of host memory reserved for VM, 25% being swapped
  • 50 – which will use 50% of host memory reserved for VM, 50% being swapped
  • 25 – which will use 25% of host memory reserved for VM, 75% being swapped

This can degrade the performance of your machine and strangle resources if it cannot keep up so be mindful.

This allows me to run and install the following machines on my 13″ MBP (16GB, 1TB, i7)

  • vCenter Server Appliance
  • NSX Manager
  • vSphere hosts
  • Log Insight

I have created base snapshots and created labs with the same addresses on different custom VM networks that allow me to adjust accordingly.