3

I am trying to increase vCPUs on a VM. I have done this in the past.

  1. Poweroff the VM

  2. Configure for maximum allowed vCPUs

    virsh setvcpus vm-1 10 --maximum --config
    
  3. Change for current settings

    virsh setvcpus vm-1 10 --current
    
  4. Power on the VM

This way successfully adds 10 vCPUs to my VM. For some reasons, I need to add vCPUs on the VM without powering off. Is there a way to do this?

2 Answers 2

3

Not at present. It looks like CPU hotplug used to be possible in QEMU, but the patch is old and crusty, never worked with windows guests, and not shipped natively anymore.

http://www.linux-kvm.org/page/CPUHotPlug

0

--maximum only sets the upperlimit that the number of vCPUs can be. It is different from the number that can be actually assigned.

--current can update the vCPUs number without powering off. The constraint you have is that the maximum number allowed has to be already set high enough to allow such change (while the machine was off) so that you can tune it at runtime. You probably need to set the maximum possible number you might need once and then adapt it at runtime.

You must log in to answer this question.

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