VMware vSphere hot add is a feature that allows vSphere administrators to increase the RAM and CPU capacity of a running virtual machine on the fly. This feature is one of my favourites (second to vMotion). Hot add of CPU is usually referred as hot-plug, but I will be using term hot add for both RAM & CPU.
What so special about hot-add?
Think of older times when a physical server used to run out of resources (cpu/memory) and the administrator has to do shutdown the server to increase the capacity of server. Shutting down of server itself was a big headache in those time as the administrator has to get approval from the application owner, create a change request for maintenance etc etc.
At that time if someone would have explained me that you can add CPU/RAM into a server in running condition, I would have laughed hard on him and may be I would have given him titles like mad,crazy and what not.
But VMware made this possible via virtualization. Man I just love VMware.
All right lets get back on track and discuss on this wonderful feature a bit more.
Why you need Hot add/Hot plug ?
In production environment there might come a situation when an application running inside virtual machine starts consuming a lot of resources or almost all resources and which in turn causes the VM to run out of memory and CPU. If the application is mission critical and has to be highly available, you can’t just shut it down during business hours to extra resources. This is when Hot Add feature saves your ass.
Hot add can be enabled during creation of new virtual machine or can be enabled afterwards. By default hot add is disabled on virtual machine, so if you have not configured this during VM deployment, you have to shutdown the VM to enable this.
Hot add can be enabled on VMs running hardware version 7 and newer and VMware Tools should be installed in virtual machine. Also the underlying guest OS should support this feature.You can’t just enable it on any VM (dude give vmware some space).
Once hot add has been enabled on virtual machine, you can increase the RAM/CPU capacity of VM anytime. You don’t need any further downtime.
If you are like me and wondering if this feature is so awesome then why it is disabled by default. Sir Duncan Epping has excellent answer for this, which is explained here
Which Guest OS support Hot Add/Hot Plug ?
List of guest os which supports this feature is included in this document. Typically following VM’s support this:
- Windows Server 2003 32bit/64bit – (Standard and Enterprise)
- Windows Server 2008 32bit (Standard, Enterprise and Datacenter)
- Windows Server 2008 64bit (Standard, Enterprise and Datacenter)
- Windows Server 2008 R2 (Standard, Enterprise and Datacenter)
- Windows Server 2012 (Standard, Enterprise and Datacenter)
- Windows Server 2012 R2 (Standard, Enterprise and Datacenter)
- Windows Server 2016 Standard, (Standard, Datacenter)
- Red Hat Enterprise Linux 6.4 Server: Hotadd Memory & Hotplug CPU
- Red Hat Enterprise Linux 7.0 Server: Hotadd Memory & Hotplug CPU
- Red Hat Enterprise Linux 7.1 Server: Supports both Hot Add and Hot remove of Memory and CPU.
If you have any other OS apart from the above list and you are not sure whether or not it supports Hot Add, then go to VMware HCL and search for the OS. In ‘What are you looking for‘ section select Guest OS and select other fields as per your need.
How to enable Hot Add on a vitual machine?
Hot Add can be enabled on a virtual machine from either vSphere C# client or Web Client. I will demonstrate this via Web Client.
Select a VM from inventory and edit settings of that VM. If you see that options to add cpu/memory is grayed out, it means that hot add is not enabled yet on the VM.
To enable hot add, shutdown the VM and again edit settings of the VM and from virtual hardware tab, enable the feature
Power on the VM and verify that you are now able to increase cpu
or the memory option is editable now
Is there any downside of using Hot Add?
Yes there is a downside of enabling Hot Add. When you enable VMware Hot-Add on a VM, the maximum amount of memory overhead will be used to run that VM. The amount of memory overhead reserved is based on the number of vCPU and the amount of vRAM assigned to the virtual machine. When you enable Hot-Add on a VM, it automatically will use the maximum amount of memory overhead to run that VM.
This might not sound like a big deal for one VM, but in case you have decided to go crazy and start enabling it on all your VM’s, then the overhead memory utilization can add up pretty quickly into gigabytes of precious host memory being used as memory overhead for running VMs.
Also if your VM is using vNUMA, then it is disabled by default as soon as you configure VM for Hot Add. For more information on this please read VMware KB-2040375
I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