Menu
InformatiWeb Pro
  • Index
  • System admin
  • Virtualization

Login

Registration Password lost ?
FR
  • Windows Server
    • WMS 2012
    • WS2012 R2
    • WS2016
  • Citrix
    • Citrix NetScaler Gateway
    • Citrix XenApp / XenDesktop
    • Citrix XenServer
  • VMware
    • VMware ESXi
    • VMware vSphere
    • VMware Workstation
  • Microsoft
    • Hyper-V
  • RAID
    • Adaptec SmartRAID
  • UPS
    • APC Back-UPS Pro
  • InformatiWeb Pro
  • Virtualization
  • VMware
  • Hot add resources (vCPU/RAM) to VMs on VMware vSphere 6.7
  • VMware
  • VMware vCenter Server (VCSA), VMware vSphere
  • 05 July 2024 at 11:44 UTC
  • InformatiWeb

Hot add resources (vCPU/RAM) to VMs on VMware vSphere 6.7

To prevent your services from being unavailable when you need to upgrade the resources (CPU and RAM) of your virtual servers, VMware vSphere allows you to add virtual processors (vCPUs) and RAM (therefore without having to stop the VM concerned).
This makes it possible to increase the system resources of a virtual machine (or a virtual server) without interrupting the services located on it.

  1. Information and prerequisites for hot adding vCPU or RAM
  2. Special cases
  3. Check compatibility of hot adding vCPU or RAM with the guest OS
  4. Check the compatibility of hot adding vCPU or RAM with the applications in use
  5. Enable hot addition of virtual processors (vCPUs) and/or random access memory (RAM)
  6. Hot add virtual processors (vCPUs)
  7. Hot add RAM

1. Information and prerequisites for hot adding vCPU or RAM

By default, you cannot add virtual processors (vCPUs) or random access memory (RAM) to a virtual machine.
For this to be possible, you must enable hot adding of vCPU and/or RAM.

However, these features require some prerequisites:

  • the guest operating system installed in the virtual machine must support the desired functionalities (addition of vCPU and/or RAM).
    To do this, refer to the next step of this tutorial.
  • for the addition of virtual processors (vCPUs), the compatibility level of the virtual machine used must be at least ESXi 5.0 to support the addition of multi-core processors.
    Or at least ESXi 4.x to add processors with a single core per virtual processor.
    In this case, the number of cores per socket must be configured to 1 in the virtual hardware of your VM.
  • For adding RAM, the minimum compatibility level to use is ESXi 4.x.
  • The latest version of VMware Tools must be installed in the virtual machine.
  • The virtual machine must be powered off to enable these features.
    The addition of resources (vCPU and memory) can then be done when the VM is powered on.
  • small feature: adding vCPU will cause the disconnection, then reconnection of all USB relay devices connected to the VM.

Note that hot adding RAM to a virtual machine with an NVIDIA vGPU is not possible with VMware vSphere 6.7.

Sources :

  • Enable CPU Hot Add - VMware Docs
  • Change Memory Hot Add Settings - VMware Docs

2. Special cases

If you want to use these vCPU or RAM hot-add features, be aware that there are a few special cases, some of which are documented in the VMware KB:

  • enabling vCPU hot-add disables vNUMA.
    Source: vNUMA is disabled if vCPU hotplug is enabled (2040375).
  • hot-add RAM is limited to 3 GB for Windows 7 and Linux 64-bit guest operating systems when the base defined memory for the virtual machine is less than or equal to 3 GB.
    Which means that if you had allocated 1 GB of RAM to the VM when it was turned off, you can increase this RAM hot up to 3 GB maximum.
    If you had allocated 2 GB base, you can add 1 GB hot. Which gives a maximum of 3 GB of RAM.
    And if you had allocated exactly 3 GB of RAM to this VM when it was turned off, you will not be able to add more on the fly.
    On the other hand, if you allocate more than 3 GB of RAM to this virtual machine when it is turned off, then you can add more later if you wish.
    Source: Cannot hot add more than 3GB to Linux 64-bit or Windows 7 operating systems (2008405).
  • adding vCPUs is supported starting with SQL Server 2008, but requires the enterprise edition, as well as executing the SQL "RECONFIGURE" statement (as explained in step 4 of the tutorial).
    Source: SQL Server 2008 R2 - Hot Add CPU - Microsoft Docs.

3. Check compatibility of hot adding vCPU or RAM with the guest OS

Before you enable hot-adding vCPUs or RAM to your virtual machine's virtual hardware, you should first review the list of guest operating systems that support these features for your version of VMware ESXi.
To do this, go to the "VMware Compatibility Guide" page and select "Guest OS" in the gray line.

Next, select the following options for hot adding vCPUs:

  • OS Family : Windows
  • Virtual Hardware : Hot Add vCPU
  • Product Release Version : ESXi 6.7 U3, ... (your version of VMware ESXi)

Then, click on the blue button: Update and View Results.

As you can see, for VMware ESXi 6.7 U3 you have the choice between Windows Server 2008 R2, 2012, 2012 R2, 2016, 2019 and 2022.
In our case, we have version 6.7 U3 of VMware ESXi and we will use Windows Server 2016 (which corresponds to the server version of Windows 10).

