The other day I had to increase the memory of 30 virtual servers and install the latest VMWare tools. Instead of doing this manually I uses PowerCLI.
Put the serverlist in a *.txt file that is located in the same folder as the PowerShell script. This will shutdown the server, increase the RAM to 4GB, start the server and then upgrade the VMWare tools.
$servers = Get-Content -Path E:\path_to_my_folder\server_list.txt
get-vm $servers | Shutdown-VMGuest –Confirm:$False
sleep 150
Get-VM $servers | Set-VM –MemoryGB 4 –Confirm:$False | Start-VM
sleep 120
Get-VM $servers | Update-tools -RunAsync
There are literally hundreds of documents regarding the configuration of NLB running on VMWare ESX Server. Officially they do not support UNICAST mode so I had to configure this without help from VMWare. Below is how I did it, feel free to comment if it can be done better but this is a working example.
high level diagram
As you can see each server in our NLB will have 2 network cards. One for the NLB and another one for direct access which will also act as gateway for the outbound traffic. You only need to configure a gateway on the outbound NIC. Below is an example of the IP configuration. Remember, never check the NLB configuration on the NIC properties yourself. This will be done automatically when you create a new cluster.
The end result will be similar as the screenshots below
Windows 2008 Inbound NIC forwarding
The NLB is active but it will not send back any traffic. Thanks to Michael who wrote an article about this I know that I need to enable forwarding on the inbound NIC. You need to do this on each node of the NLB cluster.
- Open a dos prompt with elevated rights and run the following command to see the network name: “netsh interface show int”
- That will show you the interfaces in the server. Find the name of the cluster NIC and put it in quotes in the following command:
netsh interface ipv4 set interface “NLB 2103” forwarding=enabled
- You can confirm that it is changed by running the command:
netsh interface ipv4 show interface l=verbose
VMWare ESX VLAN configuration
We are still not ready as we need to tweak some ESX settings as you can see in the screenshots below
DRS also breaks the NLB so we need to keep the VM on the same host. Best is to disable it for all NLB nodes.
How to move a VM running in an NLB
- Stop Host in NLB manager
- Shutdown VM
- Move VM to another host or Datastore
- Start VM
- Check NLB
Recent Comments