hypervisor-cpu-compare

Compares a CPU description in an XML file with the CPU model that the hypervisor can provide on the host.

Syntax

Read syntax diagramSkip visual syntax diagram hypervisor-cpu-compare <XML_file>--emulator <path_to_emulator>--machine <hypervisor_machine_type>--error
Where:
<XML_file>
Specifies an XML document that contains a CPU description. If the document contains multiple descriptions, only the first description is evaluated.

Descriptions must adhere to the syntax of the <cpu> element of a domain configuration-XML. For example, use the output of the domcapabilities command to obtain a valid CPU description for a particular virtual server.

Selected options

<path_to_emulator>
Specifies the path to the emulator, for example, /usr/bin/qemu-system-s390x.

Omit this specification to make libvirt automatically use the correct path to the currently used emulator. Specify a value only if you are an expert user and need to experiment with a specific path.

<hypervisor_machine_type>
Specifies the hypervisor machine type, for example, s390-ccw-virtio-6.2.

You can compare the XML document with an earlier hypervisor version by specifying the machine type of this version rather than the current hypervisor version. The current version is the default.

--error
Reports an error if the CPU description in the XML file is not compatible with the hypervisor. Also provides details about the incompatibility.

Command output

The output states how the CPU description of the XML document compares to the CPU that the hypervisor provides.

The host satisfies the CPU requirements as expressed in the XML description if it provides a matching CPU model or a superset of the required features.

The host falls short of the CPU requirements if the command output states that the XML description is incompatible with the CPU that the hypervisor provides. If the XML document represents the CPU definition of a virtual server, the virtual server cannot run on this host.

Usage

Confirming the CPU model of a destination host

Example

# virsh hypervisor-cpu-compare cpu.xml
...
CPU described in cpu.xml is identical to the CPU provided by hypervisor
on the host