Develop for XenServer

Class: VM_metrics

The metrics associated with a VM

Fields for class: VM_metrics

Field Type Qualifier Description
current_domain_type domain_type RO/runtime The current domain type of the VM (for running,suspended, or paused VMs). The last-known domain type for halted VMs.
hvm bool RO/runtime hardware virtual machine
install_time datetime RO/runtime Time at which the VM was installed
last_updated datetime RO/runtime Time at which this information was last updated
memory_actual int RO/runtime Guest’s actual memory (bytes)
nested_virt bool RO/runtime VM supports nested virtualisation
nomigrate bool RO/runtime VM is immobile and can’t migrate between hosts
other_config (string -> string) map RW additional configuration
start_time datetime RO/runtime Time at which this VM was last booted
state string set RO/runtime The state of the guest, eg blocked, dying etc
uuid string RO/runtime Unique identifier/object reference
VCPUs_CPU (int -> int) map RO/runtime VCPU to PCPU map
VCPUs_flags (int -> string set) map RO/runtime CPU flags (blocked,online,running)
VCPUs_number int RO/runtime Current number of VCPUs
VCPUs_params (string -> string) map RO/runtime The live equivalent to VM.VCPUs_params
VCPUs_utilisation (int -> float) map RO/runtime Removed. Utilisation for all of guest’s current VCPUs

RPCs associated with class: VM_metrics

RPC name: add_to_other_config

Overview:

Add the given key-value pair to the other_config field of the given VM_metrics.

Signature:

void add_to_other_config (session ref session_ref, VM_metrics ref self, string key, string value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object
string key Key to add
string value Value to add

Minimum Role: vm-admin

Return Type: void

RPC name: get_all

Overview:

Return a list of all the VM_metrics instances known to the system.

Signature:

VM_metrics ref set get_all (session ref session_ref)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session

Minimum Role: read-only

Return Type: VM_metrics ref set

references to all objects

RPC name: get_all_records

Overview:

Return a map of VM_metrics references to VM_metrics records for all VM_metrics instances known to the system.

Signature:

(VM_metrics ref -> VM_metrics record) map get_all_records (session ref session_ref)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session

Minimum Role: read-only

Return Type: (VM_metrics ref -> VM_metrics record) map

records of all objects

RPC name: get_by_uuid

Overview:

Get a reference to the VM_metrics instance with the specified UUID.

Signature:

VM_metrics ref get_by_uuid (session ref session_ref, string uuid)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
string uuid UUID of object to return

Minimum Role: read-only

Return Type: VM_metrics ref

reference to the object

RPC name: get_current_domain_type

Overview:

Get the current_domain_type field of the given VM_metrics.

Signature:

domain_type get_current_domain_type (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: domain_type

value of the field

RPC name: get_hvm

Overview:

Get the hvm field of the given VM_metrics.

Signature:

bool get_hvm (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_install_time

Overview:

Get the install_time field of the given VM_metrics.

Signature:

datetime get_install_time (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: datetime

value of the field

RPC name: get_last_updated

Overview:

Get the last_updated field of the given VM_metrics.

Signature:

datetime get_last_updated (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: datetime

value of the field

RPC name: get_memory_actual

Overview:

Get the memory/actual field of the given VM_metrics.

Signature:

int get_memory_actual (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: int

value of the field

RPC name: get_nested_virt

Overview:

Get the nested_virt field of the given VM_metrics.

Signature:

bool get_nested_virt (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_nomigrate

Overview:

Get the nomigrate field of the given VM_metrics.

Signature:

bool get_nomigrate (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_other_config

Overview:

Get the other_config field of the given VM_metrics.

Signature:

(string -> string) map get_other_config (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: (string -> string) map

value of the field

RPC name: get_record

Overview:

Get a record containing the current state of the given VM_metrics.

Signature:

VM_metrics record get_record (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: VM_metrics record

all fields from the object

RPC name: get_start_time

Overview:

Get the start_time field of the given VM_metrics.

Signature:

datetime get_start_time (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: datetime

value of the field

RPC name: get_state

Overview:

Get the state field of the given VM_metrics.

Signature:

string set get_state (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: string set

value of the field

RPC name: get_uuid

Overview:

Get the uuid field of the given VM_metrics.

Signature:

string get_uuid (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_VCPUs_CPU

Overview:

Get the VCPUs/CPU field of the given VM_metrics.

Signature:

(int -> int) map get_VCPUs_CPU (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: (int -> int) map

value of the field

RPC name: get_VCPUs_flags

Overview:

Get the VCPUs/flags field of the given VM_metrics.

Signature:

(int -> string set) map get_VCPUs_flags (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: (int -> string set) map

value of the field

RPC name: get_VCPUs_number

Overview:

Get the VCPUs/number field of the given VM_metrics.

Signature:

int get_VCPUs_number (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: int

value of the field

RPC name: get_VCPUs_params

Overview:

Get the VCPUs/params field of the given VM_metrics.

Signature:

(string -> string) map get_VCPUs_params (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: (string -> string) map

value of the field

RPC name: get_VCPUs_utilisation

This message is removed.

Overview:

Get the VCPUs/utilisation field of the given VM_metrics.

Signature:

(int -> float) map get_VCPUs_utilisation (session ref session_ref, VM_metrics ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object

Minimum Role: read-only

Return Type: (int -> float) map

value of the field

RPC name: remove_from_other_config

Overview:

Remove the given key and its corresponding value from the other_config field of the given VM_metrics. If the key is not in that Map, then do nothing.

Signature:

void remove_from_other_config (session ref session_ref, VM_metrics ref self, string key)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object
string key Key to remove

Minimum Role: vm-admin

Return Type: void

RPC name: set_other_config

Overview:

Set the other_config field of the given VM_metrics.

Signature:

void set_other_config (session ref session_ref, VM_metrics ref self, (string -> string) map value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
VM_metrics ref self reference to the object
(string -> string) map value New value to set

Minimum Role: vm-admin

Return Type: void