Setting virtual machine 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. In this case, however, the compute cluster CPU model will be the least advanced one and compute nodes will lose CPU capabilities of a more advanced processor.

  • You can view the list of supported CPU models by running the command vinfra service compute show.
  • Limitations:

    • Changing CPU model affects only new VMs, that is, those created after the change.

    Prerequisites

    To set the compute cluster CPU model

    1. Determine baseline CPU models for the compute cluster. For example:

      # vinfra service compute baseline-cpu
      +------------------------+----------------------+
      | Field                  | Value                |
      +------------------------+----------------------+
      | All selected nodes     | models:              |
      |                        | - SandyBridge        |
      |                        | patched: true        |
      | node001.vstoragedomain | models:              |
      |                        | - Cascadelake-Server |
      |                        | - SandyBridge        |
      |                        | - Skylake-Client     |
      |                        | - Skylake-Server     |
      |                        | - Broadwell          |
      |                        | - Haswell            |
      |                        | - Broadwell-noTSX    |
      |                        | - Haswell-noTSX      |
      |                        | patched: true        |
      | node002.vstoragedomain | models:              |
      |                        | - SandyBridge        |
      |                        | - Nehalem            |
      |                        | - IvyBridge          |
      |                        | - Broadwell          |
      |                        | - Haswell            |
      |                        | - Broadwell-noTSX    |
      |                        | - Haswell-noTSX      |
      |                        | patched: true        |
      | node003.vstoragedomain | models:              |
      |                        | - SandyBridge        |
      |                        | - Skylake-Client     |
      |                        | - Skylake-Server     |
      |                        | - Nehalem            |
      |                        | - IvyBridge          |
      |                        | patched: true        |
      +------------------------+----------------------+

      The command will print the most compatible CPU model across all compute nodes. In the example, it is SandyBridge.

    2. Set this CPU model for the compute cluster. For example:

      # vinfra service compute set --cpu-model SandyBridge