Chapter 6. Capabilities

The capabilities collection provides information about the supported capabilities of a Red Hat Enterprise Virtualization Manager version. These capabilities include active features and available enumerated values for specific properties. An API user accesses this information through the rel="capabilities" link obtained from the entry point URI (see Chapter 4, Entry Point).

6.1. Version-Dependent Capabilities

The capabilities element contains any number of version elements that describe capabilities dependent on a compatibility level.
The version element includes attributes for major and minor version numbers. This indicates the current version level, which this document discusses in Chapter 5, Compatibility Level Versions.
The following representation shows capabilities specific to Red Hat Enterprise Virtualization Manager 3.0 and 2.2 respectively:
<capabilities>
    <version major="3" minor="0">
        ...
    </version>
    <version major="2" minor="2">
        ...
    </version>
    ...
</capabilities>
Each version contains a series of capabilities dependent on the version specified.

Table 6.1. Version-Dependent Capabilities

Capability Element Description
current Signifies if this version most recent supported compatibility level.
features The list of features the version supports.
cpus List of supported CPU types.
power_managers List of supported fence agents and their configuration options.
fence_types Supported fence actions for hosts.
storage_types Supported storage types for a version.
storage_domain_types List of all domain types.
vm_types List of all virtual machine types.
boot_devices Boot devices for a virtual machine.
display_types Available display protocols for a virtual machine.
nic_interfaces Network interface types for a virtual machine.
disk_types List of storage device types.
os_types List of operating system types.
disk_formats List of storage device formats.
disk_interfaces List of interfaces for storage devices.
vm_affinities Affinities for a host's placement policy.
custom_properties Environment variables for a virtual machine's custom scripts.
boot_protocols List of available protocols for IP assignment.
error_handling Options to determine virtual machine handling when a host in a cluster becomes non-operational.
storage_formats The format versions for storage meta-data.

6.1.1. Current Version

The current element signifies if the version specified is the most recent supported compatibility level. The value is either a Boolean true or false.
<capabilities>
    <version major="3" minor="0">
        ...
        <current>true</current>
        ...
    </version>
</capabilities>

6.1.2. Features

Each version contains a list of compatible features.

Table 6.2. Feature Types

Feature Element Type Description
transparent_hugepages Boolean: true or false Defines the availability of Transparent Hugepages for hosts.

<capabilities>
    <version major="3" minor="0">
        ...
        <features>
            <transparent_hugepages>true</transparent_hugepages>
        </features>
        ...
    </version>
</capabilities>

6.1.3. CPUs

Each cluster is configured with a minimal CPU type that all hosts in that cluster must support. Guests running on hosts within the cluster all run on this CPU type, ensuring that every guest is migratable to any host within the cluster.
Red Hat Enterprise Virtualization has a set of supported CPU types to choose from when configuring a cluster.

Table 6.3. CPU properties

Element Description
id An opaque identifier for the CPU model.
level An indication as to the relative priority/preference for the CPUs in the list.

<capabilities>
    <version major="3" minor="0">
        ...
        <cpus>
            <cpu id="Intel Conroe Family">
                <level>3</level>
            </cpu>
            <cpu id="Intel Penryn Family">
                <level>4</level>
            </cpu>
            ...
        </cpus>
        ...
    </version>
</capabilities>

6.1.4. Power Managers

Red Hat Enterprise Virtualization platform provides a list of supported power_managers for host fencing configuration. Each power_management option contains a set of properties.

Table 6.4. Power Management Properties

Element Description
type The supported fencing device type.
options A list of options available to the supported fencing device. Options include a name and a value type.

<capabilities>
    <version major="3" minor="0">
        ...
        <power_managers>
            <power_management type="alom">
                <options>
                    <option type="bool" name="secure"/>
                    <option type="int" name="port"/>
                </options>
            </power_management>
            <power_management type="apc">
                <options>
                    <option type="bool" name="secure"/>
                    <option type="int" name="port"/>
                    <option type="int" name="slot"/>
                </options>
            </power_management>
            <power_management type="bladecenter">
                <options>
                    <option type="bool" name="secure"/>
                    <option type="int" name="port"/>
                    <option type="int" name="slot"/>
                </options>
            </power_management>
            ...
        </power_managers>
        ...
    </version>
