-
string
uuid
Unique identifier/object reference
-
string
name_label
a human-readable name
-
string
name_description
a notes field containg human-readable description
-
Set[enum vdi_operations]
allowed_operations
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.
-
Map[string,enum vdi_operations]
current_operations
links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
-
SR
SR
storage repository in which the VDI resides
-
Set[VBD]
VBDs
list of vbds that refer to this disk
-
Set[crashdump]
crash_dumps
list of crash dumps that refer to this disk
-
int
virtual_size
size of disk as presented to the guest (in bytes). Note that, depending on storage backend type, requested size may not be respected exactly
-
int
physical_utilisation
amount of physical space that the disk image is currently taking up on the storage repository (in bytes)
-
enum vdi_type
type
type of the VDI
-
bool
sharable
true if this disk may be shared
-
bool
read_only
true if this disk may ONLY be mounted read-only
-
Map[string,string]
other_config
additional configuration
-
bool
storage_lock
true if this disk is locked at the storage level
-
string
location
location information
- bool managed
-
bool
missing
true if SR scan operation reported this VDI as not present on disk
-
VDI
parent
References the parent disk, if this VDI is part of a chain
-
Map[string,string]
xenstore_data
data to be inserted into the xenstore tree (/local/domain/0/backend/vbd/<domid>/<device-id>/sm-data) after the VDI is attached. This is generally set by the SM backends on vdi_attach.
-
Map[string,string]
sm_config
SM dependent data
-
bool
is_a_snapshot
true if this is a snapshot.
-
VDI
snapshot_of
Ref pointing to the VDI this snapshot is of.
-
Set[VDI]
snapshots
List pointing to all the VDIs snapshots.
-
datetime
snapshot_time
Date/time when this snapshot was created.
-
Set[string]
tags
user-specified tags for categorization purposes
-
bool
allow_caching
true if this VDI is to be cached in the local cache SR
-
enum on_boot
on_boot
The behaviour of this VDI on a VM boot
-
Record[VDI]
get_record
(session session_id, VDI self)
Get a record containing the current state of the given VDI.
-
VDI
get_by_uuid
(session session_id, string uuid)
Get a reference to the VDI instance with the specified UUID.
-
VDI
create
(session session_id, string name_label, string name_description, SR SR, int virtual_size, enum vdi_type type, bool sharable, bool read_only, Map[string,string] other_config, Map[string,string] xenstore_data, Map[string,string] sm_config, Set[string] tags)
Create a new VDI instance, and return its handle.
-
void
destroy
(session session_id, VDI self)
Destroy the specified VDI instance.
-
Set[VDI]
get_by_name_label
(session session_id, string label)
Get all the VDI instances with the given label.
-
Set[VDI]
get_all
(session session_id)
Return a list of all the VDIs known to the system.
-
Map[VDI,Record[VDI]]
get_all_records
(session session_id)
Return a map of VDI references to VDI records for all VDIs known to the system.
-
VDI
snapshot
(session session_id, VDI vdi, Map[string,string] driver_params)
Take a read-only snapshot of the VDI, returning a reference to the snapshot. If any driver_params are specified then these are passed through to the storage-specific substrate driver that takes the snapshot. NB the snapshot lives in the same Storage Repository as its parent.
-
VDI
clone
(session session_id, VDI vdi, Map[string,string] driver_params)
Take an exact copy of the VDI and return a reference to the new disk. If any driver_params are specified then these are passed through to the storage-specific substrate driver that implements the clone operation. NB the clone lives in the same Storage Repository as its parent.
-
void
resize
(session session_id, VDI vdi, int size)
Resize the VDI.
-
void
resize_online
(session session_id, VDI vdi, int size)
Resize the VDI which may or may not be attached to running guests.
-
VDI
introduce
(session session_id, string uuid, string name_label, string name_description, SR SR, enum vdi_type type, bool sharable, bool read_only, Map[string,string] other_config, string location, Map[string,string] xenstore_data, Map[string,string] sm_config)
Create a new VDI record in the database only
-
VDI
db_introduce
(session session_id, string uuid, string name_label, string name_description, SR SR, enum vdi_type type, bool sharable, bool read_only, Map[string,string] other_config, string location, Map[string,string] xenstore_data, Map[string,string] sm_config)
Create a new VDI record in the database only
-
void
db_forget
(session session_id, VDI vdi)
Removes a VDI record from the database
-
void
update
(session session_id, VDI vdi)
Ask the storage backend to refresh the fields in the VDI object
-
VDI
copy
(session session_id, VDI vdi, SR sr)
Make a fresh VDI in the specified SR and copy the supplied VDI's data to the new disk
-
void
set_managed
(session session_id, VDI self, bool value)
Sets the VDI's managed field
-
void
forget
(session session_id, VDI vdi)
Removes a VDI record from the database
-
void
set_sharable
(session session_id, VDI self, bool value)
Sets the VDI's sharable field
-
void
set_read_only
(session session_id, VDI self, bool value)
Sets the VDI's read_only field
-
void
set_missing
(session session_id, VDI self, bool value)
Sets the VDI's missing field
-
void
set_virtual_size
(session session_id, VDI self, int value)
Sets the VDI's virtual_size field
-
void
set_physical_utilisation
(session session_id, VDI self, int value)
Sets the VDI's physical_utilisation field
-
void
set_on_boot
(session session_id, VDI self, enum on_boot value)
Set the value of the on_boot parameter. This value can only be changed when the VDI is not attached to a running VM.
-
void
set_allow_caching
(session session_id, VDI self, bool value)
Set the value of the allow_caching parameter. This value can only be changed when the VDI is not attached to a running VM. The caching behaviour is only affected by this flag for VHD-based VDIs that have one parent and no child VHDs. Moreover, caching only takes place when the host running the VM containing this VDI has a nominated SR for local caching.