Develop for XenServer

Types

Primitives

The following primitive types are used to specify methods and fields in the API Reference:

Type Description
string text strings
int 64-bit integers
float IEEE double-precision floating-point numbers
bool boolean
datetime date and timestamp

Higher-order types

The following type constructors are used:

Type Description
c ref reference to an object of class c
t set a set of elements of type t
(a -> b) map a table mapping values of type a to values of type b

Enumeration types

The following enumeration types are used:

Enum after_apply_guidance

Named value Description
restartHost This patch requires the host to be restarted once applied.
restartHVM This patch requires HVM guests to be restarted once applied.
restartPV This patch requires PV guests to be restarted once applied.
restartXAPI This patch requires XAPI to be restarted once applied.

Enum allocation_algorithm

Named value Description
breadth_first vGPUs of a given type are allocated evenly across supporting pGPUs.
depth_first vGPUs of a given type are allocated on supporting pGPUs until they are full.

Enum bond_mode

Named value Description
active-backup Active/passive bonding: only one NIC is carrying traffic
balance-slb Source-level balancing
lacp Link aggregation control protocol

Enum certificate_type

Named value Description
ca Certificate that is trusted by the whole pool
host Certificate that identifies a single host to entities outside the pool
host_internal Certificate that identifies a single host to other pool members

Enum cls

Named value Description
Certificate Certificate
Host Host
Pool Pool
PVS_proxy PVS_proxy
SR SR
VDI VDI
VM VM
VMPP VMPP
VMSS VMSS

Enum cluster_host_operation

Named value Description
destroy completely destroying a cluster host
disable disabling cluster membership on a particular host
enable enabling cluster membership on a particular host

Enum cluster_operation

Named value Description
add adding a new member to the cluster
destroy completely destroying a cluster
disable disabling any cluster member
enable enabling any cluster member
remove removing a member from the cluster

Enum console_protocol

Named value Description
rdp Remote Desktop Protocol
rfb Remote FrameBuffer protocol (as used in VNC)
vt100 VT100 terminal

Enum domain_type

Named value Description
hvm HVM; Fully Virtualised
pv PV: Paravirtualised
pv_in_pvh PV inside a PVH container
pvh PVH
unspecified Not specified or unknown domain type

Enum event_operation

Named value Description
add An object has been created
del An object has been deleted
mod An object has been modified

Enum host_allowed_operations

Named value Description
apply_updates Indicates this host is being updated
enable Indicates this host is in the process of enabling
evacuate Indicates this host is evacuating
power_on Indicates this host is in the process of being powered on
provision Indicates this host is able to provision another VM
reboot Indicates this host is in the process of rebooting
shutdown Indicates this host is in the process of shutting itself down
vm_migrate This host is the migration target of a VM
vm_resume This host is resuming a VM
vm_start This host is starting a VM

Enum host_display

Named value Description
disable_on_reboot The host will stop outputting its console to a physical display device on next boot
disabled This host is not outputting its console to a physical display device
enable_on_reboot The host will start outputting its console to a physical display device on next boot
enabled This host is outputting its console to a physical display device

Enum host_numa_affinity_policy

Named value Description
any VMs are spread across all available NUMA nodes
best_effort VMs are placed on the smallest number of NUMA nodes that they fit using soft-pinning, but the policy doesn’t guarantee a balanced placement, falling back to the ‘any’ policy.
default_policy Use the NUMA affinity policy that is the default for the current version

Enum host_sched_gran

Named value Description
core core scheduling
cpu CPU scheduling
socket socket scheduling

Enum ip_configuration_mode

Named value Description
DHCP Acquire an IP address by DHCP
None Do not acquire an IP address
Static Static IP address configuration

Enum ipv6_configuration_mode

Named value Description
Autoconf Router assigned prefix delegation IPv6 allocation
DHCP Acquire an IPv6 address by DHCP
None Do not acquire an IPv6 address
Static Static IPv6 address configuration

Enum latest_synced_updates_applied_state

Named value Description
no The host is outdated with the latest updates synced from remote CDN
unknown If the host is up to date with the latest updates synced from remote CDN is unknown
yes The host is up to date with the latest updates synced from remote CDN

Enum livepatch_status

Named value Description
ok There is no applicable live patch
ok_livepatch_complete An applicable live patch exists for every required component
ok_livepatch_incomplete An applicable live patch exists but it is not sufficient

Enum network_default_locking_mode

