4

In ESXi, what is the automation/script (I expect it would be using PowerCLI somehow) approach to modify the number of VCPUs in a VM?

In context, when using our kickstarts, RHEL won't install the SMP kernel unless there is more than one CPU on the machine.

For most cases, there is no reason to want/need more than one VCPU on our VMs, but if we eventually need to use them, the OS has to be installed to a SMP machine, or the kernel doesn't take as full advantage of the available resources as it could.

What we would like to be able to do is the following for life-cycle management:

  • create VM with 2 VCPUs
  • install OS
  • remove VCPU

At a later date:

  • add VCPU(s) as needed

How should we do this?

1 Answer 1

4

You can use the PowerCLI command to set the number of CPUs on a VM:

Get-VM <VM Name> | Set-VM -numCPU 2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .