.. role:: since ============================== Driver capabilities XML format ============================== .. contents:: Element and attribute overview ------------------------------ As new virtualization engine support gets added to libvirt, and to handle cases like QEMU supporting a variety of emulations, a query interface has been added in 0.2.1 allowing to list the set of supported virtualization capabilities on the host: :: char * virConnectGetCapabilities (virConnectPtr conn); The value returned is an XML document listing the virtualization capabilities of the host and virtualization engine to which ```conn`` is connected. One can test it using ``virsh`` command line tool command '``capabilities``', it dumps the XML associated to the current connection. As can be seen in the `Examples`_, the capabilities XML consists of the ``capabilities`` element which have exactly one ``host`` child element to report information on host capabilities, and zero or more ``guest`` element to express the set of architectures the host can run at the moment. Host capabilities ~~~~~~~~~~~~~~~~~ The ```` element consists of the following child elements: ``uuid`` The host UUID. ``cpu`` The host CPU architecture and features. ``power_management`` whether host is capable of memory suspend, disk hibernation, or hybrid suspend. ``migration_features`` This element exposes information on the hypervisor's migration capabilities, like live migration, supported URI transports, and so on. ``topology`` This element embodies the host internal topology. Management applications may want to learn this information when orchestrating new guests - e.g. due to reduce inter-NUMA node transfers. Note that the ``sockets`` value reported here is per-NUMA-node; this is in contrast to the value given in domain definitions, which is interpreted as a total number of sockets for the domain. ``secmodel`` To find out default security labels for different security models you need to parse this element. In contrast with the former elements, this is repeated for each security model the libvirt daemon currently supports. Guest capabilities ~~~~~~~~~~~~~~~~~~ While the previous section (`Host capabilities`_) aims at host capabilities, this one focuses on capabilities available to a guest using a given hypervisor. The ```` element will typically wrap up the following elements: ``os_type`` This expresses what kind of operating system the hypervisor is able to run. Possible values are: ``xen`` for XEN PV ``linux`` legacy alias for ``xen`` ``xenpvh`` for XEN PVH ``hvm`` Unmodified operating system ``exe`` Container based virtualization ``arch`` This element brings some information on supported guest architecture. Possible subelements are: ``wordsize`` Size of CPU word in bits, for example 64. ``emulator`` Emulator (device model) path, for use in `emulator `__ element of domain XML. ``loader`` Loader path, for use in `loader `__ element of domain XML. ``machine`` Machine type, for use in `machine `__ attribute of os/type element in domain XML. For example Xen supports ``xenfv`` for HVM, ``xenpv`` for PV, or ``xenpvh`` for PVH. ``domain`` The ``type`` attribute of this element specifies the type of hypervisor required to run the domain. Use in `type `__ attribute of the domain root element. ``features`` This optional element encases possible features that can be used with a guest of described type. Possible subelements are: ``pae`` If present, 32-bit guests can use PAE address space extensions, :since:`since 0.4.1` ``nonpae`` If present, 32-bit guests can be run without requiring PAE, :since:`since 0.4.1` ``ia64_be`` If present, IA64 guests can be run in big-endian mode, :since:`since 0.4.1` ``acpi`` If this element is present, the ``default`` attribute describes whether the hypervisor exposes ACPI to the guest by default, and the ``toggle`` attribute describes whether the user can override this default. :since:`Since 0.4.1` ``apic`` If this element is present, the ``default`` attribute describes whether the hypervisor exposes APIC to the guest by default, and the ``toggle`` attribute describes whether the user can override this default. :since:`Since 0.4.1` ``cpuselection`` If this element is present, the hypervisor supports the ```` element within a domain definition for fine-grained control over the CPU presented to the guest. :since:`Since 0.7.5` ``deviceboot`` If this element is present, the ```` element can be used inside devices, rather than the older boot specification by category. :since:`Since 0.8.8` ``disksnapshot`` If this element is present, the ``default`` attribute describes whether creating external disk snapshots is supported. If absent, creating external snapshots may still be supported, but it requires attempting the API and checking for an error to find out for sure. :since:`Since 1.2.3` ``externalSnapshot`` If this element is present, the hypervisor supports deleting and reverting external snapshots including memory state. Support for creation of external snapshots is reported via the ``disksnapshot`` feature flag. Management applications can now switch from internal snapshots to external snapshots. :since:`Since 9.9.0` Examples ~~~~~~~~ For example, in the case of a 64-bit machine with hardware virtualization capabilities enabled in the chip and BIOS you will see: :: 7b55704c-29f4-11b2-a85c-9dc6ff50623f x86_64 Skylake-Client-noTSX-IBRS Intel tcp rdma 32498112 6813808 2048 1 none 0 dac 0 +77:+77 +77:+77 hvm 64 /usr/bin/qemu-system-x86_64 pc-i440fx-7.1 pc pc-q35-5.2 pc-i440fx-2.12 pc-i440fx-2.0 pc-i440fx-6.2 pc-q35-4.2 pc-i440fx-2.5 pc-i440fx-4.2 pc-i440fx-5.2 pc-i440fx-1.5 pc-q35-2.7 pc-q35-7.1 q35 pc-i440fx-2.2 pc-i440fx-2.7 pc-q35-6.1 pc-q35-2.4 pc-q35-2.10 x-remote pc-q35-5.1 pc-i440fx-1.7 pc-q35-2.9 pc-i440fx-2.11 pc-q35-3.1 pc-i440fx-6.1 pc-q35-4.1 pc-i440fx-2.4 pc-i440fx-4.1 pc-i440fx-5.1 pc-i440fx-2.9 isapc pc-i440fx-1.4 pc-q35-2.6 pc-i440fx-3.1 pc-q35-2.12 pc-q35-7.0 pc-i440fx-2.1 pc-q35-6.0 pc-i440fx-2.6 pc-q35-4.0.1 pc-i440fx-7.0 pc-i440fx-1.6 pc-q35-5.0 pc-q35-2.8 pc-i440fx-2.10 pc-q35-3.0 pc-i440fx-6.0 pc-q35-4.0 microvm pc-i440fx-2.3 pc-i440fx-4.0 pc-i440fx-5.0 pc-i440fx-2.8 pc-q35-6.2 pc-q35-2.5 pc-i440fx-3.0 pc-q35-2.11