Named value Description
disabled Treat all VIFs on this network with locking_mode = ‘default’ as if they have locking_mode = ‘disabled’
unlocked Treat all VIFs on this network with locking_mode = ‘default’ as if they have locking_mode = ‘unlocked’

Enum network_operations

Named value Description
attaching Indicates this network is attaching to a VIF or PIF

Enum network_purpose

Named value Description
insecure_nbd Network Block Device service without integrity or confidentiality: NOT RECOMMENDED
nbd Network Block Device service using TLS

Enum on_boot

Named value Description
persist Standard behaviour.
reset When a VM containing this VDI is started, the contents of the VDI are reset to the state they were in when this flag was last set.

Enum on_crash_behaviour

Named value Description
coredump_and_destroy record a coredump and then destroy the VM state
coredump_and_restart record a coredump and then restart the VM
destroy destroy the VM state
preserve leave the crashed VM paused
rename_restart rename the crashed VM and start a new copy
restart restart the VM

Enum on_normal_exit

Named value Description
destroy destroy the VM state
restart restart the VM

Enum on_softreboot_behavior

Named value Description
destroy destroy the VM state
preserve leave the VM paused
restart restart the VM
soft_reboot perform soft-reboot

Enum pci_dom0_access

Named value Description
disable_on_reboot On host reboot dom0 will be blocked from accessing this device
disabled dom0 cannot access this device
enable_on_reboot On host reboot dom0 will be allowed to access this device
enabled dom0 can access this device as normal

Enum persistence_backend

Named value Description
xapi This VTPM is persisted in XAPI’s DB

Enum pif_igmp_status

Named value Description
disabled IGMP Snooping is disabled in the corresponding backend bridge.’
enabled IGMP Snooping is enabled in the corresponding backend bridge.’
unknown IGMP snooping status is unknown. If this is a VLAN master, then please consult the underlying VLAN slave PIF.

Enum pool_allowed_operations

Named value Description
apply_updates Indicates this pool is in the process of applying updates
cert_refresh A certificate refresh and distribution is in progress
cluster_create Indicates this pool is in the process of creating a cluster
configure_repositories Indicates this pool is in the process of configuring repositories
copy_primary_host_certs Indicates the primary host is sending its certificates to another host
designate_new_master Indicates this pool is in the process of changing master
eject Ejection of a host from the pool is under way
exchange_ca_certificates_on_join Indicates this pool is exchanging ca certificates with a new joiner
exchange_certificates_on_join Indicates this pool is exchanging internal certificates with a new joiner
get_updates Indicates this pool is in the process of getting updates
ha_disable Indicates this pool is in the process of disabling HA
ha_enable Indicates this pool is in the process of enabling HA
sync_updates Indicates this pool is in the process of syncing updates
tls_verification_enable Indicates this pool is in the process of enabling TLS verification

Enum primary_address_type

Named value Description
IPv4 Primary address is the IPv4 address
IPv6 Primary address is the IPv6 address

Enum pvs_proxy_status

Named value Description
caching The proxy is currently caching data
incompatible_protocol_version The PVS protocol in use is not compatible with the PVS proxy
incompatible_write_cache_mode The PVS device is configured to use an incompatible write-cache mode
initialised The proxy is setup but has not yet cached anything
stopped The proxy is not currently running

Enum sdn_controller_protocol

Named value Description
pssl Passive ssl connection
ssl Active ssl connection

Enum sr_health

Named value Description
healthy Storage is fully available
recovering Storage is busy recovering, e.g. rebuilding mirrors.

Enum sriov_configuration_mode

Named value Description
manual Configure network sriov manually
modprobe Configure network sriov by modprobe, need reboot
sysfs Configure network sriov by sysfs, do not need reboot
unknown Unknown mode

Enum storage_operations

Named value Description
destroy Destroying the SR
forget Forgetting about SR
pbd_create Creating a PBD for this SR
pbd_destroy Destroying one of this SR’s PBDs
plug Plugging a PBD into this SR
scan Scanning backends for new or deleted VDIs
unplug Unplugging a PBD from this SR
update Refresh the fields on the SR
vdi_clone Cloneing a VDI
vdi_create Creating a new VDI
vdi_data_destroy Deleting the data of the VDI
vdi_destroy Destroying a VDI
vdi_disable_cbt Disabling changed block tracking for a VDI
vdi_enable_cbt Enabling changed block tracking for a VDI
vdi_introduce Introducing a new VDI
vdi_list_changed_blocks Exporting a bitmap that shows the changed blocks between two VDIs
vdi_mirror Mirroring a VDI
vdi_resize Resizing a VDI
vdi_set_on_boot Setting the on_boot field of the VDI
vdi_snapshot Snapshotting a VDI

