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 → blob ref) mapblobs[RO/runtime]
Binary blobs associated with this SR
Default value:
{}
Published in:
XenServer 5.0 (orlando)
Binary blobs associated with this SR
boolclustered[RO/runtime]
True if the SR is using aggregated local storage
Default value:
false
Published in:
XenServer 7.0 (dundee)
stringcontent_type[RO/constructor]
the type of the SR's content, if required (e.g. ISOs)
Published in:
XenServer 4.0 (rio)
the type of the SR's content, if required (e.g. ISOs)
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.
DR_task refintroduced_by[RO/runtime]
The disaster recovery task which introduced this SR
Default value:
OpaqueRef:NULL
Published in:
XenServer 6.0 (boston)
The disaster recovery task which introduced this SR
boolis_tools_sr[RO/runtime]
True if this is the SR that contains the Tools ISO VDIs
Default value:
false
Published in:
XenServer 7.0 (dundee)
boollocal_cache_enabled[RO/runtime]
True if this SR is assigned to be the local cache for its host
Default value:
false
Published in:
XenServer 5.6 FP1 (cowley)
True if this SR is assigned to be the local cache for its host
stringname_description[RO/constructor]
a notes field containing human-readable description
Default value:
""
Published in:
XenServer 4.0 (rio)
a notes field containing human-readable description
stringname_label[RO/constructor]
a human-readable name
Default value:
""
Published in:
XenServer 4.0 (rio)
a human-readable name
(string → string) mapother_config[RW]
additional configuration
Published in:
XenServer 4.0 (rio)
additional configuration
PBD ref setPBDs[RO/runtime]
describes how particular hosts can see this storage repository
Published in:
XenServer 4.0 (rio)
describes how particular hosts can see this storage repository
intphysical_size[RO/constructor]
total physical size of the repository (in bytes)
Published in:
XenServer 4.0 (rio)
total physical size of the repository (in bytes)
intphysical_utilisation[RO/runtime]
physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation
Published in:
XenServer 4.0 (rio)
physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation
boolshared[RO/runtime]
true if this SR is (capable of being) shared between multiple hosts
Published in:
XenServer 4.0 (rio)
true if this SR is (capable of being) shared between multiple hosts
(string → string) mapsm_config[RW]
SM dependent data
Default value:
{}
Published in:
XenServer 4.1 (miami)
SM dependent data
string settags[RW]
user-specified tags for categorization purposes
Default value:
{}
Published in:
XenServer 5.0 (orlando)
user-specified tags for categorization purposes
stringtype[RO/constructor]
type of the storage repository
Published in:
XenServer 4.0 (rio)
type of the storage repository
stringuuid[RO/runtime]
Unique identifier/object reference
Published in:
XenServer 4.0 (rio)
Unique identifier/object reference
VDI ref setVDIs[RO/runtime]
all virtual disks known to this storage repository
Published in:
XenServer 4.0 (rio)
all virtual disks known to this storage repository
intvirtual_allocation[RO/runtime]
sum of virtual_sizes of all VDIs in this storage repository (in bytes)
Published in:
XenServer 4.0 (rio)
sum of virtual_sizes of all VDIs in this storage repository (in bytes)
Messages
voidadd_tags(session ref, SR ref, string)
Add the given value to the tags field of the given SR. If the value is already in that Set, then do nothing.
Parameters:
session ref session_id
Reference to a valid session
SR 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
voidadd_to_other_config(session ref, SR ref, string, string)
Add the given key-value pair to the other_config field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
string key
Key to add
string value
Value to add
Minimum role:
pool-operator
Published in:
XenServer 4.0 (rio)
additional configuration
voidadd_to_sm_config(session ref, SR ref, string, string)
Add the given key-value pair to the sm_config field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
string key
Key to add
string value
Value to add
Minimum role:
pool-operator
Published in:
XenServer 4.1 (miami)
SM dependent data
voidassert_can_host_ha_statefile(session ref, SR ref)
Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to query
Minimum role:
pool-operator
Published in:
XenServer 5.0 (orlando)
Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not
voidassert_supports_database_replication(session ref, SR ref)
Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not.
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to query
Minimum role:
pool-operator
Published in:
XenServer 6.0 (boston)
Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not.
Create a new Storage Repository and introduce it into the managed system, creating both SR record and PBD record to attach it to current host (with specified device_config parameters)
Parameters:
session ref session_id
Reference to a valid session
host ref host
The host to create/make the SR on
(string → string) map device_config
The device config string that will be passed to backend SR driver
int physical_size
The physical size of the new storage repository
string name_label
The name of the new storage repository
string name_description
The description of the new storage repository
string type
The type of the SR; used to specify the SR backend driver to use
string content_type
The type of the new SRs content, if required (e.g. ISOs)
bool shared
True if the SR (is capable of) being shared by multiple hosts
(string → string) map sm_config
Storage backend specific configuration options
Minimum role:
pool-operator
Result:
The reference of the newly created Storage Repository.
Errors:
SR_UNKNOWN_DRIVER
The SR could not be connected because the driver was not recognised.
Published in:
XenServer 4.0 (rio)
Create a new Storage Repository and introduce it into the managed system, creating both SR record and PBD record to attach it to current host (with specified device_config parameters)
blob refcreate_new_blob(session ref, SR ref, string, string, bool)
Create a placeholder for a named binary blob of data that is associated with this SR
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
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:
pool-operator
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 SR
voiddestroy(session ref, SR ref)
Destroy specified SR, removing SR-record from database and remove SR from disk. (In order to affect this operation the appropriate device_config is read from the specified SR's PBD on current host)
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to destroy
Minimum role:
pool-operator
Errors:
SR_HAS_PBD
The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten.
Published in:
XenServer 4.0 (rio)
Destroy specified SR, removing SR-record from database and remove SR from disk. (In order to affect this operation the appropriate device_config is read from the specified SR's PBD on current host)
voiddisable_database_replication(session ref, SR ref)
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to which metadata should be no longer replicated
Minimum role:
pool-operator
Published in:
XenServer 6.0 (boston)
voidenable_database_replication(session ref, SR ref)
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to which metadata should be replicated
Minimum role:
pool-operator
Published in:
XenServer 6.0 (boston)
voidforget(session ref, SR ref)
Removing specified SR-record from database, without attempting to remove SR from disk
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to destroy
Minimum role:
pool-operator
Errors:
SR_HAS_PBD
The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten.
Published in:
XenServer 4.0 (rio)
Removing specified SR-record from database, without attempting to remove SR from disk
voidforget_data_source_archives(session ref, SR ref, string)
Forget the recorded statistics related to the specified data source
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
string data_source
The data source whose archives are to be forgotten
Minimum role:
pool-operator
Published in:
XenServer 7.0 (dundee)
Forget the recorded statistics related to the specified data source
SR ref setget_all(session ref)
Return a list of all the SRs 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)
A storage repository
(SR ref → SR record) mapget_all_records(session ref)
Return a map of SR references to SR records for all SRs 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)
A storage repository
enum storage_operations setget_allowed_operations(session ref, SR ref)
Get the allowed_operations field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR 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.
(string → blob ref) mapget_blobs(session ref, SR ref)
Get the blobs field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR 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 SR
SR ref setget_by_name_label(session ref, string)
Get all the SR 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)
A storage repository
SR refget_by_uuid(session ref, string)
Get a reference to the SR 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)
A storage repository
boolget_clustered(session ref, SR ref)
Get the clustered field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 7.0 (dundee)
stringget_content_type(session ref, SR ref)
Get the content_type field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
the type of the SR's content, if required (e.g. ISOs)
(string → enum storage_operations) mapget_current_operations(session ref, SR ref)
Get the current_operations field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR 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 setget_data_sources(session ref, SR ref)
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to interrogate
Minimum role:
read-only
Result:
A set of data sources
Published in:
XenServer 7.0 (dundee)
DR_task refget_introduced_by(session ref, SR ref)
Get the introduced_by field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 6.0 (boston)
The disaster recovery task which introduced this SR
boolget_is_tools_sr(session ref, SR ref)
Get the is_tools_sr field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 7.0 (dundee)
boolget_local_cache_enabled(session ref, SR ref)
Get the local_cache_enabled field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 5.6 FP1 (cowley)
True if this SR is assigned to be the local cache for its host
stringget_name_description(session ref, SR ref)
Get the name/description field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
a notes field containing human-readable description
stringget_name_label(session ref, SR ref)
Get the name/label field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
a human-readable name
(string → string) mapget_other_config(session ref, SR ref)
Get the other_config field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
additional configuration
PBD ref setget_PBDs(session ref, SR ref)
Get the PBDs field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
describes how particular hosts can see this storage repository
intget_physical_size(session ref, SR ref)
Get the physical_size field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
total physical size of the repository (in bytes)
intget_physical_utilisation(session ref, SR ref)
Get the physical_utilisation field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation
SR recordget_record(session ref, SR ref)
Get a record containing the current state of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
all fields from the object
Published in:
XenServer 4.0 (rio)
A storage repository
boolget_shared(session ref, SR ref)
Get the shared field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
true if this SR is (capable of being) shared between multiple hosts
(string → string) mapget_sm_config(session ref, SR ref)
Get the sm_config field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.1 (miami)
SM dependent data
string setget_supported_types(session ref)
Return a set of all the SR types supported by the system
Parameters:
session ref session_id
Reference to a valid session
Minimum role:
read-only
Result:
the supported SR types
Published in:
XenServer 4.0 (rio)
Return a set of all the SR types supported by the system
string setget_tags(session ref, SR ref)
Get the tags field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR 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
stringget_type(session ref, SR ref)
Get the type field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
type of the storage repository
stringget_uuid(session ref, SR ref)
Get the uuid field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR 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
VDI ref setget_VDIs(session ref, SR ref)
Get the VDIs field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
all virtual disks known to this storage repository
intget_virtual_allocation(session ref, SR ref)
Get the virtual_allocation field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
Minimum role:
read-only
Result:
value of the field
Published in:
XenServer 4.0 (rio)
sum of virtual_sizes of all VDIs in this storage repository (in bytes)
Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
Parameters:
session ref session_id
Reference to a valid session
host ref host
The host to create/make the SR on
(string → string) map device_config
The device config string that will be passed to backend SR driver
string type
The type of the SR; used to specify the SR backend driver to use
(string → string) map sm_config
Storage backend specific configuration options
Minimum role:
pool-operator
Result:
An XML fragment containing the scan results. These are specific to the scan being performed, and the backend.
Published in:
XenServer 4.1 (miami)
Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
Parameters:
session ref session_id
Reference to a valid session
host ref host
The host to create/make the SR on
(string → string) map device_config
The device config string that will be passed to backend SR driver
string type
The type of the SR; used to specify the SR backend driver to use
(string → string) map sm_config
Storage backend specific configuration options
Minimum role:
pool-operator
Result:
A set of records containing the scan results.
Prototyped in:
XenServer 7.5 (kolkata)
Published in:
XenServer 7.6 (lima)
floatquery_data_source(session ref, SR ref, string)
Query the latest value of the specified data source
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
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 7.0 (dundee)
Query the latest value of the specified data source
voidrecord_data_source(session ref, SR ref, string)
Start recording the specified data source
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
string data_source
The data source to record
Minimum role:
pool-operator
Published in:
XenServer 7.0 (dundee)
Start recording the specified data source
voidremove_from_other_config(session ref, SR ref, string)
Remove the given key and its corresponding value from the other_config field of the given SR. If the key is not in that Map, then do nothing.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
string key
Key to remove
Minimum role:
pool-operator
Published in:
XenServer 4.0 (rio)
additional configuration
voidremove_from_sm_config(session ref, SR ref, string)
Remove the given key and its corresponding value from the sm_config field of the given SR. If the key is not in that Map, then do nothing.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
string key
Key to remove
Minimum role:
pool-operator
Published in:
XenServer 4.1 (miami)
SM dependent data
voidremove_tags(session ref, SR ref, string)
Remove the given value from the tags field of the given SR. If the value is not in that Set, then do nothing.
Parameters:
session ref session_id
Reference to a valid session
SR 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
voidscan(session ref, SR ref)
Refreshes the list of VDIs associated with an SR
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR to scan
Minimum role:
vm-power-admin
Published in:
XenServer 4.0 (rio)
Refreshes the list of VDIs associated with an SR
voidset_name_description(session ref, SR ref, string)
Set the name description of the SR
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
string value
The name description for the SR
Minimum role:
pool-operator
Published in:
XenServer 4.0 (rio)
Set the name description of the SR
voidset_name_label(session ref, SR ref, string)
Set the name label of the SR
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
string value
The name label for the SR
Minimum role:
pool-operator
Published in:
XenServer 4.0 (rio)
Set the name label of the SR
voidset_other_config(session ref, SR ref, (string → string) map)
Set the other_config field of the given SR.
Parameters:
session ref session_id
Reference to a valid session
SR ref self
reference to the object
(string → string) map value
New value to set
Minimum role:
pool-operator
Published in:
XenServer 4.0 (rio)
additional configuration
voidset_physical_size(session ref, SR ref, int)
Sets the SR's physical_size field
Parameters:
session ref session_id
Reference to a valid session
SR ref self
The SR to modify
int value
The new value of the SR's physical_size
Minimum role:
pool-operator
Published in:
XenServer 4.1 (miami)
Sets the SR's physical_size field
voidset_shared(session ref, SR ref, bool)
Sets the shared flag on the SR
Parameters:
session ref session_id
Reference to a valid session
SR ref sr
The SR
bool value
True if the SR is shared
Minimum role:
pool-operator
Published in:
XenServer 4.0 (rio)
Sets the shared flag on the SR
voidset_sm_config(session ref, SR ref, (string → string) map)