VMware vSphere allows you to configure changes in VM hardware on the fly for some components. This is called VM Hot Add, or Hot Plug. In this post, we'll detail the various possibilities and requirements.

By default, when you want to add new hardware to your VMs, only a very few types of hardware can be added while the VM is powered on. These include virtual network adapter(s) (NIC), USB adapter(s), and hard disk(s). That's it.

If you want to add some other type of hardware, or more RAM or CPU, you usually have to power off the VM. However, this is not the case for Hot Add.

Before you jump in, you must also think of your operating system and applications' compatibility and configuration, as they must be "aware" of these changes in real time.

Why do you need Hot Add? ^

You can enable hot-add memory or hot-add CPU on your VM and use those settings when some extra performance during peak time is needed for processing. This can speed up applications that run once a week or once a month. Instead of waiting for this report for hours, the waiting time can be reduced to minutes, thanks to Hot Add.

Another use case might be lab testing. Imagine you have an application and you need to determine how much RAM and CPU power it needs under different workloads. Changing VM configuration on the fly will save you some time, don't you think?

Advantages of Hot Add ^

No downtime for your VMs – Whenever you need to provide your VMware VMs with more RAM or vCPUs without shutting them down, you can do it via Hot Add CPU or Hot Add RAM.

CPU and RAM are ready to be used – If you need more CPU or RAM, you can simply go to the configuration page while your VM is running and change the number of CPUs or increase the RAM.

VMware Hot Add CPU in action

VMware Hot Add CPU in action

Disadvantages and limitations of Hot Add ^

Overhead – Some overhead (in percent) is added when you enable Hot Add, but when you consider the advantages, it might be worth it.

No vNUMA – Another disadvantage is the fact that the VM will lose the ability to use virtual non-uniform memory access (vNUMA). This memory-access optimization method is automatically enabled for VMs with more than eight vCPUs.

OS Licensing – Your current guest OS license may prevent you from adding extra vCPUs or memory. You see, you may run beyond the vCPU or memory limit with that hot-plug/hot-add.

Recommendation for the Hot Add feature ^

Enable it only when you need it. Yes, the impact is small (usually just a few percentage points), but there is still some impact. So why enable such an impact on your environment when you usually do everything you can to get the maximum performance out of your virtual infrastructure?

Requirements for VMware Hot Add ^

Before enabling Hot-Add/Hot-Plug, be aware of the requirements and limitations:

  • VMs with a minimum of virtual hardware 7 (vmx-7) – This virtual hardware version was introduced in vSphere 5
Latest VMware Virtual Hardware 15

Latest VMware Virtual Hardware 15

  • You can only hot-add/hot-plug. You cannot hot-reduce or hot-unplug (for this, you must power off the VM).
  • Hot-add/Hot-Plug is not compatible with fault tolerance
  • vSphere Advanced, Enterprise, or Enterprise plus is required

Guest OS Support – The guest OS must support these features. If we look at the VMware Compatibility Guide, we'll see that not every OS is compatible.

Newer Linux kernels have support for CPU Hot Add. Traditional Linux distros such as Red Hat, Ubuntu, and Debian can be used, too. Windows VMs support Hot Add as well; however, in some versions, you might need the Standard, Enterprise, or Datacenter version.

To verify compatibility with a specific guest operating system, go to the VMware compatibility page and select Guest OS from the What are you looking for dropdown list.

VMware compatibility guide Select guest OS

VMware compatibility guide Select guest OS

Another option is to select Guest OS from the Search compatibility guide dropdown list. In the search box, type the Guest OS name and click Search.

VMware compatibility guide – Selecting a guest OS and clicking search

VMware compatibility guide – Selecting a guest OS and clicking search

On the results page, click the link for the guest OS. A page with all the support information for this guest OS is displayed.

Scroll down to the Virtual Hardware section. You'll see the Hot Add Memory and Hot Add vCPU support for this guest OS. In our example, we were looking for Windows Server 2012 R2 support.

Where to turn on Hot Add CPU and Memory? ^

You can enable these features by expanding the CPU section on the VM's virtual hardware configuration page. You must do this on a per-VM basis, so you can't simply enable it for multiple VMs through the UI. There may be PowerCLI code for enabling multiple VMs.

Select VM > Edit Settings > Expand CPU

Enabling the CPU Hot Add feature

Enabling the CPU Hot Add feature

The procedure for enabling the memory hot-plug is similar. See the example below.

Enabling the Memory Hot Plug feature

Enabling the Memory Hot Plug feature

Conclusion ^

It is appealing to have this feature at your fingertips. However, its usage might be limited because you can hot-add, but not hot-remove. This is true for both memory and vCPU.

When you try to reduce the number of vCPUs on a running VM, you simply do not have the lower number of vCPUs available within the UI. In the lab, I tried to reduce a test VM from 8vCPU back to 2vCPU. However, I only had the option to increase the number of vCPUs. It is not possible to decrease.

There is some overhead. However, you'll be fine if you don't activate this feature on most of your infrastructure VMs. Your environment can handle a few percentage points of overhead for the couple of VMs that are important to you.

Subscribe to 4sysops newsletter!

Take a look at the VMware compatibility page for your guest OS and activate vSphere Hot Add for VMs that need some extra power for a limited time.

  1. tmack 3 years ago

    FYI, I crashed a MS SQL server adding additional CPUs once; known bug: vSPhere 6.5/MSSQL 2017, only to find out that SQL will not acknowledge the additional CPUs until after a SQL service restart so it was all for nought. Would have been better to leave it disabled and shutdown, add CPU, reboot.


  2. Author
    Vladan Seget 3 years ago

    What was your SQL Server edition? SQL Server Enterprise Edition supports adding a CPU in this way from version 2008 and up. However, it is not supported by Standard Edition….

Leave a reply

Your email address will not be published.


© 4sysops 2006 - 2022


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account