Enum task_allowed_operations

Named value Description
cancel refers to the operation “cancel”
destroy refers to the operation “destroy”

Enum task_status_type

Named value Description
cancelled task has been cancelled
cancelling task is being cancelled
failure task has failed
pending task is in progress
success task was completed successfully

Enum telemetry_frequency

Named value Description
daily Run telemetry task daily
monthly Run telemetry task monthly
weekly Run telemetry task weekly

Enum tristate_type

Named value Description
no Known to be false
unspecified Unknown or unspecified
yes Known to be true

Enum tunnel_protocol

Named value Description
gre GRE protocol
vxlan VxLAN Protocol

Enum update_after_apply_guidance

Named value Description
restartHost This update requires the host to be restarted once applied.
restartHVM This update requires HVM guests to be restarted once applied.
restartPV This update requires PV guests to be restarted once applied.
restartXAPI This update requires XAPI to be restarted once applied.

Enum update_guidances

Named value Description
reboot_host Indicates the updated host should reboot as soon as possible
reboot_host_on_kernel_livepatch_failure Indicates the updated host should reboot as soon as possible since one or more kernel livepatch(es) failed to be applied.
reboot_host_on_livepatch_failure Indicates the updated host should reboot as soon as possible since one or more livepatch(es) failed to be applied.
reboot_host_on_xen_livepatch_failure Indicates the updated host should reboot as soon as possible since one or more xen livepatch(es) failed to be applied.
restart_device_model Indicates the device model of a running VM should restart as soon as possible
restart_toolstack Indicates the Toolstack running on the updated host should restart as soon as possible
restart_vm Indicates the VM should restart as soon as possible

Enum update_sync_frequency

Named value Description
daily The update synchronizations happen every day
weekly The update synchronizations happen every week on the chosen day

Enum vbd_mode

Named value Description
RO only read-only access will be allowed
RW read-write access will be allowed

Enum vbd_operations

Named value Description
attach Attempting to attach this VBD to a VM
eject Attempting to eject the media from this VBD
insert Attempting to insert new media into this VBD
pause Attempting to pause a block device backend
plug Attempting to hotplug this VBD
unpause Attempting to unpause a block device backend
unplug Attempting to hot unplug this VBD
unplug_force Attempting to forcibly unplug this VBD

Enum vbd_type

Named value Description
CD VBD will appear to guest as CD
Disk VBD will appear to guest as disk
Floppy VBD will appear as a floppy

Enum vdi_operations

Named value Description
blocked Operations on this VDI are temporarily blocked
clone Cloning the VDI
copy Copying the VDI
data_destroy Deleting the data of the VDI
destroy Destroying the VDI
disable_cbt Disabling changed block tracking for a VDI
enable_cbt Enabling changed block tracking for a VDI
force_unlock Forcibly unlocking the VDI
forget Forget about the VDI
generate_config Generating static configuration
list_changed_blocks Exporting a bitmap that shows the changed blocks between two VDIs
mirror Mirroring the VDI
resize Resizing the VDI
resize_online Resizing the VDI which may or may not be online
set_on_boot Setting the on_boot field of the VDI
snapshot Snapshotting the VDI
update Refreshing the fields of the VDI

Enum vdi_type

Named value Description
cbt_metadata Metadata about a snapshot VDI that has been deleted: the set of blocks that changed between some previous version of the disk and the version tracked by the snapshot.
crashdump a disk that stores VM crashdump information
ephemeral a disk that may be reformatted on upgrade
ha_statefile a disk used for HA storage heartbeating
metadata a disk used for HA Pool metadata
pvs_cache a disk that stores PVS cache data
redo_log a disk used for a general metadata redo-log
rrd a disk that stores SR-level RRDs
suspend a disk that stores a suspend image
system a disk that may be replaced on upgrade
user a disk that is always preserved on upgrade

Enum vgpu_type_implementation

Named value Description
gvt_g vGPU using Intel GVT-g
mxgpu vGPU using AMD MxGPU
nvidia vGPU using NVIDIA hardware
nvidia_sriov vGPU using NVIDIA hardware with SR-IOV
passthrough Pass through an entire physical GPU to a guest

Enum vif_ipv4_configuration_mode

