Este conteúdo não está disponível no idioma selecionado.

23.4. CPU allocation


<domain>
  ...
  <vcpu placement='static' cpuset="1-4,^3,6" current="1">2</vcpu>
  ...
</domain>
Copy to Clipboard Toggle word wrap

Figure 23.6. CPU Allocation

The <vcpu> element defines the maximum number of virtual CPUs allocated for the guest virtual machine operating system, which must be between 1 and the maximum number supported by the hypervisor. This element can contain an optional cpuset attribute, which is a comma-separated list of physical CPU numbers that the domain process and virtual CPUs can be pinned to by default.
Note that the pinning policy of the domain process and virtual CPUs can be specified separately by using the cputune attribute. If the emulatorpin attribute is specified in <cputune>, cpuset specified by <vcpu> will be ignored.
Similarly, virtual CPUs that have set a value for vcpupin cause cpuset settings to be ignored. For virtual CPUs where vcpupin is not specified, it will be pinned to the physical CPUs specified by cpuset. Each element in the cpuset list is either a single CPU number, a range of CPU numbers, or a caret (^) followed by a CPU number to be excluded from a previous range. The attribute current can be used to specify whether fewer than the maximum number of virtual CPUs should be enabled.
The placement optional attribute can be used to indicate the CPU placement mode for domain processes. The value of placement can be set as one of the following:
  • static - pins the vCPU to the physical CPUs defined by the cpuset attribute. If cpuset is not defined, the domain processes will be pinned to all the available physical CPUs.
  • auto - indicates the domain process will be pinned to the advisory nodeset from the querying numad, and the value of attribute cpuset will be ignored if it is specified.

Note

If the cpuset attribute is used along with placement, the value of placement defaults to the value of the <numatune> element (if it is used), or to static.
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo