-
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
- 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
-
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)
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)
Take a read-only snapshot of the VDI, returning a reference to the snapshot. NB the snapshot lives in the same Storage Repository as its parent.
-
VDI
clone
(session session_id, VDI vdi)
Take an exact copy of the VDI and return a reference to the new disk. NB the clone lives in the same Storage Repository as its parent.
-
void
resize
(session session_id, VDI vdi, int size)
Resize the VDI.
-
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)
Create a new VDI record in the database only
-
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
force_unlock
(session session_id, VDI vdi)
Steals the lock on this VDI and leaves it unlocked. This function is extremely dangerous
-
void
set_managed
(session session_id, VDI self, bool value)
Sets the VDI's managed field