To check compatibility with hot adding RAM, choose the "Hot Add Memory" option instead of "Hot Add vCPU" for the "Virtual Hardware" list.
Then click on the button: Update and View Results.

As you can see, hot adding RAM is supported by the server versions of Windows, but also by their associated client versions:

  • Windows Server : 2003 to 2022
  • Windows : 8 to 11

For this tutorial, we will therefore use Windows Server 2016 which supports these 2 features.

4. Check the compatibility of hot adding vCPU or RAM with the applications in use

Warning : it is also important to check that the applications installed in the guest operating system of your virtual machine also support these features.

Indeed, in the case of the "Microsoft SQL Server" database server, the addition of virtual processors (vCPUs) is only supported from version 2008 and requires the "Enterprise" edition.
In addition, the execution of the SQL statement "RECONFIGURE" will also be necessary for this change to be taken into account by "Microsoft SQL Server".
Source: SQL Server 2008 R2 - Hot Add CPU - Microsoft Docs.

5. Enable hot addition of virtual processors (vCPUs) and/or random access memory (RAM)

Since the supported operating systems are not the same for these 2 features, you will have the possibility to activate them separately.
To do this, click on the “Edit Settings” icon (4th icon next to the VM name).

Important : enabling these features is only possible when the virtual machine is powered off.
Then, the addition of virtual processors (vCPU) and/or random access memory (RAM) will be possible when it is started.
Also make sure that the VMware Tools are installed in the virtual machine and that they are up to date for it to work correctly.

As you can see, currently this virtual machine has 2 virtual processors (CPU) and 4 GB of random access memory (RAM).

To enable hot adding of virtual processors (vCPUs), deploy the "CPU" node and check the "Enable CPU Hot Add" box in the "CPU Hot Plug" line.

To enable hot-addition of RAM, expand the "Memory" node and check the "Enable" box in the "Memory Hot Plug" line.

6. Hot add virtual processors (vCPUs)

To begin, start your virtual machine.

If you go to the "Performance" tab of the task manager in the guest operating system, you will be able to see the number of sockets (number of "physical" processors) and the number of virtual processors (number of cores).

If you open the device manager, you will see 2 processors appear in the "Processors" section.

While the virtual machine is powered on, click the "Edit Settings" icon.

As you can see, in our case we had indicated "2 CPUs" and "2 cores per socket".
Which means that the virtual machine currently sees a virtual processor with 2 cores (= 1 Dual Core processor).

Since adding virtual processors only adds virtual processors and not processor cores, we can only choose between 2 cores and 4 cores.
We select “CPU: 4”.

As expected, the number of sockets (virtual processors) became: 2.
But, the number of cores per socket has not changed (since this is not possible).

The virtual machine will therefore see in our case: 2 Dual Core processors (= 2x2 cores) instead of a single Dual Core processor (= 1x2 cores).

Note: if you want to add cores in steps of 1, select "Cores per socket: 1" before powering on the virtual machine.
Thus, each added processor will have only 1 core.

As expected, in the task manager of the guest operating system, you will see that the number of sockets (virtual processors) and the number of virtual processors (processor cores) have changed.

However, as explained previously (at the end of step 1 of this tutorial), it is possible that additional manipulations will be necessary for certain applications installed in this virtual machine to take this into account.
This is particularly the case with SQL Server which requires the execution of the SQL "RECONFIGURE" instruction after adding virtual processors (vCPUs).

Note: it may be necessary to close the Task Manager and open it again for Windows to retrieve the new system information.

If you look in the device manager, you will see that the number of processors displayed has increased.

7. Hot add RAM

At the moment, our virtual machine has 4 GB of random access memory (RAM).
Which you can easily check from the “Performance” tab of the guest operating system task manager.

When the virtual machine is powered on, click the “Edit Settings” icon.

At the moment the value indicated in our case is "4 GB".

Increase the indicated value. In our case, we indicated "6 GB".
Then click OK.

In the guest operating system's task manager, you will see that the maximum amount of RAM has increased.

Note: if necessary, close the task manager and open it again so that this information is updated.

Share this tutorial

Partager
Tweet

To see also

  • VMware vSphere 6.7 - Convert a Hyper-V virtual machine to a VMware VM

    VMware 10/11/2024

    VMware vSphere 6.7 - Convert a Hyper-V virtual machine to a VMware VM

  • VMware vSphere 6.7 - Create a Linux virtual machine

    VMware 3/29/2024

    VMware vSphere 6.7 - Create a Linux virtual machine

  • VMware vSphere 6.7 - Customize guest OS (Windows and Linux) automatically

    VMware 4/3/2024

    VMware vSphere 6.7 - Customize guest OS (Windows and Linux) automatically

  • VMware vSphere 6.7 - Migrate VMs via vMotion (change virtual disk format)

    VMware 11/20/2024

    VMware vSphere 6.7 - Migrate VMs via vMotion (change virtual disk format)

Comments

You must be logged in to post a comment

Share your opinion

Pinned content

  • Software (System admin)
  • Linux softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.