Skip to content
Welcome To Charanjit Cheema Blog

Welcome To Charanjit Cheema Blog

An Open Source and Cloud Blog

Menu
  • Home
  • About Me!
  • Way to my Technical Blog
  • Contact me
  • Privacy Policy
Menu

Enabling and Troubleshooting Hot Add Feature in Linux VMs

Posted on May 5, 2023September 14, 2023 by Charanjit Cheema

As a Linux System Admin, we have come across such requirement multiple times for Vertical scaling of Linux VMs in VMware infrastructure. Vertical scaling means adding of additional resources like CPU, memory, Storage to server or VM for increasing its capacity to address more load of Application or DB hosted on Linux VM but what happen when this vertical scaling is require for those Mission Critical Applications or Database VMs where taking the downtime of such VMs are difficult, for addressing such requirement VMware has provided hot add or sometime it is also known as hot plug feature for its VMs where System Admin can add more vCPU or memory on the fly but unlike adding more vdisks (virtual disks) and virtual network adapter which feature is available by default for VM, enabling the vCPU and memory hot add feature require downtime for VM first time but once this hot add feature available you won’t require VM downtime further for adding more vCPUs or memory in VM.

In this Article I will explain the procedure on how to enable the VMware hot add feature for Linux VM also how to troubleshoot the issue when after hot adding the memory it’s updated memory information is not visible in Linux VM.

 

Prerequisite

These are below prerequisite for enabling vCPU and memory hot add feature in VM:

  • The guest operating system (OS) must support device hot add. – In the case of Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES) both guest OSs support this feature.
  • Virtual machine hardware compatibility (virtual hardware version) is 7 or higher.
  • VMware Tools should be installed on the guest OS – If you are using RHEL 7 or above and SLES 12 or above both guest OSs does not require VMware Tools to be install separately as both OSs vendor provide VMware Tools as part of OS bundled packages.
  • The virtual machine must be powered off to enable the Hot Add feature.
  • A VMware vSphere Advanced, Enterprise, or Enterprise Plus license must be used. VMware vSphere Enterprise Plus supports both CPU hot add and memory hot add.

 

Procedure

Below are steps to enable the VMware Hot Add option for adding vCPU and memory by using vCenter log in to VMware vSphere Client and do the following:

  1. Go to Hosts and Clusters.
  2. Select the needed virtual machine in the navigation pane. The VM must be powered off.
  3. Click the Edit Settings icon. As an alternative, you can right-click the VM name and in the menu that opens, hit Edit Settings.

  1. For Enabling vCPU hot add feature:
    1. In the Edit Settings window, expand the CPU settings.
    2. In the CPU Hot Plug line, select the Enable CPU Hot Add checkbox.

5. For Enabling memory hot add feature:

    1. In the Edit Settings window, expand the memory settings.
    2. In the Memory Hot Plug line, select the Enable checkbox.

6. Click OK to save VM settings and close the window.

7. Now you can Power On the VM again.

 

Troubleshooting

In case after hot adding the memory in Linux (RHEL, CentOS, and SLES OS) VM if it does not show updated memory under free or top command then follow the below steps for fixing this issue:

  • To set the memory online in Linux VM:
  1. Look for memory that appears offline.Run this command to check the state of the memory:
    grep line /sys/devices/system/memory/*/state
  2. When memory appears offline, run this command to set it to online:
    echo online >/sys/devices/system/memory/memory[number]/state

 

Things need to be considered while planning to enable hot add feature in Linux VM.

  • vNUMA (Virtual Non-Unified Memory Access) feature is meant for optimizing the performance of the VMs which host memory intensive application but when you enable Hot Add in Linux VM, vNUMA is automatically disabled for that VM. By default, vNUMA is enabled for all VMs that have 8 vCPUs or more to improve performance. Below is the command to check how many vNUMA nodes are assigned to Linux VM by default:
    numactl –hardware

 

  • Hot remove feature is not available for VM as removing the vCPU or memory would require Linux VM downtime hence plan for resource allocation accordingly.

Loading

  • Author
  • Recent Posts
Charanjit Cheema
Follow him
Charanjit Cheema
Charanjit is currently working as a Cloud Architect at Mphasis, with 17 years of experience in IT infrastructure projects, implementation, and support. While his main role is as a DevOps engineer, he holds a Cloud Architect position and has strong skills in cloud technologies and automation. His expertise includes Terraform, Ansible, AWS, Azure DevOps, Azure Cloud, VMware, and Linux systems.

Charanjit is passionate about automating tasks and improving processes. He uses tools like Terraform and Azure DevOps to build and manage cloud infrastructure and streamline deployment. He also enjoys using Shell scripts and Ansible playbooks to make systems run more efficiently.

In his free time, Charanjit enjoys learning about new technologies and sharing his knowledge through his blog. When he’s not working, he likes listening to music, having a cup of coffee, and relaxing in nature.

You can connect with Charanjit on Twitter, Facebook, LinkedIn, or email him at charanjit.cheema@cjcheema.com.
Charanjit Cheema
Follow him
Latest posts by Charanjit Cheema (see all)
  • How to optimize the performance of Ansible Automation Platform or Ansible Tower - July 16, 2023
  • How to fix code and text file linting errors with the help of Visual Studio Code - June 27, 2023
  • How to migrate existing WordPress blog from AWS EC2 instance to Amazon Lightsail - May 29, 2023

Like this:

Like Loading...

Related

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tags

AWS Cloud Computing Dockers Networking Open Networking OpenSource RHEL-CentOS SDN Server Hardware SLES tcpdump Ubuntu WSL

Follow me @

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 2 other subscribers

Recent Posts

  • How to Deploy Docker Containers with NGINX on AWS EC2 Using Ansible and GitHub Actions
  • No More DynamoDB! Use Native S3 locking for Terraform State
  • How to Bring and Manage Manually Created AWS Resources Under Terraform Management
  • Iterating Cloud Resource Provisioning Using Terraform Count and For_Each Meta-Arguments
  • Terraform and Ansible Collaboration for AWS Cloud Deployment

Recent Comments

  1. Charanjit Singh on Terraform and Ansible Collaboration for AWS Cloud Deployment
  2. christinatodd2020aeaa798563 on Terraform and Ansible Collaboration for AWS Cloud Deployment
  3. Charanjit Singh on How to Set password policy in CentOS or RHEL system
  4. SAURABH on How to recover or rebuild initramfs in CentOS 7 Linux
  5. Sangita on How to Set password policy in CentOS or RHEL system

Archives

  • April 2025
  • February 2025
  • January 2025
  • August 2024
  • July 2024
  • June 2024
  • January 2024
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • September 2022
  • August 2022
  • July 2020
  • May 2020
  • February 2020
  • November 2019
  • June 2019
  • May 2019
  • March 2019
  • February 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • June 2018
  • May 2018
  • April 2018

Categories

  • Automation
  • Cloud Computing
  • Coding
  • CyberSecurity
  • Networking
  • OpenSource
  • RHEL-CentOS
  • Server Hardware
  • SLES
  • Technical Blog
  • Ubuntu
  • WSL

Blog Stats

  • 18,353 hits
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Home
  • About Me!
  • Way to my Technical Blog
  • Contact me
  • Privacy Policy
© 2025 Welcome To Charanjit Cheema Blog | Powered by Superbs Personal Blog theme
 

Loading Comments...
 

    %d