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.
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:
Note that hot adding RAM to a virtual machine with an NVIDIA vGPU is not possible with VMware vSphere 6.7.
Sources :
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:
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:
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:
For this tutorial, we will therefore use Windows Server 2016 which supports these 2 features.
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.
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.
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.
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.
VMware 12/16/2022
VMware 2/23/2024
VMware 8/7/2024
VMware 10/16/2024
Pinned content
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.
You must be logged in to post a comment