</capabilities>

6.1.5. Fence Types

The fence_types element defines fence_type options to fence a host and reduce power usage.
<capabilities>
    <version major="3" minor="0">
        ...
        <fence_types>
            <fence_type>manual</fence_type>
            <fence_type>restart</fence_type>
            <fence_type>start</fence_type>
            <fence_type>stop</fence_type>
            <fence_type>status</fence_type>
        </fence_types>
        ...
    </version>
</capabilities>

6.1.6. Storage Types

The storage_types element defines the available physical storage_type options.
<capabilities>
    <version major="3" minor="0">
        ...
        <storage_types>
            <storage_type>iscsi</storage_type>
            <storage_type>fcp</storage_type>
            <storage_type>nfs</storage_type>
            <storage_type>localfs</storage_type>
        </storage_types>
        ...
    </version>
</capabilities>

6.1.7. Storage Domain Types

The storage_domain_types element shows the available storage_domain_type options a user creates in a virtualization environment.
<capabilities>
    <version major="3" minor="0">
        ...
        <storage_domain_types>
            <storage_domain_type>data</storage_domain_type>
            <storage_domain_type>iso</storage_domain_type>         
            <storage_domain_type>export</storage_domain_type>          
        </storage_domain_types>
        ...
    </version>
</capabilities>

6.1.8. Virtual Machine Types

The vm_types element defines each virtual machine type (vm_type) available for creation in a virtual environment.
<capabilities>
    <version major="3" minor="0">
        ...
        <vm_types>
            <vm_type>desktop</vm_type>
            <vm_type>server</vm_type>
        </vm_types>
        ...
    </version>
</capabilities>

6.1.9. Boot Devices

Each virtual machine boots from a selected device. The boot_devices element lists such boot_device options.
<capabilities>
    <version major="3" minor="0">
        ...
        <boot_devices>
            <boot_device>cdrom</boot_device>
            <boot_device>hd</boot_device>
            <boot_device>network</boot_device>
        </boot_devices>
        ...
    </version>
</capabilities>

6.1.10. Display Types

Access to a virtual machine through Red Hat Enterprise Virtualization Manager requires a display protocol. The display_types element lists each display_type protocol.
<capabilities>
    <version major="3" minor="0">
        ...
        <display_types>
            <display_type>vnc</display_type>
            <display_type>spice</display_type>
        </display_types>
        ...
    </version>
</capabilities>

6.1.11. NIC Interface Types

A virtual machine requires a network interface to connect to a network. The nic_interfaces element defines the supported NIC types available. Each nic_interface depends on the drivers available for different types of virtual machines. VirtIO drivers are available for Red Hat Enterprise Linux 4.8 and above, and for Windows virtual machines. Windows supports rtl8139 without the need for drivers. Other Linux machines, or earlier versions of Red Hat Enterprise Linux, use e1000 or rtl8139.
<capabilities>
    <version major="3" minor="0">
        ...
        <nic_interfaces>
            <nic_interface>e1000</nic_interface>
            <nic_interface>virtio</nic_interface>
            <nic_interface>rtl8139</nic_interface>
            <nic_interface>rtl8139_virtio</nic_interface>
        </nic_interfaces>
        ...
    </version>
</capabilities>

6.1.12. Disk Types

Each virtual machine requires a virtual disk for storage. The disk_types element lists the available virtual disk_type options.
<capabilities>
    <version major="3" minor="0">
        ...
        <disk_types>
            <disk_type>data</disk_type>
            <disk_type>system</disk_type>
        <disk_types
        ...
    </version>
</capabilities>

6.1.13. OS Types

