6.4. Setting Virtual Machines CPU Model¶
Virtual machines are created with the host CPU model by default. If nodes in the compute cluster have different CPUs, live migration of VMs between compute nodes may not work or applications inside VMs that depend on particular CPUs may not function properly. To avoid this, you can find out which CPU model offers compatibility across all nodes in the compute cluster and manually set it as the compute cluster default.
Do the following:
virsh capabilitieson each node to print an XML document with information on node’s CPU. Join the
<cpu>sections from all XML outputs to a single XML file, e.g.,
Compare the CPU features using
virsh cpu-baseline. For example:
# virsh cpu-baseline cpu-compare.xml | grep model <model fallback='allow'>IvyBridge</model>
The command will print the most compatible CPU model across all nodes.
Set this CPU model for the compute cluster. For example:
# vinfra service compute cluster set --cpu-model IvyBridge
Take note of the following:
- For the list of supported CPU models, run
vinfra service compute cluster set --help.
- Changing CPU model affects only new VMs (i.e. those created after the change).
See the CLI Reference for more details on the command and information on how to use the