Changes

VM CPU Hotplug

10 bytes added, 13:44, 2 May 2014
In the XML, the <code>vcpu</code> element has to be updated to the following:
<syntaxhighlightlang='xml'>
<vcpu placement='static' current='N'>M</vcpu>
</syntaxhighlight>
The following only works if the Qemu Guest Agent is running inside the guest. If that is not the case, one may still add a CPU but Linux will not take it online automatically and removal of CPUs is not possible (since libvirt can't be sure that the guest has taken the CPU offline prior to removal).
<syntaxhighlightlang='bash'>
# Set the number of vCPUs to 2 = adding one CPU if the VM was started with N=2, M=2
virsh setvcpus --live --guest 375e8f9c-8bc7-4bb3-8d9b-fdfe448ce0c2 2
Bureaucrat, administrator
425
edits