Citrix Hypervisor

XenCenter API Extensions

The following section details the assumptions and API extensions that we have made, over and above the documented API. Extensions are encoded as particular key-value pairs in dictionaries such as VM.other_config.

Pool

Key Semantics
pool.name_label An empty name_label indicates that the pool is hidden on the tree view.
pool.rolling_upgrade_in_progress Present if the pool is in the middle of a rolling upgrade.

Host

Key Semantics
host.other_config[“iscsi_iqn”] The host’s iSCSI IQN.
host.license_params[“expiry”] The expiry date of the host’s license, in ISO 8601, UTC.
host.license_params[“sku_type”] The host license type i.e. Server or Enterprise.
host.license_params[“restrict_pooling”] Returns true if pooling is restricted by the host.
host.license_params[“restrict_connection”] The number of connections that can be made from XenCenter is restricted.
host.license_params[“restrict_qos”] Returns true if Quality of Service settings are enabled on the host.
host.license_params[“restrict_vlan”] Returns true if creation of virtual networks is restricted on the host.
host.license_params[“restrict_pool_attached_storage”] Returns true if the creation of shared storage is restricted on this host.
host.software_version[“product_version”] Returns the host’s product version.
host.software_version[“build_number”] Returns the host’s build number.
host.software_version[“xapi”] Returns the host’s api revision number.
host.software_version[“package-linux”] Returns “installed” if the Linux pack has been installed.
host.software_version[“oem_build_number”] If the host is the OEM version, return its revision number.
host.logging[“syslog_destination”] Gets or sets the destination for the Citrix Hypervisor system logger (null for local logging).
host.logging[“multipathing”] “true” if storage multipathing is enabled on this host.
host.logging[“boot_time”] A floating point Unix time giving the time that the host booted.
host.logging[“agent_start_time”] A floating point Unix time giving the time that the control domain management daemon started.

VM

Key Semantics
VM.other_config[“default_template”] This template is one that was installed by . This is used to selectively hide these in the tree view, to use a different icon for them, and to disallow deletion.
VM.other_config[“xensource_internal”] This template is special, such as the P2V server template. These are completely hidden by the UI.
VM.other_config[“install_distro”] == “rhlike” This template is for RHEL 5, or CentOS equivalents. This is used to prompt for the Install Repository during install, including support for install from ISO / CD, and to modify NFS URLs to suit these installers.
VM.other_config[“install-repository”] == “cdrom” Requests an install from a repository in the VM’s attached CD drive, rather than a URL.
VM.other_config[“auto_poweron”] Gets or sets whether the VM starts when the server boots, “true” or “false”.
VM.other_config[“ignore_excessive_vcpus”] Gets or sets to ignore XenCenter warning if a VM has more VCPUs than its host has physical CPUs, true to ignore.
VM.other_config[“HideFromXenCenter”] Gets or sets whether XenCenter will show the VM in the treeview, “true” to hide.
VM.other_config[“import_task”] Gets the import task that created this VM.
VM.HVM_boot_params[“order”] Gets or sets the VM’s boot order on HVM VM’s only, for example, “CDN” will boot in the following order - First boot disk, CD drive, Network.
VM.VCPU_params[“weight”] Gets or sets the IONice value for the VM’s VCPUs, ranges from 1 to 65536, 65536 being the highest.
VM.pool_migrate(…, options[‘live’]) true indicates live migration. XenCenter always uses this.
VM.other_config[“install-methods”] A comma-separated list of install methods available for this template. Can include “cdrom”, “nfs”, “http” or “ftp”.
VM.other_config[“last_shutdown_time”] The time that this VM was last shut down or rebooted, formatted as a UTC ISO8601 datetime.
VM.other_config[“p2v_source_machine”] The source machine, if this VM was imported by a P2V process.
VM.other_config[“p2v_import_date”] The date the VM was imported, if it was imported by a P2V process. Formatted as a UTC ISO8601 datetime.

SR

Key Semantics
SR.other_config[“auto-scan”] The SR will be automatically scanned for changes. Set on all SRs created by XenCenter.
SR.sm_config[“type”] Set as type cd for SRs which are physical CD drives.

VDI

Key Semantics
VDI.type user instead of system is used to mean “do or do not allow deletion of the VDI through the GUI, if this disk is attached to a VM”. The intention here is to prevent you from corrupting a VM (uninstall it instead). suspend and crashdump record suspend and core dumps respectively. ephemeral is currently unused.
VDI.managed All unmanaged VDIs are completely hidden in the UI. These are branch points in VHD chains, or unused LUN-per-VDI disks.
VDI.sm_config[“vmhint”] The UUID of the VM that this VDI supports. This is set when VDIs are created through the user interface, to improve performance for certain storage backends.

VBD

Key Semantics
VBD.other_config[“owner”] If set, then this disk may be deleted when the VM is uninstalled.
VBD.other_config[“class”] Set to an integer, corresponding to the Best Effort setting of ionice.

Network

Key Semantics
network.other_config[“automatic”] The New VM wizard will create a VIF connected to this network by default, if this key has any value other than false.
network.other_config[“import_task”] Gets the import task that created this network.

VM_guest_metrics

Key Semantics
PV_drivers_version[“major”] Gets the major version of the Citrix VM Tools on the VM.
PV_drivers_version[“minor”] Gets the minor version of the Citrix VM Tools on the VM.
PV_drivers_version[“micro”] Gets the micro (build number) of the Citrix VM Tools on the VM.

Task

Key Semantics
task.other_config[“object_creation”] == “complete” For the task associated with a VM import, this flag will be set when all the objects (VMs, networks) have been created. This is useful in the import VM wizard for us to then go and re-map all the networks that need it.
XenCenter API Extensions