Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

14.13.3. Configuring Virtual CPU Affinity

To configure the affinity of virtual CPUs with physical CPUs, refer to Example 14.3, “Pinning vCPU to a host physical machine's CPU”.

Example 14.3. Pinning vCPU to a host physical machine's CPU

The virsh vcpupin assigns a virtual CPU to a physical one.
# virsh vcpupin rhel6
VCPU: CPU Affinity
----------------------------------
   0: 0-3
   1: 0-3
The vcpupin can take the following options:
  • --vcpu requires the vcpu number
  • [--cpulist] >string< lists the host physical machine's CPU number(s) to set, or omit an optional query
  • --config affects next boot
  • --live affects the running domain
  • --current affects the current domain