20.11. CPU Model and Topology
qemu64are basic CPU models but there are other models (with additional features) available. Each model and its topology is specified using the following elements from the domain XML:
<cpu match='exact'> <model fallback='allow'>core2duo</model> <vendor>Intel</vendor> <topology sockets='1' cores='2' threads='1'/> <feature policy='disable' name='lahf_lm'/> </cpu>
Figure 20.13. CPU model and topology example 1
<cpu mode='host-model'> <model fallback='forbid'/> <topology sockets='1' cores='2' threads='1'/> </cpu>
Figure 20.14. CPU model and topology example 2
Figure 20.15. CPU model and topology example 3
<cpu> <topology sockets='1' cores='2' threads='1'/> </cpu>
Figure 20.16. CPU model and topology example 4
Table 20.9. CPU model and topology elements
|This element contains all parameters for the vCPU feature set.|
|Specifies how closely the features indicated in the |
|This optional attribute may be used to make it easier to configure a guest virtual machine CPU to be as close to the host physical machine CPU as possible. Possible values for the mode attribute are:
|Specifies CPU model requested by the guest virtual machine. The list of available CPU models and their definition can be found in |
|Specifies CPU vendor requested by the guest virtual machine. If this element is missing, the guest virtual machine runs on a CPU matching given features regardless of its vendor. The list of supported vendors can be found in |
|Specifies requested topology of virtual CPU provided to the guest virtual machine. Three non-zero values have to be given for sockets, cores, and threads: total number of CPU sockets, number of cores per socket, and number of threads per core, respectively.|
|Can contain zero or more elements used to fine-tune features provided by the selected CPU model. The list of known feature names can be found in the same file as CPU models. The meaning of each feature element depends on its policy attribute, which has to be set to one of the following values:
20.11.1. Guest virtual machine NUMA topology
<numa>element and the following from the domain XML:
<cpu> <numa> <cell cpus='0-3' memory='512000'/> <cell cpus='4-7' memory='512000'/> </numa> </cpu> ...
Figure 20.17. Guest Virtual Machine NUMA Topology
cpusspecifies the CPU or range of CPUs that are part of the node.
memoryspecifies the node memory in kibibytes (blocks of 1024 bytes). Each cell or node is assigned
nodeidin increasing order starting from 0.