1

How do I increase the amount of cores/cpus of a vm without requiring a reboot.

tshepang
  • 377
  • 2
  • 12
Kristofer
  • 301
  • 1
  • 3
  • 12

1 Answers1

3

...fortunately the process is pretty straightforward.

Prerequisites/preparation

In order to increase cpu count during runtime you need to configure the VM to have a "maximum" vcpu count and a lower "current" cpu count. An example xml extract (modify using virsh edit ):

<vcpu placement='static' current='4'>16</vcpu>

Perform the increase

Note! The change is not permanent. To perform a change that is maintained after a shutdown/start you need to also use virsh edit .

To set the current cpu count:

virsh setvcpus --count n <domain>
Kristofer
  • 301
  • 1
  • 3
  • 12