Home > Storage > PowerFlex > White Papers > Installing and configuring Oracle Linux KVM on Dell PowerFlex > Setup CPU pinning
Next, pin the CPUs to the VM. As mentioned, the olvm-vmcontrol utility is utilized to configure hard partitioning of a vCPU on the VM to a physical CPU on the KVM host. Though virsh demonstrated pinning is not in use, the olvm-vmcontrol command also offers the command getvcpu to see the status. Be sure to run the utility on the correct host (typically where the engine was installed), and not the KVM host as virsh was.
First, check if pinning is set, and then assign the 4 vCPUs of the VM to 4 of the CPUs (0,1,2,3) in Figure 13.
Figure 13. Getting and setting CPU pinning
The utility at the end of pinning the CPUs first notifies the user that the pinning has not actually been done because the VM is in a running state. To take effect, the VM must be shut down and then restarted. The message is quite clear that a reboot or restart of the VM is insufficient for pinning. The VM must first come down.
Note: CPU pinning must be done prior to installing the Oracle Database software.
Helpfully, the UI shows an information icon which also reveals this information. An example is show in Figure 14.
Figure 14. UI icon indicating CPU pinning is pending
After stopping and starting the VM, check the CPU pinning status first with the olvm-vmcontrol utility and then with the virsh command.
CPU pinning can be verified by the virsh command as follows:
The VM now has CPU affinity assigned for 4 virtual CPUs to physical CPU 0-3 in Figure 15.
Figure 15. Post-CPU pinning