Class: VM_appliance
VM appliance
Published in: | XenServer 6.0 (boston) | VM appliance |
Enums
vm_appliance_operation
Values: | start | Start |
clean_shutdown | Clean shutdown | |
hard_shutdown | Hard shutdown | |
shutdown | Shutdown |
Fields
VM ref set
VMs
[RO/runtime]
all VMs in this appliance
Published in: | XenServer 4.0 (rio) | all VMs in this appliance |
enum vm_appliance_operation 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. |
(string → enum vm_appliance_operation) 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. |
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) |
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
Messages
void
assert_can_be_recovered
(session ref, VM_appliance ref, session ref)
Assert whether all SRs required to recover this VM appliance are available.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance to recover | |
session ref session_to | The session to which the VM appliance is to be recovered. | |
Minimum role: | read-only | |
Errors: | 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 appliance are available. |
void
clean_shutdown
(session ref, VM_appliance ref)
Perform a clean shutdown of all the VMs in the appliance
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance | |
Minimum role: | pool-operator | |
Errors: | OPERATION_PARTIALLY_FAILED | Some VMs belonging to the appliance threw an exception while carrying out the specified operation |
Published in: | XenServer 6.0 (boston) | Perform a clean shutdown of all the VMs in the appliance |
VM_appliance ref
create
(session ref, VM_appliance record)
Create a new VM_appliance instance, and return its handle.
The constructor args are: name_label, name_description (* = non-optional).
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance record args | All constructor arguments | |
Minimum role: | pool-operator | |
Result: | reference to the newly created object | |
Published in: | XenServer 6.0 (boston) | VM appliance |
void
destroy
(session ref, VM_appliance ref)
Destroy the specified VM_appliance instance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | reference to the object | |
Minimum role: | pool-operator | |
Published in: | XenServer 6.0 (boston) | VM appliance |
SR ref set
get_SRs_required_for_recovery
(session ref, VM_appliance ref, session ref)
Get the list of SRs required by the VM appliance to recover.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance for which the required list of SRs has to be recovered. | |
session ref session_to | The session to which the list of SRs have to be recovered . | |
Minimum role: | read-only | |
Result: | refs for SRs required to recover the VM | |
Published in: | XenServer 6.5 (creedence) | Get the list of SRs required by the VM appliance to recover. |
VM ref set
get_VMs
(session ref, VM_appliance ref)
Get the VMs field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) | all VMs in this appliance |
VM_appliance ref set
get_all
(session ref)
Return a list of all the VM_appliances 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 6.0 (boston) | VM appliance |
(VM_appliance ref → VM_appliance record) map
get_all_records
(session ref)
Return a map of VM_appliance references to VM_appliance records for all VM_appliances 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 6.0 (boston) | VM appliance |
enum vm_appliance_operation set
get_allowed_operations
(session ref, VM_appliance ref)
Get the allowed_operations field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance 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 set
get_by_name_label
(session ref, string)
Get all the VM_appliance 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 6.0 (boston) | VM appliance |
VM_appliance ref
get_by_uuid
(session ref, string)
Get a reference to the VM_appliance 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 6.0 (boston) | VM appliance |
(string → enum vm_appliance_operation) map
get_current_operations
(session ref, VM_appliance ref)
Get the current_operations field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance 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. |
string
get_name_description
(session ref, VM_appliance ref)
Get the name/description field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance 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_appliance ref)
Get the name/label field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | reference to the object | |
Minimum role: | read-only | |
Result: | value of the field | |
Published in: | XenServer 4.0 (rio) |
VM_appliance record
get_record
(session ref, VM_appliance ref)
Get a record containing the current state of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | reference to the object | |
Minimum role: | read-only | |
Result: | all fields from the object | |
Published in: | XenServer 6.0 (boston) | VM appliance |
string
get_uuid
(session ref, VM_appliance ref)
Get the uuid field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance 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 |
void
hard_shutdown
(session ref, VM_appliance ref)
Perform a hard shutdown of all the VMs in the appliance
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance | |
Minimum role: | pool-operator | |
Errors: | OPERATION_PARTIALLY_FAILED | Some VMs belonging to the appliance threw an exception while carrying out the specified operation |
Published in: | XenServer 6.0 (boston) | Perform a hard shutdown of all the VMs in the appliance |
void
recover
(session ref, VM_appliance ref, session ref, bool)
Recover the VM appliance
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance to recover | |
session ref session_to | The session to which the VM appliance is to be recovered. | |
bool force | Whether the VMs should replace newer versions of themselves. | |
Minimum role: | read-only | |
Errors: | 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) | Recover the VM appliance |
void
set_name_description
(session ref, VM_appliance ref, string)
Set the name/description field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | reference to the object | |
string value | New value to set | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) |
void
set_name_label
(session ref, VM_appliance ref, string)
Set the name/label field of the given VM_appliance.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | reference to the object | |
string value | New value to set | |
Minimum role: | pool-operator | |
Published in: | XenServer 4.0 (rio) |
void
shutdown
(session ref, VM_appliance ref)
For each VM in the appliance, try to shut it down cleanly. If this fails, perform a hard shutdown of the VM.
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance | |
Minimum role: | pool-operator | |
Errors: | OPERATION_PARTIALLY_FAILED | Some VMs belonging to the appliance threw an exception while carrying out the specified operation |
Published in: | XenServer 6.0 (boston) | For each VM in the appliance, try to shut it down cleanly. If this fails, perform a hard shutdown of the VM. |
void
start
(session ref, VM_appliance ref, bool)
Start all VMs in the appliance
Parameters: | session ref session_id | Reference to a valid session |
VM_appliance ref self | The VM appliance | |
bool paused | Instantiate all VMs belonging to this appliance in paused state if set to true. | |
Minimum role: | pool-operator | |
Errors: | OPERATION_PARTIALLY_FAILED | Some VMs belonging to the appliance threw an exception while carrying out the specified operation |
Published in: | XenServer 6.0 (boston) | Start all VMs in the appliance |