Each virtual machine contains an os_type value to define the virtual machine operating system. The default is unassigned.
<capabilities>
    <version major="3" minor="0">
        ...
        <os_types>
            <os_type>unassigned</os_type>
            <os_type>windows_xp</os_type>
            <os_type>windows_2003</os_type>
            <os_type>windows_2008</os_type>
            <os_type>other_linux</os_type>
            <os_type>other</os_type>
            <os_type>rhel_5</os_type>
            <os_type>rhel_4</os_type>
            <os_type>rhel_3</os_type>
            <os_type>windows_2003x64</os_type>
            <os_type>windows_7</os_type>
            <os_type>windows_7x64</os_type>
            <os_type>rhel_5x64</os_type>
            <os_type>rhel_4x64</os_type>
            <os_type>rhel_3x64</os_type>
            <os_type>windows_2008x64</os_type>
            <os_type>windows_2008r2x64</os_type>
            <os_type>rhel_6</os_type>
            <os_type>rhel_6x64</os_type>
        <os_types>
        ...
    </version>
</capabilities>

6.1.14. Disk Formats

An API user selects the format for virtual disks. The disk_formats element defines the format types. The disk_format types include pre-allocated (raw) or thin-provisioned (Copy-On-Write or cow).
<capabilities>
    <version major="3" minor="0">
        ...
        <disk_formats>
            <disk_format>cow</disk_format>
            <disk_format>raw</disk_format>
        </disk_formats>
        ...
    </version>
</capabilities>

6.1.15. Disk Interfaces

The disk_interfaces element lists disk_interface options for emulated protocols to interface with virtual disks.
<capabilities>
    <version major="3" minor="0">
        ...
        <disk_interfaces>
            <disk_interface>ide</disk_interface>
            <disk_interface>virtio</disk_interface>
        </disk_interfaces>
        ...
    </version>
</capabilities>

6.1.16. Virtual Machine Affinities

Virtual machines migrate between hosts in a cluster. The vm_affinities element defines each available migration affinity for virtual machines.
<capabilities>
    <version major="3" minor="0">
        ...
        <vm_affinities>
            <affinity>migratable</affinity>
            <affinity>user_migratable</affinity>
            <affinity>pinned</affinity>
        </vm_affinities>
        ...
    </version>
</capabilities>

6.1.17. Custom Properties

The custom_properties element lists a set of environment variables for a virtual environment. The virtual environment uses these variables as parameters for event-triggered VDSM scripts. Each custom_property includes attributes for a property name and a regular expression (regexp) to define the format of the property value.
<capabilities>
    <version major="3" minor="0">
        ...
        <custom_properties>
            <custom_property name="sap_agent" regexp="^(true|false)$"/>
            <custom_property name="sndbuf" regexp="^[0-9]+$"/>
            <custom_property name="vhost"
              regexp="^(([a-zA-Z0-9_]*):(true|false))
              (,(([a-zA-Z0-9_]*):(true|false)))*$"/>
            <custom_property name="viodiskcache"
              regexp="^(none|writeback|writethrough)$"/>
        </custom_properties>
        ...
    </version>
</capabilities>

6.1.18. Boot Protocols

The boot_protocol element lists each possible IP assignment boot_protocol for hosts when booting.
<capabilities>
    <version major="3" minor="0">
        ...
        <boot_protocols>
            <boot_protocol>dhcp</boot_protocol>
            <boot_protocol>static</boot_protocol>
        </boot_protocols>
        ...
    </version>
</capabilities>

6.1.19. Error Handling

A Red Hat Enterprise Virtualization Manager determines whether to migrate virtual machines on a non-operational host using one of the on_error options the in the error_handling element.
<capabilities>
    <version major="3" minor="0">
        ...
        <error_handling>
            <on_error>migrate</on_error>
            <on_error>do_not_migrate</on_error>
            <on_error>migrate_highly_available</on_error>
        </error_handling>
        ...
    </version>
</capabilities>

6.1.20. Storage Formats

The storage_formats element lists the available format versions for storage meta-data.
<capabilities>
    <version major="3" minor="0">
        ...
        <storage_formats>
            <format>v1</format>
            <format>v2</format>
        </storage_formats>
        ...
    </version>
</capabilities>

6.1.21. Resource Status States

Each version contains a set of states for resource statuses. These resource status elements include creation_states, power_management_states, host_states, host_non_operational_details, network_states, storage_domain_states, template_states, vm_states, vm_pause_details, disk_states, host_nic_states, and data_center_states.