14.13.3. Configuring Virtual CPU Affinity

download PDF
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
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.