Class: VM
A virtual machine (or 'guest').
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
Enums
vm_power_state
Values: | 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. |
update_guidances
Values: | reboot_host | Indicates the updated host should reboot as soon as possible |
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_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_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_toolstack | Indicates the Toolstack running on the updated host should restart as soon as possible | |
restart_device_model | Indicates the device model of a running VM should restart as soon as possible | |
restart_vm | Indicates the VM should restart as soon as possible |
on_softreboot_behavior
Values: | soft_reboot | perform soft-reboot |
destroy | destroy the VM state | |
restart | restart the VM | |
preserve | leave the VM paused |
on_normal_exit
Values: | destroy | destroy the VM state |
restart | restart the VM |
on_crash_behaviour
Values: | destroy | destroy the VM state |
coredump_and_destroy | record a coredump and then destroy the VM state | |
restart | restart the VM | |
coredump_and_restart | record a coredump and then restart the VM | |
preserve | leave the crashed VM paused | |
rename_restart | rename the crashed VM and start a new copy |
domain_type
Values: | hvm | HVM; Fully Virtualised |
pv | PV: Paravirtualised | |
pv_in_pvh | PV inside a PVH container | |
pvh | PVH | |
unspecified | Not specified or unknown domain type |
vm_uefi_mode
Values: | setup | clears a VM's EFI variables related to Secure Boot and places it into Setup Mode |
user | resets a VM's EFI variables related to Secure Boot to the defaults, placing it into User Mode |
vm_secureboot_readiness
Values: | not_supported | VM's firmware is not UEFI |
disabled | Secureboot is disabled on this VM | |
first_boot | Secured boot is enabled on this VM and its NVRAM.EFI-variables are empty | |
ready | Secured boot is enabled on this VM and PK, KEK, db and dbx are defined in its EFI variables | |
ready_no_dbx | Secured boot is enabled on this VM and PK, KEK, db but not dbx are defined in its EFI variables | |
setup_mode | Secured boot is enabled on this VM and PK is not defined in its EFI variables | |
certs_incomplete | Secured boot is enabled on this VM and the certificates defined in its EFI variables are incomplete |
vm_operations
Values: | snapshot | refers to the operation "snapshot" |
clone | refers to the operation "clone" | |
copy | refers to the operation "copy" | |
create_template | refers to the operation "create_template" | |
revert | refers to the operation "revert" | |
checkpoint | refers to the operation "checkpoint" | |
snapshot_with_quiesce | refers to the operation "snapshot_with_quiesce" | |
provision | refers to the operation "provision" | |
start | refers to the operation "start" | |
start_on | refers to the operation "start_on" | |
pause | refers to the operation "pause" | |
unpause | refers to the operation "unpause" | |
clean_shutdown | refers to the operation "clean_shutdown" | |
clean_reboot | refers to the operation "clean_reboot" | |
hard_shutdown | refers to the operation "hard_shutdown" | |
power_state_reset | refers to the operation "power_state_reset" | |
hard_reboot | refers to the operation "hard_reboot" | |
suspend | refers to the operation "suspend" | |
csvm | refers to the operation "csvm" | |
resume | refers to the operation "resume" | |
resume_on | refers to the operation "resume_on" | |
pool_migrate | refers to the operation "pool_migrate" | |
migrate_send | refers to the operation "migrate_send" | |
get_boot_record | refers to the operation "get_boot_record" | |
send_sysrq | refers to the operation "send_sysrq" | |
send_trigger | refers to the operation "send_trigger" | |
query_services | refers to the operation "query_services" | |
shutdown | refers to the operation "shutdown" | |
call_plugin | refers to the operation "call_plugin" | |
changing_memory_live | Changing the memory settings | |
awaiting_memory_live | Waiting for the memory settings to change | |
changing_dynamic_range | Changing the memory dynamic range | |
changing_static_range | Changing the memory static range | |
changing_memory_limits | Changing the memory limits | |
changing_shadow_memory | Changing the shadow memory for a halted VM. | |
changing_shadow_memory_live | Changing the shadow memory for a running VM. | |
changing_VCPUs | Changing VCPU settings for a halted VM. | |
changing_VCPUs_live | Changing VCPU settings for a running VM. | |
changing_NVRAM | Changing NVRAM for a halted VM. | |
assert_operation_valid | ||
data_source_op | Add, remove, query or list data sources | |
update_allowed_operations | ||
make_into_template | Turning this VM into a template | |
import | importing a VM from a network stream | |
export | exporting a VM to a network stream | |
metadata_export | exporting VM metadata to a network stream | |
reverting | Reverting the VM to a previous snapshotted state | |
destroy | refers to the act of uninstalling the VM | |
create_vtpm | Creating and adding a VTPM to this VM |
Fields
(string → string) map
HVM_boot_params
[RW]
HVM boot params
Published in: | XenServer 4.0 (rio) | HVM boot params |
Deprecated
string
HVM_boot_policy
[RO/constructor]
HVM boot policy
Published in: | XenServer 4.0 (rio) | |
Deprecated in: | XenServer 7.5 (kolkata) | Replaced by VM.domain_type |
float
HVM_shadow_multiplier
[RO/constructor]
multiplier applied to the amount of shadow that will be made available to the guest
Default value: | 1. | |
Published in: | XenServer 4.1 (miami) | multiplier applied to the amount of shadow that will be made available to the guest |
(string → string) map
NVRAM
[RO/constructor]
initial value for guest NVRAM (containing UEFI variables, etc). Cannot be changed while the VM is running
Default value: | {} | |
Published in: | Citrix Hypervisor 8.0 (naples) |
Deprecated
string
PCI_bus
[RW]
PCI bus path for pass-through devices
Published in: | XenServer 4.0 (rio) | PCI bus path for pass-through devices |
Deprecated in: | XenServer 6.0 (boston) | Field was never used |
string
PV_args
[RW]
kernel command-line arguments
Published in: | XenServer 4.0 (rio) | kernel command-line arguments |
string
PV_bootloader
[RW]
name of or path to bootloader
Published in: | XenServer 4.0 (rio) | name of or path to bootloader |
string
PV_bootloader_args
[RW]
miscellaneous arguments for the bootloader
Published in: | XenServer 4.0 (rio) | miscellaneous arguments for the bootloader |
string
PV_kernel
[RW]
path to the kernel
Published in: | XenServer 4.0 (rio) | path to the kernel |
string
PV_legacy_args
[RW]
to make Zurich guests boot
Published in: | XenServer 4.0 (rio) | to make Zurich guests boot |
string
PV_ramdisk
[RW]
path to the initrd
Published in: | XenServer 4.0 (rio) | path to the initrd |
VBD ref set
VBDs
[RO/runtime]
virtual block devices
Published in: | XenServer 4.0 (rio) | virtual block devices |
int
VCPUs_at_startup
[RO/constructor]
Boot number of VCPUs
Published in: | XenServer 4.0 (rio) | Boot number of VCPUs |
int
VCPUs_max
[RO/constructor]
Max number of VCPUs
Published in: | XenServer 4.0 (rio) | Max number of VCPUs |
(string → string) map
VCPUs_params
[RW]
configuration parameters for the selected VCPU policy
Published in: | XenServer 4.0 (rio) | configuration parameters for the selected VCPU policy |
VGPU ref set
VGPUs
[RO/runtime]
Virtual GPUs
Published in: | XenServer 6.0 (boston) |
VIF ref set
VIFs
[RO/runtime]
virtual network interfaces
Published in: | XenServer 4.0 (rio) | virtual network interfaces |
VTPM ref set
VTPMs
[RO/runtime]
virtual TPMs
Published in: | XenServer 4.0 (rio) | virtual TPMs |
VUSB ref set
VUSBs
[RO/runtime]
virtual usb devices
Published in: | XenServer 4.0 (rio) | virtual usb devices |
enum on_crash_behaviour
actions_after_crash
[RO/constructor]
action to take if the guest crashes
Published in: | XenServer 4.0 (rio) | action to take if the guest crashes |
enum on_normal_exit
actions_after_reboot
[RW]
action to take after the guest has rebooted itself
Published in: | XenServer 4.0 (rio) | action to take after the guest has rebooted itself |
enum on_normal_exit
actions_after_shutdown
[RW]
action to take after the guest has shutdown itself
Published in: | XenServer 4.0 (rio) | action to take after the guest has shutdown itself |
Prototype
enum on_softreboot_behavior
actions_after_softreboot
[RW]
action to take after soft reboot
Default value: | soft_reboot | |
Prototyped in: | XAPI 23.1.0 (23.1.0) |
host ref
affinity
[RW]
A host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Resource constraints may cause the VM to be started elsewhere.
Published in: | XenServer 4.0 (rio) | A host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Resource constraints may cause the VM to be started elsewhere. |
enum vm_operations set
allowed_operations
[RO/runtime]
list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
Default value: | {} | |
Published in: | XenServer 4.0 (rio) | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
VM_appliance ref
appliance
[RO/constructor]
the appliance to which this VM belongs
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 4.0 (rio) | the appliance to which this VM belongs |
PCI ref set
attached_PCIs
[RO/runtime]
Currently passed-through PCI devices
Published in: | XenServer 6.0 (boston) |
(string → string) map
bios_strings
[RO/runtime]
BIOS strings
Default value: | {} | |
Published in: | XenServer 5.6 (midnight-ride) | BIOS strings |
(string → blob ref) map
blobs
[RO/runtime]
Binary blobs associated with this VM
Default value: | {} | |
Published in: | XenServer 5.0 (orlando) | Binary blobs associated with this VM |
(enum vm_operations → string) map
blocked_operations
[RO/constructor]
List of operations which have been explicitly blocked and an error code
Default value: | {} | |
Published in: | XenServer 5.0 (orlando) | List of operations which have been explicitly blocked and an error code |
VM ref set
children
[RO/runtime]
List pointing to all the children of this VM
Published in: | XenServer 5.6 (midnight-ride) | List pointing to all the children of this VM |
console ref set
consoles
[RO/runtime]
virtual console devices
Published in: | XenServer 4.0 (rio) | virtual console devices |
crashdump ref set
crash_dumps
[RO/runtime]
crash dumps associated with this VM
Published in: | XenServer 4.0 (rio) | crash dumps associated with this VM |
(string → enum vm_operations) map
current_operations
[RO/runtime]
links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
Default value: | {} | |
Published in: | XenServer 4.0 (rio) | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
enum domain_type
domain_type
[RO/constructor]
The type of domain that will be created when the VM is started
Default value: | unspecified | |
Prototyped in: | XenServer 7.4 (jura) | Internal-only field; not yet in the public API |
Published in: | XenServer 7.5 (kolkata) | The field is now valid |
string
domarch
[RO/runtime]
Domain architecture (if available, null string otherwise)
Published in: | XenServer 4.0 (rio) | Domain architecture (if available, null string otherwise) |
int
domid
[RO/runtime]
domain ID (if available, -1 otherwise)
Published in: | XenServer 4.0 (rio) | domain ID (if available, -1 otherwise) |
string
generation_id
[RO/constructor]
Generation ID of the VM
Default value: | "0:0" | |
Published in: | XenServer 6.2 (clearwater) | Generation ID of the VM |
Prototype
VM_group ref set
groups
[RO/runtime]
VM groups associated with the VM
Prototyped in: | XAPI 24.19.1 (24.19.1) |
VM_guest_metrics ref
guest_metrics
[RO/runtime]
metrics associated with the running guest
Published in: | XenServer 4.0 (rio) | metrics associated with the running guest |
Deprecated
bool
ha_always_run
[RO/constructor]
if true then the system will attempt to keep the VM running as much as possible.
Default value: | false | |
Published in: | XenServer 5.0 (orlando) | if true then the system will attempt to keep the VM running as much as possible. |
Deprecated in: | XenServer 6.0 (boston) |
string
ha_restart_priority
[RO/constructor]
has possible values: "best-effort" meaning "try to restart this VM if possible but don't consider the Pool to be overcommitted if this is not possible"; "restart" meaning "this VM should be restarted"; "" meaning "do not try to restart this VM"
Default value: | "" | |
Published in: | XenServer 5.0 (orlando) | has possible values: "best-effort" meaning "try to restart this VM if possible but don't consider the Pool to be overcommitted if this is not possible"; "restart" meaning "this VM should be restarted"; "" meaning "do not try to restart this VM" |
int
hardware_platform_version
[RW]
The host virtual hardware platform version the VM can run on
Default value: | 0 | |
Published in: | XenServer 6.5 SP1 (cream) | The host virtual hardware platform version the VM can run on |
bool
has_vendor_device
[RO/constructor]
When an HVM guest starts, this controls the presence of the emulated C000 PCI device which triggers Windows Update to fetch or update PV drivers.
Default value: | true | |
Published in: | XenServer 7.0 (dundee) | |
Changed in: | XAPI 24.14.0 (24.14.0) | New default and not consulting Pool.policy_no_vendor_device |
bool
is_a_snapshot
[RO/runtime]
true if this is a snapshot. Snapshotted VMs can never be started, they are used only for cloning other VMs
Default value: | false | |
Published in: | XenServer 5.0 (orlando) | true if this is a snapshot. Snapshotted VMs can never be started, they are used only for cloning other VMs |
bool
is_a_template
[RW]
true if this is a template. Template VMs can never be started, they are used only for cloning other VMs
Published in: | XenServer 4.0 (rio) | true if this is a template. Template VMs can never be started, they are used only for cloning other VMs |
bool
is_control_domain
[RO/runtime]
true if this is a control domain (domain 0 or a driver domain)
Published in: | XenServer 4.0 (rio) | true if this is a control domain (domain 0 or a driver domain) |
bool
is_default_template
[RO/runtime]
true if this is a default template. Default template VMs can never be started or migrated, they are used only for cloning other VMs
Default value: | false | |
Published in: | XenServer 7.2 (falcon) | Identifies default templates |
Removed
bool
is_snapshot_from_vmpp
[RO/constructor]
true if this snapshot was created by the protection policy
Default value: | false | |
Published in: | XenServer 5.6 FP1 (cowley) | |
Deprecated in: | XenServer 6.2 (clearwater) | Dummy transition |
Removed in: | XenServer 6.2 (clearwater) | The VMPR feature was removed |
bool
is_vmss_snapshot
[RO/constructor]
true if this snapshot was created by the snapshot schedule
Default value: | false | |
Published in: | XenServer 7.2 (falcon) | true if this snapshot was created by the snapshot schedule |
(string → string) map
last_boot_CPU_flags
[RO/constructor]
describes the CPU flags on which the VM was last booted
Default value: | {} | |
Published in: | XenServer 4.0 (rio) | describes the CPU flags on which the VM was last booted |
string
last_booted_record
[RO/constructor]
marshalled value containing VM record at time of last boot
Default value: | "" | |
Published in: | XenServer 4.1 (miami) | Marshalled value containing VM record at time of last boot, updated dynamically to reflect the runtime state of the domain |
Changed in: | XAPI 1.257.0 (1.257.0) | Become static to allow Suspended VM creation |
int
memory_dynamic_max
[RO/constructor]
Dynamic maximum (bytes)
Published in: | XenServer 4.0 (rio) | Dynamic maximum (bytes) |
int
memory_dynamic_min
[RO/constructor]
Dynamic minimum (bytes)
Published in: | XenServer 4.0 (rio) | Dynamic minimum (bytes) |
int
memory_overhead
[RO/runtime]
The VM.memory_*
fields describe how much virtual RAM the
VM can see. Every running VM requires extra host memory to store
things like
- shadow copies of page tables, needed during migration or if hardware assisted paging is not available
- video RAM for the virtual graphics card
- records in the hypervisor describing the VM and the vCPUs
These memory “overheads” are recomputed every time the VM’s
configuration changes, and the result is stored in
VM.memory_overhead
.
For more information, read about Host memory accounting
Default value: | 0 | |
Published in: | XenServer 4.0 (rio) | Virtualization memory overhead (bytes). |
int
memory_static_max
[RO/constructor]
Statically-set (i.e. absolute) maximum (bytes). The value of this field at VM start time acts as a hard limit of the amount of memory a guest can use. New values only take effect on reboot.
Published in: | XenServer 4.0 (rio) | Statically-set (i.e. absolute) maximum (bytes). The value of this field at VM start time acts as a hard limit of the amount of memory a guest can use. New values only take effect on reboot. |
int
memory_static_min
[RO/constructor]
Statically-set (i.e. absolute) mininum (bytes). The value of this field indicates the least amount of memory this VM can boot with without crashing.
Published in: | XenServer 4.0 (rio) | Statically-set (i.e. absolute) mininum (bytes). The value of this field indicates the least amount of memory this VM can boot with without crashing. |
Deprecated
int
memory_target
[RO/constructor]
Dynamically-set memory target (bytes). The value of this field indicates the current target for memory available to this VM.
Default value: | 0 | |
Published in: | XenServer 4.0 (rio) | Dynamically-set memory target (bytes). The value of this field indicates the current target for memory available to this VM. |
Deprecated in: | XenServer 5.6 (midnight-ride) |
VM_metrics ref
metrics
[RO/runtime]
metrics associated with this VM
Published in: | XenServer 4.0 (rio) | metrics associated with this VM |
string
name_description
[RW]
a notes field containing human-readable description
Default value: | "" | |
Published in: | XenServer 4.0 (rio) |
string
name_label
[RW]
a human-readable name
Default value: | "" | |
Published in: | XenServer 4.0 (rio) |
int
order
[RO/constructor]
The point in the startup or shutdown sequence at which this VM will be started
Default value: | 0 | |
Published in: | XenServer 6.0 (boston) | The point in the startup or shutdown sequence at which this VM will be started |
(string → string) map
other_config
[RW]
additional configuration
Published in: | XenServer 4.0 (rio) | additional configuration |
VM ref
parent
[RO/runtime]
Ref pointing to the parent of this VM
Default value: | Null | |
Published in: | XenServer 5.6 (midnight-ride) | Ref pointing to the parent of this VM |
enum update_guidances set
pending_guidances
[RO/runtime]
The set of pending mandatory guidances after applying updates, which must be applied, as otherwise there may be e.g. VM failures
Default value: | {} | |
Published in: | XAPI 1.303.0 (1.303.0) | The set of pending mandatory guidances after applying updates, which must be applied, as otherwise there may be e.g. VM failures |
Prototype
enum update_guidances set
pending_guidances_full
[RO/runtime]
The set of pending full guidances after applying updates, which a user should follow to make some updates, e.g. specific hardware drivers or CPU features, fully effective, but the 'average user' doesn't need to
Default value: | {} | |
Prototyped in: | XAPI 24.10.0 (24.10.0) |
Prototype
enum update_guidances set
pending_guidances_recommended
[RO/runtime]
The set of pending recommended guidances after applying updates, which most users should follow to make the updates effective, but if not followed, will not cause a failure
Default value: | {} | |
Prototyped in: | XAPI 24.10.0 (24.10.0) |
(string → string) map
platform
[RW]
platform-specific configuration
Published in: | XenServer 4.0 (rio) | platform-specific configuration |
enum vm_power_state
power_state
[RO/constructor]
Current power state of the machine
Default value: | Halted | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | Made StaticRO to allow Suspended VM creation |
Deprecated
VMPP ref
protection_policy
[RO/constructor]
Ref pointing to a protection policy for this VM
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 5.6 FP1 (cowley) | |
Deprecated in: | XenServer 6.2 (clearwater) | The VMPR feature was removed |
string
recommendations
[RW]
An XML specification of recommended values and ranges for properties of this VM
Published in: | XenServer 4.0 (rio) | An XML specification of recommended values and ranges for properties of this VM |
string
reference_label
[RO/constructor]
Textual reference to the template used to create a VM. This can be used by clients in need of an immutable reference to the template since the latter's uuid and name_label may change, for example, after a package installation or upgrade.
Default value: | "" | |
Published in: | XenServer 7.1 (ely) | Textual reference to the template used to create a VM. This can be used by clients in need of an immutable reference to the template since the latter's uuid and name_label may change, for example, after a package installation or upgrade. |
bool
requires_reboot
[RO/runtime]
Indicates whether a VM requires a reboot in order to update its configuration, e.g. its memory allocation.
Default value: | false | |
Published in: | XenServer 7.1 (ely) |
host ref
resident_on
[RO/runtime]
the host the VM is currently resident on
Published in: | XenServer 4.0 (rio) | the host the VM is currently resident on |
host ref
scheduled_to_be_resident_on
[RO/runtime]
the host on which the VM is due to be started/resumed/migrated. This acts as a memory reservation indicator
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 4.0 (rio) | the host on which the VM is due to be started/resumed/migrated. This acts as a memory reservation indicator |
int
shutdown_delay
[RO/constructor]
The delay to wait before proceeding to the next order in the shutdown sequence (seconds)
Default value: | 0 | |
Published in: | XenServer 6.0 (boston) | The delay to wait before proceeding to the next order in the shutdown sequence (seconds) |
(string → string) map
snapshot_info
[RO/runtime]
Human-readable information concerning this snapshot
Default value: | {} | |
Published in: | XenServer 5.6 (midnight-ride) | Human-readable information concerning this snapshot |
string
snapshot_metadata
[RO/runtime]
Encoded information about the VM's metadata this is a snapshot of
Default value: | "" | |
Published in: | XenServer 5.6 (midnight-ride) | Encoded information about the VM's metadata this is a snapshot of |
VM ref
snapshot_of
[RO/runtime]
Ref pointing to the VM this snapshot is of.
Default value: | Null | |
Published in: | XenServer 5.0 (orlando) | Ref pointing to the VM this snapshot is of. |
VMSS ref
snapshot_schedule
[RO/constructor]
Ref pointing to a snapshot schedule for this VM
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 7.2 (falcon) | Ref pointing to a snapshot schedule for this VM |
datetime
snapshot_time
[RO/runtime]
Date/time when this snapshot was created.
Default value: | 19700101T00:00:00Z | |
Published in: | XenServer 5.0 (orlando) | Date/time when this snapshot was created. |
VM ref set
snapshots
[RO/runtime]
List pointing to all the VM snapshots.
Published in: | XenServer 5.0 (orlando) | List pointing to all the VM snapshots. |
int
start_delay
[RO/constructor]
The delay to wait before proceeding to the next order in the startup sequence (seconds)
Default value: | 0 | |
Published in: | XenServer 6.0 (boston) | The delay to wait before proceeding to the next order in the startup sequence (seconds) |
SR ref
suspend_SR
[RW]
The SR on which a suspend image is stored
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 6.0 (boston) | The SR on which a suspend image is stored |
VDI ref
suspend_VDI
[RO/constructor]
The VDI that a suspend image is stored on. (Only has meaning if VM is currently suspended)
Default value: | OpaqueRef:NULL | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | Become static to allow Suspended VM creation |
string set
tags
[RW]
user-specified tags for categorization purposes
Default value: | {} | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
string
transportable_snapshot_id
[RO/runtime]
Transportable ID of the snapshot VM
Default value: | "" | |
Published in: | XenServer 5.0 (orlando) | Transportable ID of the snapshot VM |
int
user_version
[RW]
Creators of VMs and templates may store version information here.
Published in: | XenServer 4.0 (rio) | Creators of VMs and templates may store version information here. |
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
int
version
[RO/constructor]
The number of times this VM has been recovered
Default value: | 0 | |
Published in: | XenServer 6.0 (boston) | The number of times this VM has been recovered |
(string → string) map
xenstore_data
[RW]
data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created.
Default value: | {} | |
Published in: | XenServer 4.1 (miami) | data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created. |
Messages
void
add_tags
(session ref, VM ref, string)
Add the given value to the tags field of the given VM. If the value is already in that Set, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to add | |
Minimum role: | vm-operator | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
void
add_to_HVM_boot_params
(session ref, VM ref, string, string)
Add the given key-value pair to the HVM/boot_params field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to add | |
string value | Value to add | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | HVM boot params |
void
add_to_NVRAM
(session ref, VM ref, string, string)
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string key | The key | |
string value | The value | |
Minimum role: | vm-admin | |
Published in: | Citrix Hypervisor 8.0 (naples) |
void
add_to_VCPUs_params
(session ref, VM ref, string, string)
Add the given key-value pair to the VCPUs/params field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to add | |
string value | Value to add | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | configuration parameters for the selected VCPU policy |
void
add_to_VCPUs_params_live
(session ref, VM ref, string, string)
Add the given key-value pair to VM.VCPUs_params, and apply that value on the running VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string key | The key | |
string value | The value | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | Add the given key-value pair to VM.VCPUs_params, and apply that value on the running VM |
void
add_to_blocked_operations
(session ref, VM ref, enum vm_operations, string)
Update list of operations which have been explicitly blocked and an error code
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
enum vm_operations key | Blocked operation | |
string value | Error code | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.0 (orlando) | Update list of operations which have been explicitly blocked and an error code |
void
add_to_other_config
(session ref, VM ref, string, string)
Add the given key-value pair to the other_config field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to add | |
string value | Value to add | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | additional configuration |
void
add_to_platform
(session ref, VM ref, string, string)
Add the given key-value pair to the platform field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to add | |
string value | Value to add | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | platform-specific configuration |
void
add_to_xenstore_data
(session ref, VM ref, string, string)
Add the given key-value pair to the xenstore_data field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to add | |
string value | Value to add | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.1 (miami) | data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created. |
void
assert_agile
(session ref, VM ref)
Returns an error if the VM is not considered agile e.g. because it is tied to a resource local to a host
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
Minimum role: | read-only | |
Published in: | XenServer 5.0 (orlando) | Returns an error if the VM is not considered agile e.g. because it is tied to a resource local to a host |
void
assert_can_be_recovered
(session ref, VM ref, session ref)
Assert whether all SRs required to recover this VM are available.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to recover | |
session ref session_to | The session to which the VM is to be recovered. | |
Minimum role: | read-only | |
Errors: | VM_IS_PART_OF_AN_APPLIANCE | This operation is not allowed as the VM is part of an appliance. |
VM_REQUIRES_SR | You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR. | |
Published in: | XenServer 6.0 (boston) | Assert whether all SRs required to recover this VM are available. |
void
assert_can_boot_here
(session ref, VM ref, host ref)
Returns an error if the VM could not boot on this host for some reason
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
host ref host | The host | |
Minimum role: | read-only | |
Errors: | HOST_NOT_ENOUGH_FREE_MEMORY | Not enough server memory is available to perform this operation. |
HOST_NOT_ENOUGH_PCPUS | The host does not have enough pCPUs to run the VM. It needs at least as many as the VM has vCPUs. | |
NETWORK_SRIOV_INSUFFICIENT_CAPACITY | There is insufficient capacity for VF reservation | |
HOST_NOT_LIVE | This operation cannot be completed as the server is not live. | |
HOST_DISABLED | The specified server is disabled. | |
HOST_CANNOT_ATTACH_NETWORK | Server cannot attach network (in the case of NIC bonding, this may be because attaching the network on this server would require other networks - that are currently active - to be taken down). | |
VM_HVM_REQUIRED | HVM is required for this operation | |
VM_REQUIRES_GPU | You attempted to run a VM on a host which doesn't have a pGPU available in the GPU group needed by the VM. The VM has a vGPU attached to this GPU group. | |
VM_REQUIRES_IOMMU | You attempted to run a VM on a host which doesn't have I/O virtualization (IOMMU/VT-d) enabled, which is needed by the VM. | |
VM_REQUIRES_NETWORK | You attempted to run a VM on a host which doesn't have a PIF on a Network needed by the VM. The VM has at least one VIF attached to the Network. | |
VM_REQUIRES_SR | You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR. | |
VM_REQUIRES_VGPU | You attempted to run a VM on a host on which the vGPU required by the VM cannot be allocated on any pGPUs in the GPU_group needed by the VM. | |
VM_HOST_INCOMPATIBLE_VERSION | This VM operation cannot be performed on an older-versioned host during an upgrade. | |
VM_HOST_INCOMPATIBLE_VIRTUAL_HARDWARE_PLATFORM_VERSION | You attempted to run a VM on a host that cannot provide the VM's required Virtual Hardware Platform version. | |
INVALID_VALUE | The value given is invalid | |
MEMORY_CONSTRAINT_VIOLATION | The dynamic memory range does not satisfy the following constraint. | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VALUE_NOT_SUPPORTED | You attempted to set a value that is not supported by this implementation. The fully-qualified field name and the value that you tried to set are returned. Also returned is a developer-only diagnostic reason. | |
VM_INCOMPATIBLE_WITH_THIS_HOST | The VM is incompatible with the CPU features of this host. | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | Citrix Hypervisor 8.1 (quebec) | Does additional compatibility checks when VM powerstate is not halted (e.g. CPUID). Use this before calling VM.resume or VM.pool_migrate. |
void
assert_can_migrate
(session ref, VM ref, (string → string) map, bool, (VDI ref → SR ref) map, (VIF ref → network ref) map, (string → string) map, (VGPU ref → GPU_group ref) map)
Assert whether a VM can be migrated to the specified destination.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
(string → string) map dest | The result of a VM.migrate_receive call. | |
bool live | Live migration | |
(VDI ref → SR ref) map vdi_map | Map of source VDI to destination SR | |
(VIF ref → network ref) map vif_map | Map of source VIF to destination network | |
(string → string) map options | Other parameters | |
(VGPU ref → GPU_group ref) map vgpu_map | Map of source vGPU to destination GPU group | |
Minimum role: | vm-power-admin | |
Errors: | LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. |
Published in: | XenServer 6.1 (tampa) | Assert whether a VM can be migrated to the specified destination. |
void
assert_operation_valid
(session ref, VM ref, enum vm_operations)
Check to see whether this operation is acceptable in the current state of the system, raising an error if the operation is invalid for some reason
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
enum vm_operations op | proposed operation | |
Minimum role: | read-only | |
Published in: | XenServer 4.0 (rio) | Check to see whether this operation is acceptable in the current state of the system, raising an error if the operation is invalid for some reason |
string
call_plugin
(session ref, VM ref, string, string, (string → string) map)
Call an API plugin on this vm
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The vm | |
string plugin | The name of the plugin | |
string fn | The name of the function within the plugin | |
(string → string) map args | Arguments for the function | |
Minimum role: | vm-operator | |
Result: | Result from the plugin | |
Published in: | XenServer 6.5 SP1 (cream) | Call an API plugin on this vm |
VM ref
checkpoint
(session ref, VM ref, string)
Checkpoints the specified VM, making a new VM. Checkpoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to be checkpointed | |
string new_name | The name of the checkpointed VM | |
Minimum role: | vm-power-admin | |
Result: | The reference of the newly created VM. | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_CHECKPOINT_SUSPEND_FAILED | An error occured while saving the memory image of the specified virtual machine | |
VM_CHECKPOINT_RESUME_FAILED | An error occured while restoring the memory image of the specified virtual machine | |
Published in: | XenServer 5.6 (midnight-ride) | Checkpoints the specified VM, making a new VM. Checkpoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well. |
void
clean_reboot
(session ref, VM ref)
Attempt to cleanly shutdown the specified VM (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to shutdown | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Attempt to cleanly shutdown the specified VM (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state. |
void
clean_shutdown
(session ref, VM ref)
Attempt to cleanly shutdown the specified VM. (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to shutdown | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Attempt to cleanly shutdown the specified VM. (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state. |
VM ref
clone
(session ref, VM ref, string)
Clones the specified VM, making a new VM. Clone automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write). This function can only be called when the VM is in the Halted State.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to be cloned | |
string new_name | The name of the cloned VM | |
Minimum role: | vm-admin | |
Result: | The reference of the newly created VM. | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. | |
Published in: | XenServer 4.0 (rio) | Clones the specified VM, making a new VM. Clone automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write). This function can only be called when the VM is in the Halted State. |
int
compute_memory_overhead
(session ref, VM ref)
Computes the virtualization memory overhead of a VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM for which to compute the memory overhead | |
Minimum role: | read-only | |
Result: | the virtualization memory overhead of the VM. | |
Published in: | XenServer 5.6 (midnight-ride) | Computes the virtualization memory overhead of a VM. |
VM ref
copy
(session ref, VM ref, string, SR ref)
Copied the specified VM, making a new VM. Unlike clone, copy does not exploits the capabilities of the underlying storage repository in which the VM's disk images are stored. Instead, copy guarantees that the disk images of the newly created VM will be 'full disks' - i.e. not part of a CoW chain. This function can only be called when the VM is in the Halted State.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to be copied | |
string new_name | The name of the copied VM | |
SR ref sr | An SR to copy all the VM's disks into (if an invalid reference then it uses the existing SRs) | |
Minimum role: | vm-admin | |
Result: | The reference of the newly created VM. | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. | |
Published in: | XenServer 4.0 (rio) | Copies a VM to an SR. There must be a host that can see both the source and destination SRs simultaneously |
Extended in: | XenServer 5.6 FP1 (cowley) | The copy can now be performed between any two SRs. |
void
copy_bios_strings
(session ref, VM ref, host ref)
Copy the BIOS strings from the given host to this VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to modify | |
host ref host | The host to copy the BIOS strings from | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Copy the BIOS strings from the given host to this VM |
VM ref
create
(session ref, VM record)
NOT RECOMMENDED! VM.clone or VM.copy (or VM.import) is a better choice in almost all situations. The standard way to obtain a new VM is to call VM.clone on a template VM, then call VM.provision on the new clone. Caution: if VM.create is used and then the new VM is attached to a virtual disc that has an operating system already installed, then there is no guarantee that the operating system will boot and run. Any software that calls VM.create on a future version of this API may fail or give unexpected results. For example this could happen if an additional parameter were added to VM.create. VM.create is intended only for use in the automatic creation of the system VM templates. It creates a new VM instance, and returns its handle.
The constructor args are: name_label, name_description, power_state, user_version*, is_a_template*, suspend_VDI, affinity*, memory_target, memory_static_max*, memory_dynamic_max*, memory_dynamic_min*, memory_static_min*, VCPUs_params*, VCPUs_max*, VCPUs_at_startup*, actions_after_softreboot, actions_after_shutdown*, actions_after_reboot*, actions_after_crash*, PV_bootloader*, PV_kernel*, PV_ramdisk*, PV_args*, PV_bootloader_args*, PV_legacy_args*, HVM_boot_policy*, HVM_boot_params*, HVM_shadow_multiplier, platform*, PCI_bus*, other_config*, last_boot_CPU_flags, last_booted_record, recommendations*, xenstore_data, ha_always_run, ha_restart_priority, tags, blocked_operations, protection_policy, is_snapshot_from_vmpp, snapshot_schedule, is_vmss_snapshot, appliance, start_delay, shutdown_delay, order, suspend_SR, version, generation_id, hardware_platform_version, has_vendor_device, reference_label, domain_type, NVRAM (* = non-optional).
Parameters: | session ref session_id | Reference to a valid session |
VM record args | All constructor arguments | |
Minimum role: | vm-admin | |
Result: | reference to the newly created object | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
blob ref
create_new_blob
(session ref, VM ref, string, string, bool)
Create a placeholder for a named binary blob of data that is associated with this VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
string name | The name associated with the blob | |
string mime_type | The mime type for the data. Empty string translates to application/octet-stream | |
bool public | True if the blob should be publicly available | |
Minimum role: | vm-power-admin | |
Result: | The reference of the blob, needed for populating its data | |
Published in: | XenServer 5.0 (orlando) | Create a placeholder for a named binary blob of data that is associated with this VM |
void
destroy
(session ref, VM ref)
Destroy the specified VM. The VM is completely removed from the system. This function can only be called when the VM is in the Halted State.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
void
forget_data_source_archives
(session ref, VM ref, string)
Forget the recorded statistics related to the specified data source
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string data_source | The data source whose archives are to be forgotten | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.0 (orlando) | Forget the recorded statistics related to the specified data source |
(string → string) map
get_HVM_boot_params
(session ref, VM ref)
Get the HVM/boot_params field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | HVM boot params |
Deprecated
string
get_HVM_boot_policy
(session ref, VM ref)
Get the HVM/boot_policy field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | |
Deprecated in: | XenServer 7.5 (kolkata) | Replaced by VM.domain_type |
float
get_HVM_shadow_multiplier
(session ref, VM ref)
Get the HVM/shadow_multiplier field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.1 (miami) | multiplier applied to the amount of shadow that will be made available to the guest |
(string → string) map
get_NVRAM
(session ref, VM ref)
Get the NVRAM field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | Citrix Hypervisor 8.0 (naples) |
Deprecated
string
get_PCI_bus
(session ref, VM ref)
Get the PCI_bus field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | PCI bus path for pass-through devices |
Deprecated in: | XenServer 6.0 (boston) | Field was never used |
string
get_PV_args
(session ref, VM ref)
Get the PV/args field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | kernel command-line arguments |
string
get_PV_bootloader
(session ref, VM ref)
Get the PV/bootloader field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | name of or path to bootloader |
string
get_PV_bootloader_args
(session ref, VM ref)
Get the PV/bootloader_args field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | miscellaneous arguments for the bootloader |
string
get_PV_kernel
(session ref, VM ref)
Get the PV/kernel field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | path to the kernel |
string
get_PV_legacy_args
(session ref, VM ref)
Get the PV/legacy_args field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | to make Zurich guests boot |
string
get_PV_ramdisk
(session ref, VM ref)
Get the PV/ramdisk field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | path to the initrd |
SR ref set
get_SRs_required_for_recovery
(session ref, VM ref, session ref)
List all the SR's that are required for the VM to be recovered
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM for which the SRs have to be recovered | |
session ref session_to | The session to which the SRs of the VM have to be recovered. | |
Minimum role: | read-only | |
Result: | refs for SRs required to recover the VM | |
Published in: | XenServer 6.5 (creedence) | List all the SR's that are required for the VM to be recovered |
VBD ref set
get_VBDs
(session ref, VM ref)
Get the VBDs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | virtual block devices |
int
get_VCPUs_at_startup
(session ref, VM ref)
Get the VCPUs/at_startup field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Boot number of VCPUs |
int
get_VCPUs_max
(session ref, VM ref)
Get the VCPUs/max field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Max number of VCPUs |
(string → string) map
get_VCPUs_params
(session ref, VM ref)
Get the VCPUs/params field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | configuration parameters for the selected VCPU policy |
VGPU ref set
get_VGPUs
(session ref, VM ref)
Get the VGPUs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) |
VIF ref set
get_VIFs
(session ref, VM ref)
Get the VIFs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | virtual network interfaces |
VTPM ref set
get_VTPMs
(session ref, VM ref)
Get the VTPMs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | virtual TPMs |
VUSB ref set
get_VUSBs
(session ref, VM ref)
Get the VUSBs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | virtual usb devices |
enum on_crash_behaviour
get_actions_after_crash
(session ref, VM ref)
Get the actions/after_crash field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | action to take if the guest crashes |
enum on_normal_exit
get_actions_after_reboot
(session ref, VM ref)
Get the actions/after_reboot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | action to take after the guest has rebooted itself |
enum on_normal_exit
get_actions_after_shutdown
(session ref, VM ref)
Get the actions/after_shutdown field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | action to take after the guest has shutdown itself |
Prototype
enum on_softreboot_behavior
get_actions_after_softreboot
(session ref, VM ref)
Get the actions/after_softreboot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Prototyped in: | XAPI 23.1.0 (23.1.0) |
host ref
get_affinity
(session ref, VM ref)
Get the affinity field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | A host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Resource constraints may cause the VM to be started elsewhere. |
VM ref set
get_all
(session ref)
Return a list of all the VMs known to the system.
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only | |
Result: | references to all objects | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
(VM ref → VM record) map
get_all_records
(session ref)
Return a map of VM references to VM records for all VMs known to the system.
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only | |
Result: | records of all objects | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
string set
get_allowed_VBD_devices
(session ref, VM ref)
Returns a list of the allowed values that a VBD device field can take
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to query | |
Minimum role: | read-only | |
Result: | The allowed values | |
Published in: | XenServer 4.0 (rio) | Returns a list of the allowed values that a VBD device field can take |
string set
get_allowed_VIF_devices
(session ref, VM ref)
Returns a list of the allowed values that a VIF device field can take
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to query | |
Minimum role: | read-only | |
Result: | The allowed values | |
Published in: | XenServer 4.0 (rio) | Returns a list of the allowed values that a VIF device field can take |
enum vm_operations set
get_allowed_operations
(session ref, VM ref)
Get the allowed_operations field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
VM_appliance ref
get_appliance
(session ref, VM ref)
Get the appliance field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | the appliance to which this VM belongs |
PCI ref set
get_attached_PCIs
(session ref, VM ref)
Get the attached_PCIs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) |
(string → string) map
get_bios_strings
(session ref, VM ref)
Get the bios_strings field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 (midnight-ride) | BIOS strings |
(string → blob ref) map
get_blobs
(session ref, VM ref)
Get the blobs field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | Binary blobs associated with this VM |
(enum vm_operations → string) map
get_blocked_operations
(session ref, VM ref)
Get the blocked_operations field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | List of operations which have been explicitly blocked and an error code |
Deprecated
VM record
get_boot_record
(session ref, VM ref)
Returns a record describing the VM's dynamic state, initialised when the VM boots and updated to reflect runtime configuration changes e.g. CPU hotplug
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM whose boot-time state to return | |
Minimum role: | read-only | |
Result: | A record describing the VM | |
Published in: | XenServer 4.0 (rio) | |
Deprecated in: | XenServer 7.3 (inverness) | Use the current VM record/fields instead |
VM ref set
get_by_name_label
(session ref, string)
Get all the VM instances with the given label.
Parameters: | session ref session_id | Reference to a valid session |
string label | label of object to return | |
Minimum role: | read-only | |
Result: | references to objects with matching names | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
VM ref
get_by_uuid
(session ref, string)
Get a reference to the VM instance with the specified UUID.
Parameters: | session ref session_id | Reference to a valid session |
string uuid | UUID of object to return | |
Minimum role: | read-only | |
Result: | reference to the object | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
VM ref set
get_children
(session ref, VM ref)
Get the children field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 (midnight-ride) | List pointing to all the children of this VM |
console ref set
get_consoles
(session ref, VM ref)
Get the consoles field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | virtual console devices |
Deprecated
bool
get_cooperative
(session ref, VM ref)
Return true if the VM is currently 'co-operative' i.e. is expected to reach a balloon target and actually has done
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
Minimum role: | read-only | |
Result: | true if the VM is currently 'co-operative'; false otherwise | |
Published in: | XenServer 5.6 (midnight-ride) | Return true if the VM is currently 'co-operative' i.e. is expected to reach a balloon target and actually has done |
Deprecated in: | XenServer 6.1 (tampa) |
crashdump ref set
get_crash_dumps
(session ref, VM ref)
Get the crash_dumps field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | crash dumps associated with this VM |
(string → enum vm_operations) map
get_current_operations
(session ref, VM ref)
Get the current_operations field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
data_source record set
get_data_sources
(session ref, VM ref)
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to interrogate | |
Minimum role: | read-only | |
Result: | A set of data sources | |
Published in: | XenServer 5.0 (orlando) |
enum domain_type
get_domain_type
(session ref, VM ref)
Get the domain_type field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Prototyped in: | XenServer 7.4 (jura) | Internal-only field; not yet in the public API |
Published in: | XenServer 7.5 (kolkata) | The field is now valid |
string
get_domarch
(session ref, VM ref)
Get the domarch field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Domain architecture (if available, null string otherwise) |
int
get_domid
(session ref, VM ref)
Get the domid field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | domain ID (if available, -1 otherwise) |
string
get_generation_id
(session ref, VM ref)
Get the generation_id field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.2 (clearwater) | Generation ID of the VM |
Prototype
VM_group ref set
get_groups
(session ref, VM ref)
Get the groups field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Prototyped in: | XAPI 24.19.1 (24.19.1) |
VM_guest_metrics ref
get_guest_metrics
(session ref, VM ref)
Get the guest_metrics field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | metrics associated with the running guest |
Deprecated
bool
get_ha_always_run
(session ref, VM ref)
Get the ha_always_run field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | if true then the system will attempt to keep the VM running as much as possible. |
Deprecated in: | XenServer 6.0 (boston) |
string
get_ha_restart_priority
(session ref, VM ref)
Get the ha_restart_priority field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | has possible values: "best-effort" meaning "try to restart this VM if possible but don't consider the Pool to be overcommitted if this is not possible"; "restart" meaning "this VM should be restarted"; "" meaning "do not try to restart this VM" |
int
get_hardware_platform_version
(session ref, VM ref)
Get the hardware_platform_version field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.5 SP1 (cream) | The host virtual hardware platform version the VM can run on |
bool
get_has_vendor_device
(session ref, VM ref)
Get the has_vendor_device field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.0 (dundee) | |
Changed in: | XAPI 24.14.0 (24.14.0) | New default and not consulting Pool.policy_no_vendor_device |
bool
get_is_a_snapshot
(session ref, VM ref)
Get the is_a_snapshot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | true if this is a snapshot. Snapshotted VMs can never be started, they are used only for cloning other VMs |
bool
get_is_a_template
(session ref, VM ref)
Get the is_a_template field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | true if this is a template. Template VMs can never be started, they are used only for cloning other VMs |
bool
get_is_control_domain
(session ref, VM ref)
Get the is_control_domain field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | true if this is a control domain (domain 0 or a driver domain) |
bool
get_is_default_template
(session ref, VM ref)
Get the is_default_template field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.2 (falcon) | Identifies default templates |
Removed
bool
get_is_snapshot_from_vmpp
(session ref, VM ref)
Get the is_snapshot_from_vmpp field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 FP1 (cowley) | |
Deprecated in: | XenServer 6.2 (clearwater) | Dummy transition |
Removed in: | XenServer 6.2 (clearwater) | The VMPR feature was removed |
bool
get_is_vmss_snapshot
(session ref, VM ref)
Get the is_vmss_snapshot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.2 (falcon) | true if this snapshot was created by the snapshot schedule |
(string → string) map
get_last_boot_CPU_flags
(session ref, VM ref)
Get the last_boot_CPU_flags field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | describes the CPU flags on which the VM was last booted |
string
get_last_booted_record
(session ref, VM ref)
Get the last_booted_record field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.1 (miami) | Marshalled value containing VM record at time of last boot, updated dynamically to reflect the runtime state of the domain |
Changed in: | XAPI 1.257.0 (1.257.0) | Become static to allow Suspended VM creation |
int
get_memory_dynamic_max
(session ref, VM ref)
Get the memory/dynamic_max field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Dynamic maximum (bytes) |
int
get_memory_dynamic_min
(session ref, VM ref)
Get the memory/dynamic_min field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Dynamic minimum (bytes) |
int
get_memory_overhead
(session ref, VM ref)
Get the memory/overhead field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Virtualization memory overhead (bytes). |
int
get_memory_static_max
(session ref, VM ref)
Get the memory/static_max field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Statically-set (i.e. absolute) maximum (bytes). The value of this field at VM start time acts as a hard limit of the amount of memory a guest can use. New values only take effect on reboot. |
int
get_memory_static_min
(session ref, VM ref)
Get the memory/static_min field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Statically-set (i.e. absolute) mininum (bytes). The value of this field indicates the least amount of memory this VM can boot with without crashing. |
Deprecated
int
get_memory_target
(session ref, VM ref)
Get the memory/target field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Dynamically-set memory target (bytes). The value of this field indicates the current target for memory available to this VM. |
Deprecated in: | XenServer 5.6 (midnight-ride) |
VM_metrics ref
get_metrics
(session ref, VM ref)
Get the metrics field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | metrics associated with this VM |
string
get_name_description
(session ref, VM ref)
Get the name/description field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) |
string
get_name_label
(session ref, VM ref)
Get the name/label field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) |
int
get_order
(session ref, VM ref)
Get the order field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) | The point in the startup or shutdown sequence at which this VM will be started |
(string → string) map
get_other_config
(session ref, VM ref)
Get the other_config field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | additional configuration |
VM ref
get_parent
(session ref, VM ref)
Get the parent field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 (midnight-ride) | Ref pointing to the parent of this VM |
enum update_guidances set
get_pending_guidances
(session ref, VM ref)
Get the pending_guidances field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XAPI 1.303.0 (1.303.0) | The set of pending mandatory guidances after applying updates, which must be applied, as otherwise there may be e.g. VM failures |
Prototype
enum update_guidances set
get_pending_guidances_full
(session ref, VM ref)
Get the pending_guidances_full field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Prototyped in: | XAPI 24.10.0 (24.10.0) |
Prototype
enum update_guidances set
get_pending_guidances_recommended
(session ref, VM ref)
Get the pending_guidances_recommended field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Prototyped in: | XAPI 24.10.0 (24.10.0) |
(string → string) map
get_platform
(session ref, VM ref)
Get the platform field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | platform-specific configuration |
host ref set
get_possible_hosts
(session ref, VM ref)
Return the list of hosts on which this VM may run.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
Minimum role: | read-only | |
Result: | The possible hosts | |
Published in: | XenServer 4.0 (rio) | Return the list of hosts on which this VM may run. |
enum vm_power_state
get_power_state
(session ref, VM ref)
Get the power_state field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | Made StaticRO to allow Suspended VM creation |
Deprecated
VMPP ref
get_protection_policy
(session ref, VM ref)
Get the protection_policy field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 FP1 (cowley) | |
Deprecated in: | XenServer 6.2 (clearwater) | The VMPR feature was removed |
string
get_recommendations
(session ref, VM ref)
Get the recommendations field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | An XML specification of recommended values and ranges for properties of this VM |
VM record
get_record
(session ref, VM ref)
Get a record containing the current state of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | all fields from the object | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | possibility to create a VM in suspended mode with a suspend_VDI set |
string
get_reference_label
(session ref, VM ref)
Get the reference_label field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.1 (ely) | Textual reference to the template used to create a VM. This can be used by clients in need of an immutable reference to the template since the latter's uuid and name_label may change, for example, after a package installation or upgrade. |
bool
get_requires_reboot
(session ref, VM ref)
Get the requires_reboot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.1 (ely) |
host ref
get_resident_on
(session ref, VM ref)
Get the resident_on field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | the host the VM is currently resident on |
host ref
get_scheduled_to_be_resident_on
(session ref, VM ref)
Get the scheduled_to_be_resident_on field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | the host on which the VM is due to be started/resumed/migrated. This acts as a memory reservation indicator |
Prototype
enum vm_secureboot_readiness
get_secureboot_readiness
(session ref, VM ref)
Return the secureboot readiness of the VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
Minimum role: | pool-admin | |
Result: | The secureboot readiness of the VM | |
Prototyped in: | XAPI 24.17.0 (24.17.0) |
int
get_shutdown_delay
(session ref, VM ref)
Get the shutdown_delay field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) | The delay to wait before proceeding to the next order in the shutdown sequence (seconds) |
(string → string) map
get_snapshot_info
(session ref, VM ref)
Get the snapshot_info field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 (midnight-ride) | Human-readable information concerning this snapshot |
string
get_snapshot_metadata
(session ref, VM ref)
Get the snapshot_metadata field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.6 (midnight-ride) | Encoded information about the VM's metadata this is a snapshot of |
VM ref
get_snapshot_of
(session ref, VM ref)
Get the snapshot_of field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | Ref pointing to the VM this snapshot is of. |
VMSS ref
get_snapshot_schedule
(session ref, VM ref)
Get the snapshot_schedule field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 7.2 (falcon) | Ref pointing to a snapshot schedule for this VM |
datetime
get_snapshot_time
(session ref, VM ref)
Get the snapshot_time field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | Date/time when this snapshot was created. |
VM ref set
get_snapshots
(session ref, VM ref)
Get the snapshots field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | List pointing to all the VM snapshots. |
int
get_start_delay
(session ref, VM ref)
Get the start_delay field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) | The delay to wait before proceeding to the next order in the startup sequence (seconds) |
SR ref
get_suspend_SR
(session ref, VM ref)
Get the suspend_SR field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) | The SR on which a suspend image is stored |
VDI ref
get_suspend_VDI
(session ref, VM ref)
Get the suspend_VDI field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | |
Changed in: | XAPI 1.257.0 (1.257.0) | Become static to allow Suspended VM creation |
string set
get_tags
(session ref, VM ref)
Get the tags field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
string
get_transportable_snapshot_id
(session ref, VM ref)
Get the transportable_snapshot_id field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 5.0 (orlando) | Transportable ID of the snapshot VM |
int
get_user_version
(session ref, VM ref)
Get the user_version field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Creators of VMs and templates may store version information here. |
string
get_uuid
(session ref, VM ref)
Get the uuid field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
int
get_version
(session ref, VM ref)
Get the version field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 6.0 (boston) | The number of times this VM has been recovered |
(string → string) map
get_xenstore_data
(session ref, VM ref)
Get the xenstore_data field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.1 (miami) | data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created. |
void
hard_reboot
(session ref, VM ref)
Stop executing the specified VM without attempting a clean shutdown and immediately restart the VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to reboot | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Stop executing the specified VM without attempting a clean shutdown and immediately restart the VM. |
void
hard_shutdown
(session ref, VM ref)
Stop executing the specified VM without attempting a clean shutdown.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to destroy | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Stop executing the specified VM without attempting a clean shutdown. |
VM ref set
import
(session ref, string, SR ref, bool, bool)
Import an XVA from a URI
Parameters: | session ref session_id | Reference to a valid session |
string url | The URL of the XVA file | |
SR ref sr | The destination SR for the disks | |
bool full_restore | Perform a full restore | |
bool force | Force the import | |
Minimum role: | pool-operator | |
Result: | Imported VM reference | |
Published in: | XenServer 7.0 (dundee) | Import an XVA from a URI |
void
import_convert
(session ref, string, string, string, SR ref, (string → string) map)
Import using a conversion service.
Parameters: | session ref session_id | Reference to a valid session |
string type | Type of the conversion | |
string username | Admin username on the host | |
string password | Password on the host | |
SR ref sr | The destination SR | |
(string → string) map remote_config | Remote configuration options | |
Minimum role: | vm-admin | |
Published in: | XenServer 6.1 (tampa) | Import using a conversion service. |
int
maximise_memory
(session ref, VM ref, int, bool)
Returns the maximum amount of guest memory which will fit, together with overheads, in the supplied amount of physical memory. If 'exact' is true then an exact calculation is performed using the VM's current settings. If 'exact' is false then a more conservative approximation is used
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int total | Total amount of physical RAM to fit within | |
bool approximate | If false the limit is calculated with the guest's current exact configuration. Otherwise a more approximate calculation is performed | |
Minimum role: | read-only | |
Result: | The maximum possible static-max | |
Published in: | XenServer 4.1 (miami) | Returns the maximum amount of guest memory which will fit, together with overheads, in the supplied amount of physical memory. If 'exact' is true then an exact calculation is performed using the VM's current settings. If 'exact' is false then a more conservative approximation is used |
VM ref
migrate_send
(session ref, VM ref, (string → string) map, bool, (VDI ref → SR ref) map, (VIF ref → network ref) map, (string → string) map, (VGPU ref → GPU_group ref) map)
Migrate the VM to another host. This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
(string → string) map dest | The result of a Host.migrate_receive call. | |
bool live | Live migration | |
(VDI ref → SR ref) map vdi_map | Map of source VDI to destination SR | |
(VIF ref → network ref) map vif_map | Map of source VIF to destination network | |
(string → string) map options | Other parameters | |
(VGPU ref → GPU_group ref) map vgpu_map | Map of source vGPU to destination GPU group | |
Minimum role: | vm-power-admin | |
Result: | The reference of the newly created VM in the destination pool | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. | |
Published in: | XenServer 6.1 (tampa) | Migrate the VM to another host. This can only be called when the specified VM is in the Running state. |
void
pause
(session ref, VM ref)
Pause the specified VM. This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to pause | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Pause the specified VM. This can only be called when the specified VM is in the Running state. |
void
pool_migrate
(session ref, VM ref, host ref, (string → string) map)
Migrate a VM to another Host.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to migrate | |
host ref host | The target host | |
(string → string) map options | Extra configuration operations: force, live, copy, compress. Each is a boolean option, taking 'true' or 'false' as a value. Option 'compress' controls the use of stream compression during migration. | |
Minimum role: | client-cert | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. | |
Published in: | XenServer 4.0 (rio) | Migrate a VM to another Host. |
void
power_state_reset
(session ref, VM ref)
Reset the power-state of the VM to halted in the database only. (Used to recover from slave failures in pooling scenarios by resetting the power-states of VMs running on dead slaves to halted.) This is a potentially dangerous operation; use with care.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to reset | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) | Reset the power-state of the VM to halted in the database only. (Used to recover from slave failures in pooling scenarios by resetting the power-states of VMs running on dead slaves to halted.) This is a potentially dangerous operation; use with care. |
void
provision
(session ref, VM ref)
Inspects the disk configuration contained within the VM's other_config, creates VDIs and VBDs and then executes any applicable post-install script.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to be provisioned | |
Minimum role: | vm-admin | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. | |
Published in: | XenServer 4.0 (rio) | Inspects the disk configuration contained within the VM's other_config, creates VDIs and VBDs and then executes any applicable post-install script. |
float
query_data_source
(session ref, VM ref, string)
Query the latest value of the specified data source
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string data_source | The data source to query | |
Minimum role: | read-only | |
Result: | The latest value, averaged over the last 5 seconds | |
Published in: | XenServer 5.0 (orlando) | Query the latest value of the specified data source |
(string → string) map
query_services
(session ref, VM ref)
Query the system services advertised by this VM and register them. This can only be applied to a system domain.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
Minimum role: | pool-admin | |
Result: | map of service type to name | |
Published in: | XenServer 6.1 (tampa) | Query the system services advertised by this VM and register them. This can only be applied to a system domain. |
void
record_data_source
(session ref, VM ref, string)
Start recording the specified data source
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string data_source | The data source to record | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.0 (orlando) | Start recording the specified data source |
void
recover
(session ref, VM ref, session ref, bool)
Recover the VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to recover | |
session ref session_to | The session to which the VM is to be recovered. | |
bool force | Whether the VM should replace newer versions of itself. | |
Minimum role: | read-only | |
Published in: | XenServer 6.0 (boston) | Recover the VM |
void
remove_from_HVM_boot_params
(session ref, VM ref, string)
Remove the given key and its corresponding value from the HVM/boot_params field of the given VM. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | HVM boot params |
void
remove_from_NVRAM
(session ref, VM ref, string)
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string key | The key | |
Minimum role: | vm-admin | |
Published in: | Citrix Hypervisor 8.0 (naples) |
void
remove_from_VCPUs_params
(session ref, VM ref, string)
Remove the given key and its corresponding value from the VCPUs/params field of the given VM. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | configuration parameters for the selected VCPU policy |
void
remove_from_blocked_operations
(session ref, VM ref, enum vm_operations)
Update list of operations which have been explicitly blocked and an error code
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
enum vm_operations key | Blocked operation | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.0 (orlando) | Update list of operations which have been explicitly blocked and an error code |
void
remove_from_other_config
(session ref, VM ref, string)
Remove the given key and its corresponding value from the other_config field of the given VM. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | additional configuration |
void
remove_from_platform
(session ref, VM ref, string)
Remove the given key and its corresponding value from the platform field of the given VM. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | platform-specific configuration |
void
remove_from_xenstore_data
(session ref, VM ref, string)
Remove the given key and its corresponding value from the xenstore_data field of the given VM. If the key is not in that Map, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string key | Key to remove | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.1 (miami) | data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created. |
void
remove_tags
(session ref, VM ref, string)
Remove the given value from the tags field of the given VM. If the value is not in that Set, then do nothing.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | Value to remove | |
Minimum role: | vm-operator | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
Prototype
void
restart_device_models
(session ref, VM ref)
Restart device models of the VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
Minimum role: | client-cert | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. | |
Prototyped in: | XAPI 23.30.0 (23.30.0) |
void
resume
(session ref, VM ref, bool, bool)
Awaken the specified VM and resume it. This can only be called when the specified VM is in the Suspended state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to resume | |
bool start_paused | Resume VM in paused state if set to true. | |
bool force | Attempt to force the VM to resume. If this flag is false then the VM may fail pre-resume safety checks (e.g. if the CPU the VM was running on looks substantially different to the current one) | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Awaken the specified VM and resume it. This can only be called when the specified VM is in the Suspended state. |
void
resume_on
(session ref, VM ref, host ref, bool, bool)
Awaken the specified VM and resume it on a particular Host. This can only be called when the specified VM is in the Suspended state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to resume | |
host ref host | The Host on which to resume the VM | |
bool start_paused | Resume VM in paused state if set to true. | |
bool force | Attempt to force the VM to resume. If this flag is false then the VM may fail pre-resume safety checks (e.g. if the CPU the VM was running on looks substantially different to the current one) | |
Minimum role: | client-cert | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Awaken the specified VM and resume it on a particular Host. This can only be called when the specified VM is in the Suspended state. |
(host ref → string set) map
retrieve_wlb_recommendations
(session ref, VM ref)
Returns mapping of hosts to ratings, indicating the suitability of starting the VM at that location according to wlb. Rating is replaced with an error if the VM cannot boot there.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
Minimum role: | read-only | |
Result: | The potential hosts and their corresponding recommendations or errors | |
Published in: | XenServer 5.5 (george) | Returns mapping of hosts to ratings, indicating the suitability of starting the VM at that location according to wlb. Rating is replaced with an error if the VM cannot boot there. |
void
revert
(session ref, VM ref)
Reverts the specified VM to a previous state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref snapshot | The snapshotted state that we revert to | |
Minimum role: | vm-power-admin | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
VM_REVERT_FAILED | An error occured while reverting the specified virtual machine to the specified snapshot | |
Published in: | XenServer 5.6 (midnight-ride) | Reverts the specified VM to a previous state. |
void
send_sysrq
(session ref, VM ref, string)
Send the given key as a sysrq to this VM. The key is specified as a single character (a String of length 1). This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
string key | The key to send | |
Minimum role: | pool-admin | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
Published in: | XenServer 4.0 (rio) | Send the given key as a sysrq to this VM. The key is specified as a single character (a String of length 1). This can only be called when the specified VM is in the Running state. |
void
send_trigger
(session ref, VM ref, string)
Send the named trigger to this VM. This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM | |
string trigger | The trigger to send | |
Minimum role: | pool-admin | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
Published in: | XenServer 4.0 (rio) | Send the named trigger to this VM. This can only be called when the specified VM is in the Running state. |
void
set_HVM_boot_params
(session ref, VM ref, (string → string) map)
Set the HVM/boot_params field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | HVM boot params |
Deprecated
void
set_HVM_boot_policy
(session ref, VM ref, string)
Set the VM.HVM_boot_policy field of the given VM, which will take effect when it is next started
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string value | The new HVM boot policy | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | |
Deprecated in: | XenServer 7.5 (kolkata) | Replaced by VM.set_domain_type |
void
set_HVM_shadow_multiplier
(session ref, VM ref, float)
Set the shadow memory multiplier on a halted VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
float value | The new shadow memory multiplier to set | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the shadow memory multiplier on a halted VM |
void
set_NVRAM
(session ref, VM ref, (string → string) map)
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
(string → string) map value | The value | |
Minimum role: | vm-admin | |
Published in: | Citrix Hypervisor 8.0 (naples) |
Deprecated
void
set_PCI_bus
(session ref, VM ref, string)
Set the PCI_bus field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | PCI bus path for pass-through devices |
Deprecated in: | XenServer 6.0 (boston) | Field was never used |
void
set_PV_args
(session ref, VM ref, string)
Set the PV/args field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | kernel command-line arguments |
void
set_PV_bootloader
(session ref, VM ref, string)
Set the PV/bootloader field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | name of or path to bootloader |
void
set_PV_bootloader_args
(session ref, VM ref, string)
Set the PV/bootloader_args field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | miscellaneous arguments for the bootloader |
void
set_PV_kernel
(session ref, VM ref, string)
Set the PV/kernel field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | path to the kernel |
void
set_PV_legacy_args
(session ref, VM ref, string)
Set the PV/legacy_args field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | to make Zurich guests boot |
void
set_PV_ramdisk
(session ref, VM ref, string)
Set the PV/ramdisk field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | path to the initrd |
void
set_VCPUs_at_startup
(session ref, VM ref, int)
Set the number of startup VCPUs for a halted VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int value | The new maximum number of VCPUs | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the number of startup VCPUs for a halted VM |
void
set_VCPUs_max
(session ref, VM ref, int)
Set the maximum number of VCPUs for a halted VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int value | The new maximum number of VCPUs | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the maximum number of VCPUs for a halted VM |
void
set_VCPUs_number_live
(session ref, VM ref, int)
Set the number of VCPUs for a running VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int nvcpu | The number of VCPUs | |
Minimum role: | vm-admin | |
Errors: | OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. |
LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. | |
Published in: | XenServer 4.0 (rio) | Set the number of VCPUs for a running VM |
Changed in: | XenServer 7.1 (ely) | Unless the feature is explicitly enabled for every host in the pool, this fails with Api_errors.license_restriction. |
void
set_VCPUs_params
(session ref, VM ref, (string → string) map)
Set the VCPUs/params field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | configuration parameters for the selected VCPU policy |
void
set_actions_after_crash
(session ref, VM ref, enum on_crash_behaviour)
Sets the actions_after_crash parameter
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to set | |
enum on_crash_behaviour value | The new value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | Sets the actions_after_crash parameter |
void
set_actions_after_reboot
(session ref, VM ref, enum on_normal_exit)
Set the actions/after_reboot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
enum on_normal_exit value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | action to take after the guest has rebooted itself |
void
set_actions_after_shutdown
(session ref, VM ref, enum on_normal_exit)
Set the actions/after_shutdown field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
enum on_normal_exit value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | action to take after the guest has shutdown itself |
Prototype
void
set_actions_after_softreboot
(session ref, VM ref, enum on_softreboot_behavior)
Set the actions/after_softreboot field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
enum on_softreboot_behavior value | New value to set | |
Minimum role: | vm-admin | |
Prototyped in: | XAPI 23.1.0 (23.1.0) |
void
set_affinity
(session ref, VM ref, host ref)
Set the affinity field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
host ref value | New value to set | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 4.0 (rio) | A host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Resource constraints may cause the VM to be started elsewhere. |
void
set_appliance
(session ref, VM ref, VM_appliance ref)
Assign this VM to an appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to assign to an appliance. | |
VM_appliance ref value | The appliance to which this VM should be assigned. | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | Assign this VM to an appliance. |
void
set_bios_strings
(session ref, VM ref, (string → string) map)
Set custom BIOS strings to this VM. VM will be given a default set of BIOS strings, only some of which can be overridden by the supplied values. Allowed keys are: 'bios-vendor', 'bios-version', 'system-manufacturer', 'system-product-name', 'system-version', 'system-serial-number', 'enclosure-asset-tag', 'baseboard-manufacturer', 'baseboard-product-name', 'baseboard-version', 'baseboard-serial-number', 'baseboard-asset-tag', 'baseboard-location-in-chassis', 'enclosure-asset-tag'
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to modify | |
(string → string) map value | The custom BIOS strings as a list of key-value pairs | |
Minimum role: | vm-admin | |
Errors: | VM_BIOS_STRINGS_ALREADY_SET | The BIOS strings for this VM have already been set and cannot be changed. |
INVALID_VALUE | The value given is invalid | |
Published in: | XenServer 7.3 (inverness) | Set custom BIOS strings to this VM. VM will be given a default set of BIOS strings, only some of which can be overridden by the supplied values. Allowed keys are: 'bios-vendor', 'bios-version', 'system-manufacturer', 'system-product-name', 'system-version', 'system-serial-number', 'enclosure-asset-tag', 'baseboard-manufacturer', 'baseboard-product-name', 'baseboard-version', 'baseboard-serial-number', 'baseboard-asset-tag', 'baseboard-location-in-chassis', 'enclosure-asset-tag' |
void
set_blocked_operations
(session ref, VM ref, (enum vm_operations → string) map)
Update list of operations which have been explicitly blocked and an error code
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
(enum vm_operations → string) map value | Blocked operations | |
Minimum role: | vm-admin | |
Published in: | XenServer 5.0 (orlando) | Update list of operations which have been explicitly blocked and an error code |
void
set_domain_type
(session ref, VM ref, enum domain_type)
Set the VM.domain_type field of the given VM, which will take effect when it is next started
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
enum domain_type value | The new domain type | |
Minimum role: | vm-admin | |
Published in: | XenServer 7.5 (kolkata) |
Prototype
void
set_groups
(session ref, VM ref, VM_group ref set)
Associate this VM with VM groups.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
VM_group ref set value | The VM groups to set | |
Minimum role: | vm-admin | |
Errors: | OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. |
Prototyped in: | XAPI 24.19.1 (24.19.1) |
Deprecated
void
set_ha_always_run
(session ref, VM ref, bool)
Set the value of the ha_always_run
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
bool value | The value | |
Minimum role: | pool-operator | |
Published in: | XenServer 5.0 (orlando) | Set the value of the ha_always_run |
Deprecated in: | XenServer 6.0 (boston) |
void
set_ha_restart_priority
(session ref, VM ref, string)
Set the value of the ha_restart_priority field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
string value | The value | |
Minimum role: | pool-operator | |
Published in: | XenServer 5.0 (orlando) | Set the value of the ha_restart_priority field |
void
set_hardware_platform_version
(session ref, VM ref, int)
Set the hardware_platform_version field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
int value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 6.5 SP1 (cream) | The host virtual hardware platform version the VM can run on |
void
set_has_vendor_device
(session ref, VM ref, bool)
Controls whether, when the VM starts in HVM mode, its virtual hardware will include the emulated PCI device for which drivers may be available through Windows Update. Usually this should never be changed on a VM on which Windows has been installed: changing it on such a VM is likely to lead to a crash on next start.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM on which to set this flag | |
bool value | True to provide the vendor PCI device. | |
Minimum role: | vm-admin | |
Published in: | XenServer 7.0 (dundee) | Controls whether, when the VM starts in HVM mode, its virtual hardware will include the emulated PCI device for which drivers may be available through Windows Update. Usually this should never be changed on a VM on which Windows has been installed: changing it on such a VM is likely to lead to a crash on next start. |
void
set_is_a_template
(session ref, VM ref, bool)
Set the is_a_template field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
bool value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | true if this is a template. Template VMs can never be started, they are used only for cloning other VMs |
void
set_memory
(session ref, VM ref, int)
Set the memory allocation of this VM. Sets all of memory_static_max, memory_dynamic_min, and memory_dynamic_max to the given value, and leaves memory_static_min untouched.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int value | The new memory allocation (bytes). | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 7.1 (ely) | Set the memory allocation of this VM. Sets all of memory_static_max, memory_dynamic_min, and memory_dynamic_max to the given value, and leaves memory_static_min untouched. |
void
set_memory_dynamic_max
(session ref, VM ref, int)
Set the value of the memory_dynamic_max field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to modify | |
int value | The new value of memory_dynamic_max | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the value of the memory_dynamic_max field |
void
set_memory_dynamic_min
(session ref, VM ref, int)
Set the value of the memory_dynamic_min field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to modify | |
int value | The new value of memory_dynamic_min | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the value of the memory_dynamic_min field |
void
set_memory_dynamic_range
(session ref, VM ref, int, int)
Set the minimum and maximum amounts of physical memory the VM is allowed to use.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int min | The new minimum value | |
int max | The new maximum value | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the minimum and maximum amounts of physical memory the VM is allowed to use. |
void
set_memory_limits
(session ref, VM ref, int, int, int, int)
Set the memory limits of this VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int static_min | The new value of memory_static_min. | |
int static_max | The new value of memory_static_max. | |
int dynamic_min | The new value of memory_dynamic_min. | |
int dynamic_max | The new value of memory_dynamic_max. | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the memory limits of this VM. |
void
set_memory_static_max
(session ref, VM ref, int)
Set the value of the memory_static_max field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to modify | |
int value | The new value of memory_static_max | |
Minimum role: | vm-power-admin | |
Errors: | HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN | This operation cannot be performed because it would invalidate VM failover planning such that the system would be unable to guarantee to restart protected VMs after a Host failure. |
Published in: | XenServer 5.0 (orlando) | Set the value of the memory_static_max field |
void
set_memory_static_min
(session ref, VM ref, int)
Set the value of the memory_static_min field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM to modify | |
int value | The new value of memory_static_min | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the value of the memory_static_min field |
void
set_memory_static_range
(session ref, VM ref, int, int)
Set the static (ie boot-time) range of virtual memory that the VM is allowed to use.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int min | The new minimum value | |
int max | The new maximum value | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 5.6 (midnight-ride) | Set the static (ie boot-time) range of virtual memory that the VM is allowed to use. |
Deprecated
void
set_memory_target_live
(session ref, VM ref, int)
Set the memory target for a running VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int target | The target in bytes | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 4.0 (rio) | Set the memory target for a running VM |
Deprecated in: | XenServer 5.6 (midnight-ride) |
void
set_name_description
(session ref, VM ref, string)
Set the name/description field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) |
void
set_name_label
(session ref, VM ref, string)
Set the name/label field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) |
void
set_order
(session ref, VM ref, int)
Set this VM's boot order
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int value | This VM's boot order | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | Set this VM's boot order |
void
set_other_config
(session ref, VM ref, (string → string) map)
Set the other_config field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | additional configuration |
void
set_platform
(session ref, VM ref, (string → string) map)
Set the platform field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | platform-specific configuration |
Removed
void
set_protection_policy
(session ref, VM ref, VMPP ref)
Set the value of the protection_policy field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
VMPP ref value | The value | |
Minimum role: | pool-operator | |
Published in: | XenServer 5.6 FP1 (cowley) | |
Deprecated in: | XenServer 6.2 (clearwater) | Dummy transition |
Removed in: | XenServer 6.2 (clearwater) | The VMPR feature was removed |
void
set_recommendations
(session ref, VM ref, string)
Set the recommendations field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | An XML specification of recommended values and ranges for properties of this VM |
void
set_shadow_multiplier_live
(session ref, VM ref, float)
Set the shadow memory multiplier on a running VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
float multiplier | The new shadow memory multiplier to set | |
Minimum role: | vm-power-admin | |
Published in: | XenServer 4.0 (rio) | Set the shadow memory multiplier on a running VM |
void
set_shutdown_delay
(session ref, VM ref, int)
Set this VM's shutdown delay in seconds
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int value | This VM's shutdown delay in seconds | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | Set this VM's shutdown delay in seconds |
void
set_snapshot_schedule
(session ref, VM ref, VMSS ref)
Set the value of the snapshot schedule field
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
VMSS ref value | The value | |
Minimum role: | pool-operator | |
Published in: | XenServer 7.2 (falcon) | Set the value of the snapshot schedule field |
void
set_start_delay
(session ref, VM ref, int)
Set this VM's start delay in seconds
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
int value | This VM's start delay in seconds | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | Set this VM's start delay in seconds |
void
set_suspend_SR
(session ref, VM ref, SR ref)
Set the suspend_SR field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
SR ref value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 6.0 (boston) | The SR on which a suspend image is stored |
void
set_suspend_VDI
(session ref, VM ref, VDI ref)
Set this VM's suspend VDI, which must be indentical to its current one
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
VDI ref value | The suspend VDI uuid | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | Set this VM's suspend VDI, which must be indentical to its current one |
void
set_tags
(session ref, VM ref, string set)
Set the tags field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
string set value | New value to set | |
Minimum role: | vm-operator | |
Published in: | XenServer 5.0 (orlando) | user-specified tags for categorization purposes |
Prototype
string
set_uefi_mode
(session ref, VM ref, enum vm_uefi_mode)
Set the UEFI mode of a VM
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
enum vm_uefi_mode mode | The UEFI mode to set | |
Minimum role: | pool-admin | |
Result: | Result from the varstore-sb-state call | |
Prototyped in: | XAPI 24.17.0 (24.17.0) |
void
set_user_version
(session ref, VM ref, int)
Set the user_version field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
int value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.0 (rio) | Creators of VMs and templates may store version information here. |
void
set_xenstore_data
(session ref, VM ref, (string → string) map)
Set the xenstore_data field of the given VM.
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
(string → string) map value | New value to set | |
Minimum role: | vm-admin | |
Published in: | XenServer 4.1 (miami) | data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created. |
void
shutdown
(session ref, VM ref)
Attempts to first clean shutdown a VM and if it should fail then perform a hard shutdown on it.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to shutdown | |
Minimum role: | client-cert | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 6.2 (clearwater) | Attempts to first clean shutdown a VM and if it should fail then perform a hard shutdown on it. |
VM ref
snapshot
(session ref, VM ref, string, VDI ref set)
Snapshots the specified VM, making a new VM. Snapshot automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write).
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to be snapshotted | |
string new_name | The name of the snapshotted VM | |
VDI ref set ignore_vdis | A list of VDIs to ignore for the snapshot | |
Minimum role: | vm-power-admin | |
Result: | The reference of the newly created VM. | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
Published in: | XenServer 5.0 (orlando) | Snapshots the specified VM, making a new VM. Snapshot automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write). |
Removed
VM ref
snapshot_with_quiesce
(session ref, VM ref, string)
Snapshots the specified VM with quiesce, making a new VM. Snapshot automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write).
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to be snapshotted | |
string new_name | The name of the snapshotted VM | |
Minimum role: | vm-power-admin | |
Result: | The reference of the newly created VM. | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
SR_FULL | The SR is full. Requested new size exceeds the maximum size | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_SNAPSHOT_WITH_QUIESCE_FAILED | The quiesced-snapshot operation failed for an unexpected reason | |
VM_SNAPSHOT_WITH_QUIESCE_TIMEOUT | The VSS plug-in has timed out | |
VM_SNAPSHOT_WITH_QUIESCE_PLUGIN_DEOS_NOT_RESPOND | The VSS plug-in cannot be contacted | |
VM_SNAPSHOT_WITH_QUIESCE_NOT_SUPPORTED | The VSS plug-in is not installed on this virtual machine | |
Published in: | XenServer 5.0 (orlando) | |
Deprecated in: | Citrix Hypervisor 8.1 (quebec) | Dummy transition |
Removed in: | Citrix Hypervisor 8.1 (quebec) | VSS support has been removed |
void
start
(session ref, VM ref, bool, bool)
Start the specified VM. This function can only be called with the VM is in the Halted State.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to start | |
bool start_paused | Instantiate VM in paused state if set to true. | |
bool force | Attempt to force the VM to start. If this flag is false then the VM may fail pre-boot safety checks (e.g. if the CPU the VM last booted on looks substantially different to the current one) | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
VM_HVM_REQUIRED | HVM is required for this operation | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
BOOTLOADER_FAILED | The bootloader returned an error | |
UNKNOWN_BOOTLOADER | The requested bootloader is unknown | |
NO_HOSTS_AVAILABLE | There were no servers available to complete the specified operation. | |
LICENCE_RESTRICTION | This operation is not allowed because your license lacks a needed feature. Please contact your support representative. | |
Published in: | XenServer 4.0 (rio) | Start the specified VM. This function can only be called with the VM is in the Halted State. |
void
start_on
(session ref, VM ref, host ref, bool, bool)
Start the specified VM on a particular host. This function can only be called with the VM is in the Halted State.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to start | |
host ref host | The Host on which to start the VM | |
bool start_paused | Instantiate VM in paused state if set to true. | |
bool force | Attempt to force the VM to start. If this flag is false then the VM may fail pre-boot safety checks (e.g. if the CPU the VM last booted on looks substantially different to the current one) | |
Minimum role: | client-cert | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
BOOTLOADER_FAILED | The bootloader returned an error | |
UNKNOWN_BOOTLOADER | The requested bootloader is unknown | |
Published in: | XenServer 4.0 (rio) | Start the specified VM on a particular host. This function can only be called with the VM is in the Halted State. |
void
suspend
(session ref, VM ref)
Suspend the specified VM to disk. This can only be called when the specified VM is in the Running state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to suspend | |
Minimum role: | client-cert | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OTHER_OPERATION_IN_PROGRESS | Another operation involving the object is currently in progress | |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Suspend the specified VM to disk. This can only be called when the specified VM is in the Running state. |
void
unpause
(session ref, VM ref)
Resume the specified VM. This can only be called when the specified VM is in the Paused state.
Parameters: | session ref session_id | Reference to a valid session |
VM ref vm | The VM to unpause | |
Minimum role: | vm-operator | |
Errors: | VM_BAD_POWER_STATE | You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. |
OPERATION_NOT_ALLOWED | You attempted an operation that was not allowed. | |
VM_IS_TEMPLATE | The operation attempted is not valid for a template VM | |
Published in: | XenServer 4.0 (rio) | Resume the specified VM. This can only be called when the specified VM is in the Paused state. |
void
update_allowed_operations
(session ref, VM ref)
Recomputes the list of acceptable operations
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | reference to the object | |
Minimum role: | pool-admin | |
Published in: | XenServer 4.0 (rio) | Recomputes the list of acceptable operations |
Deprecated
void
wait_memory_target_live
(session ref, VM ref)
Wait for a running VM to reach its current memory target
Parameters: | session ref session_id | Reference to a valid session |
VM ref self | The VM | |
Minimum role: | read-only | |
Published in: | XenServer 5.0 (orlando) | Wait for a running VM to reach its current memory target |
Deprecated in: | XenServer 5.6 (midnight-ride) |