Named value Description
None Follow the default IPv4 configuration of the guest (this is guest-dependent)
Static Static IPv4 address configuration

Enum vif_ipv6_configuration_mode

Named value Description
None Follow the default IPv6 configuration of the guest (this is guest-dependent)
Static Static IPv6 address configuration

Enum vif_locking_mode

Named value Description
disabled No traffic is permitted
locked Only traffic to a specific MAC and a list of IPv4 or IPv6 addresses is permitted
network_default No specific configuration set - default network policy applies
unlocked All traffic is permitted

Enum vif_operations

Named value Description
attach Attempting to attach this VIF to a VM
plug Attempting to hotplug this VIF
unplug Attempting to hot unplug this VIF

Enum vm_appliance_operation

Named value Description
clean_shutdown Clean shutdown
hard_shutdown Hard shutdown
shutdown Shutdown
start Start

Enum vm_operations

Named value Description
assert_operation_valid  
awaiting_memory_live Waiting for the memory settings to change
call_plugin refers to the operation “call_plugin”
changing_dynamic_range Changing the memory dynamic range
changing_memory_limits Changing the memory limits
changing_memory_live Changing the memory settings
changing_NVRAM Changing NVRAM for a halted VM.
changing_shadow_memory Changing the shadow memory for a halted VM.
changing_shadow_memory_live Changing the shadow memory for a running VM.
changing_static_range Changing the memory static range
changing_VCPUs Changing VCPU settings for a halted VM.
changing_VCPUs_live Changing VCPU settings for a running VM.
checkpoint refers to the operation “checkpoint”
clean_reboot refers to the operation “clean_reboot”
clean_shutdown refers to the operation “clean_shutdown”
clone refers to the operation “clone”
copy refers to the operation “copy”
create_template refers to the operation “create_template”
create_vtpm Creating and adding a VTPM to this VM
csvm refers to the operation “csvm”
data_source_op Add, remove, query or list data sources
destroy refers to the act of uninstalling the VM
export exporting a VM to a network stream
get_boot_record refers to the operation “get_boot_record”
hard_reboot refers to the operation “hard_reboot”
hard_shutdown refers to the operation “hard_shutdown”
import importing a VM from a network stream
make_into_template Turning this VM into a template
metadata_export exporting VM metadata to a network stream
migrate_send refers to the operation “migrate_send”
pause refers to the operation “pause”
pool_migrate refers to the operation “pool_migrate”
power_state_reset refers to the operation “power_state_reset”
provision refers to the operation “provision”
query_services refers to the operation “query_services”
resume refers to the operation “resume”
resume_on refers to the operation “resume_on”
revert refers to the operation “revert”
reverting Reverting the VM to a previous snapshotted state
send_sysrq refers to the operation “send_sysrq”
send_trigger refers to the operation “send_trigger”
shutdown refers to the operation “shutdown”
snapshot refers to the operation “snapshot”
snapshot_with_quiesce refers to the operation “snapshot_with_quiesce”
start refers to the operation “start”
start_on refers to the operation “start_on”
suspend refers to the operation “suspend”
unpause refers to the operation “unpause”
update_allowed_operations  

Enum vm_power_state

Named value Description
Halted VM is offline and not using any resources
Paused All resources have been allocated but the VM itself is paused and its vCPUs are not running
Running Running
Suspended VM state has been saved to disk and it is nolonger running. Note that disks remain in-use while the VM is suspended.

Enum vmpp_archive_frequency

Named value Description
always_after_backup Archive after backup
daily Daily archives
never Never archive
weekly Weekly backups

Enum vmpp_archive_target_type

Named value Description
cifs CIFS target config
nfs NFS target config
none No target config

Enum vmpp_backup_frequency

Named value Description
daily Daily backups
hourly Hourly backups
weekly Weekly backups

Enum vmpp_backup_type

Named value Description
checkpoint The backup is a checkpoint
snapshot The backup is a snapshot

Enum vmss_frequency

Named value Description
daily Daily snapshots
hourly Hourly snapshots
weekly Weekly snapshots

Enum vmss_type

Named value Description
checkpoint The snapshot is a checkpoint
snapshot The snapshot is a disk snapshot
snapshot_with_quiesce Support for VSS has been removed.

Enum vtpm_operations

Named value Description
destroy Destroy a VTPM

Enum vusb_operations

Named value Description
attach Attempting to attach this VUSB to a VM
plug Attempting to plug this VUSB into a VM
unplug Attempting to hot unplug this VUSB
Types