Hi everyone, I'm struggling to understand if is it possible to hot-remove cpu or ram from a vm as well as I can hot-add. Thank you
Hi,
You can do it if the Guest operating system allows it and it has been previously set to accept "hotadd"
https://www.vmwareblog.org/hot-add-ram-hot-plug-vcpus-vsphere-vms-different-environments/
https://www.altaro.com/vmware/vmware-hot-add/
Operating System support.
Not all operating systems support hot-add CPU and memory. I do know Red Hat has support for it and it has worked for me on Ubuntu/Debian machines before but the best thing to do is to check the VMware Compatibility Guide as it’s always updated. Generally, the operating systems listed below support the feature. I’ve had good success with Red Hat, Ubuntu and Debian Linux VMs.
ARomeo
Some of the new operating systems will permit hot CPU remove, but no OS (to my knowledge) will support hot remove of RAM. This is because RAM, unlike CPU, is not a compressible resource.
Thank you @AlessandroRomeo68...but I asked if it was possible to REMOVE not ADD!!
Thank you @daphnissov ... do you have any documentation about that? Which OS supported hot cpu remove?
You can do some Googling yourself, but otherwise it's based upon my years of experience. Don't take my word for it, though. Go set up some tests yourself and try to hot remove RAM.
Hi,
In my veiw ( also checked on the lab) there is no option to hot remove CPU on any OS in vSphere 6.5 and 6.7.
Cheers
The official KB is here: https://kb.vmware.com/s/article/82568
You can't hot-remove memory, but you could set a limit to get it ballooned away, not that this is recommended.
You can't remove vCPUs but you can offline them from the guest OS, as long as they are 100% idle they have a negligible* impact on the VM.
P.S.
There is a setting, vcpu.hotremove, it also used to be in the UI at some point in the past and some API docs still mention it. It was partially implemented for hosted, i.e. Workstation and Fusion but never finalized due to lacking guest support, i.e. right now it does nothing.
* if 100% means also no timer or other interrupts, which should be the case with modern OS / virtual hardware versions, the offlined vCPU basically has no impact on scheduling, potential co-stop etc.