VBD 
Class: VBD A virtual block device
Published in: XenServer 4.0 (rio) A virtual block device 
Enums vbd_operations
Values: attach Attempting to attach this VBD to a VM eject Attempting to eject the media from this VBD insert Attempting to insert new media into this VBD plug Attempting to hotplug this VBD unplug Attempting to hot unplug this VBD unplug_force Attempting to forcibly unplug this VBD pause Attempting to pause a block device backend unpause Attempting to unpause a block device backend 
vbd_type
Values: CD VBD will appear to guest as CD Disk VBD will appear to guest as disk Floppy VBD will appear as a floppy 
vbd_mode
Values: RO only read-only access will be allowed RW read-write access will be allowed 
Fields 
enum vbd_operations 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. 
bool 
bootable 
[RW] 
true if this VBD is bootable
Published in: XenServer 4.0 (rio) true if this VBD is bootable 
(string → enum vbd_operations) 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. 
bool 
currently_attached 
[RO/constructor] 
is the device currently attached (erased on reboot)
Default value: false Published in: XenServer 4.0 (rio) Changed in: XAPI 1.257.0 (1.257.0) Made StaticRO to allow plugged VIF and VBD creation for Suspended VM 
string 
device 
[RO/constructor] 
device seen by the guest e.g. hda1
Default value: "" Published in: XenServer 4.0 (rio) Changed in: XAPI 1.257.0 (1.257.0) Become static to allow plugged VBD creation for Suspended VM 
bool 
empty 
[RO/constructor] 
if true this represents an empty drive
Published in: XenServer 4.0 (rio) if true this represents an empty drive 
Removed
VBD_metrics ref 
metrics 
[RO/runtime] 
metrics associated with this VBD
Default value: OpaqueRef:NULL Published in: XenServer 4.0 (rio) Deprecated in: XenServer 6.1 (tampa) Dummy transition Removed in: XenServer 6.1 (tampa) Disabled in favour of RRDs 
enum vbd_mode 
mode 
[RO/constructor] 
the mode the VBD should be mounted with
Published in: XenServer 4.0 (rio) the mode the VBD should be mounted with 
(string → string) map 
other_config 
[RW] 
additional configuration
Published in: XenServer 4.0 (rio) additional configuration 
(string → string) map 
qos_algorithm_params 
[RW] 
parameters for chosen QoS algorithm
Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm 
string 
qos_algorithm_type 
[RW] 
QoS algorithm to use
Published in: XenServer 4.0 (rio) QoS algorithm to use 
string set 
qos_supported_algorithms 
[RO/runtime] 
supported QoS algorithms for this VBD
Published in: XenServer 4.0 (rio) supported QoS algorithms for this VBD 
(string → string) map 
runtime_properties 
[RO/runtime] 
Device runtime properties
Published in: XenServer 4.0 (rio) Device runtime properties 
int 
status_code 
[RO/runtime] 
error/success code associated with last attach-operation (erased on reboot)
Published in: XenServer 4.0 (rio) error/success code associated with last attach-operation (erased on reboot) 
string 
status_detail 
[RO/runtime] 
error/success information associated with last attach-operation status (erased on reboot)
Published in: XenServer 4.0 (rio) error/success information associated with last attach-operation status (erased on reboot) 
bool 
storage_lock 
[RO/runtime] 
true if a storage level lock was acquired
Published in: XenServer 4.0 (rio) true if a storage level lock was acquired 
enum vbd_type 
type 
[RW] 
how the VBD will appear to the guest (e.g. disk or CD)
Published in: XenServer 4.0 (rio) how the VBD will appear to the guest (e.g. disk or CD) 
bool 
unpluggable 
[RW] 
true if this VBD will support hot-unplug
Default value: true Published in: XenServer 4.1 (miami) true if this VBD will support hot-unplug 
string 
userdevice 
[RW] 
user-friendly device name e.g. 0,1,2,etc.
Published in: XenServer 4.0 (rio) user-friendly device name e.g. 0,1,2,etc. 
string 
uuid 
[RO/runtime] 
Unique identifier/object reference
Published in: XenServer 4.0 (rio) Unique identifier/object reference 
VDI ref 
VDI 
[RO/constructor] 
the virtual disk
Published in: XenServer 4.0 (rio) the virtual disk 
VM ref 
VM 
[RO/constructor] 
the virtual machine
Published in: XenServer 4.0 (rio) the virtual machine 
Messages
Hide implicit  
void 
add_to_other_config 
(session ref , VBD ref , string , string ) 
Add the given key-value pair to the other_config field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object string key Key to add string value Value to add Minimum role: vm-admin Published in: XenServer 4.0 (rio) additional configuration 
void 
add_to_qos_algorithm_params 
(session ref , VBD ref , string , string ) 
Add the given key-value pair to the qos/algorithm_params field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object string key Key to add string value Value to add Minimum role: vm-admin Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm 
void 
assert_attachable 
(session ref , VBD ref ) 
Throws an error if this VBD could not be attached to this VM if the VM were running. Intended for debugging.
Parameters: session ref session_id Reference to a valid session VBD ref self The VBD to query Minimum role: vm-admin Published in: XenServer 4.0 (rio) Throws an error if this VBD could not be attached to this VM if the VM were running. Intended for debugging. 
VBD ref 
create 
(session ref , VBD record ) 
Create a new VBD instance, and return its handle.
The constructor args are: VM*, VDI*, device, userdevice*, bootable*, mode*, type*, unpluggable, empty*, other_config*, currently_attached, qos_algorithm_type*, qos_algorithm_params* (* = non-optional).
Parameters: session ref session_id Reference to a valid session VBD record args All constructor arguments Minimum role: vm-admin Result: reference to the newly created object Published in: XenServer 4.0 (rio) A virtual block device 
void 
destroy 
(session ref , VBD ref ) 
Destroy the specified VBD instance.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: vm-admin Published in: XenServer 4.0 (rio) A virtual block device 
void 
eject 
(session ref , VBD ref ) 
Remove the media from the device and leave it empty
Parameters: session ref session_id Reference to a valid session VBD ref vbd The vbd representing the CDROM-like device Minimum role: vm-operator Errors: VBD_NOT_REMOVABLE_MEDIA Media could not be ejected because it is not removable VBD_IS_EMPTY Operation could not be performed because the drive is empty Published in: XenServer 4.0 (rio) Remove the media from the device and leave it empty 
VBD ref set 
get_all 
(session ref ) 
Return a list of all the VBDs 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 virtual block device 
(VBD ref → VBD record) map 
get_all_records 
(session ref ) 
Return a map of VBD references to VBD records for all VBDs 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 virtual block device 
enum vbd_operations set 
get_allowed_operations 
(session ref , VBD ref ) 
Get the allowed_operations field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD 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. 
bool 
get_bootable 
(session ref , VBD ref ) 
Get the bootable field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) true if this VBD is bootable 
VBD ref 
get_by_uuid 
(session ref , string ) 
Get a reference to the VBD 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 virtual block device 
(string → enum vbd_operations) map 
get_current_operations 
(session ref , VBD ref ) 
Get the current_operations field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD 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. 
bool 
get_currently_attached 
(session ref , VBD ref ) 
Get the currently_attached field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Changed in: XAPI 1.257.0 (1.257.0) Made StaticRO to allow plugged VIF and VBD creation for Suspended VM 
string 
get_device 
(session ref , VBD ref ) 
Get the device field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Changed in: XAPI 1.257.0 (1.257.0) Become static to allow plugged VBD creation for Suspended VM 
bool 
get_empty 
(session ref , VBD ref ) 
Get the empty field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) if true this represents an empty drive 
Removed
VBD_metrics ref 
get_metrics 
(session ref , VBD ref ) 
Get the metrics field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Deprecated in: XenServer 6.1 (tampa) Dummy transition Removed in: XenServer 6.1 (tampa) Disabled in favour of RRDs 
enum vbd_mode 
get_mode 
(session ref , VBD ref ) 
Get the mode field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) the mode the VBD should be mounted with 
(string → string) map 
get_other_config 
(session ref , VBD ref ) 
Get the other_config field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) additional configuration 
(string → string) map 
get_qos_algorithm_params 
(session ref , VBD ref ) 
Get the qos/algorithm_params field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm 
string 
get_qos_algorithm_type 
(session ref , VBD ref ) 
Get the qos/algorithm_type field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) QoS algorithm to use 
string set 
get_qos_supported_algorithms 
(session ref , VBD ref ) 
Get the qos/supported_algorithms field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) supported QoS algorithms for this VBD 
VBD record 
get_record 
(session ref , VBD ref ) 
Get a record containing the current state of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: all fields from the object Published in: XenServer 4.0 (rio) A virtual block device 
(string → string) map 
get_runtime_properties 
(session ref , VBD ref ) 
Get the runtime_properties field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Device runtime properties 
int 
get_status_code 
(session ref , VBD ref ) 
Get the status_code field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) error/success code associated with last attach-operation (erased on reboot) 
string 
get_status_detail 
(session ref , VBD ref ) 
Get the status_detail field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) error/success information associated with last attach-operation status (erased on reboot) 
bool 
get_storage_lock 
(session ref , VBD ref ) 
Get the storage_lock field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) true if a storage level lock was acquired 
enum vbd_type 
get_type 
(session ref , VBD ref ) 
Get the type field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) how the VBD will appear to the guest (e.g. disk or CD) 
bool 
get_unpluggable 
(session ref , VBD ref ) 
Get the unpluggable field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.1 (miami) true if this VBD will support hot-unplug 
string 
get_userdevice 
(session ref , VBD ref ) 
Get the userdevice field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) user-friendly device name e.g. 0,1,2,etc. 
string 
get_uuid 
(session ref , VBD ref ) 
Get the uuid field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD 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 
get_VDI 
(session ref , VBD ref ) 
Get the VDI field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) the virtual disk 
VM ref 
get_VM 
(session ref , VBD ref ) 
Get the VM field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) the virtual machine 
void 
insert 
(session ref , VBD ref , VDI ref ) 
Insert new media into the device
Parameters: session ref session_id Reference to a valid session VBD ref vbd The vbd representing the CDROM-like device VDI ref vdi The new VDI to 'insert' Minimum role: vm-operator Errors: VBD_NOT_REMOVABLE_MEDIA Media could not be ejected because it is not removable VBD_NOT_EMPTY Operation could not be performed because the drive is not empty Published in: XenServer 4.0 (rio) Insert new media into the device 
void 
plug 
(session ref , VBD ref ) 
Hotplug the specified VBD, dynamically attaching it to the running VM
Parameters: session ref session_id Reference to a valid session VBD ref self The VBD to hotplug Minimum role: vm-admin Published in: XenServer 4.0 (rio) Hotplug the specified VBD, dynamically attaching it to the running VM 
void 
remove_from_other_config 
(session ref , VBD ref , string ) 
Remove the given key and its corresponding value from the other_config field of the given VBD. If the key is not in that Map, then do nothing.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object string key Key to remove Minimum role: vm-admin Published in: XenServer 4.0 (rio) additional configuration 
void 
remove_from_qos_algorithm_params 
(session ref , VBD ref , string ) 
Remove the given key and its corresponding value from the qos/algorithm_params field of the given VBD. If the key is not in that Map, then do nothing.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object string key Key to remove Minimum role: vm-admin Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm 
void 
set_bootable 
(session ref , VBD ref , bool ) 
Set the bootable field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object bool value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) true if this VBD is bootable 
void 
set_mode 
(session ref , VBD ref , enum vbd_mode ) 
Sets the mode of the VBD. The power_state of the VM must be halted.
Parameters: session ref session_id Reference to a valid session VBD ref self Reference to the object enum vbd_mode value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) Sets the mode of the VBD. The power_state of the VM must be halted. 
void 
set_other_config 
(session ref , VBD ref , (string → string) map ) 
Set the other_config field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object (string → string) map value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) additional configuration 
void 
set_qos_algorithm_params 
(session ref , VBD ref , (string → string) map ) 
Set the qos/algorithm_params field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object (string → string) map value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm 
void 
set_qos_algorithm_type 
(session ref , VBD ref , string ) 
Set the qos/algorithm_type field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object string value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) QoS algorithm to use 
void 
set_type 
(session ref , VBD ref , enum vbd_type ) 
Set the type field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object enum vbd_type value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) how the VBD will appear to the guest (e.g. disk or CD) 
void 
set_unpluggable 
(session ref , VBD ref , bool ) 
Set the unpluggable field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object bool value New value to set Minimum role: vm-admin Published in: XenServer 4.1 (miami) true if this VBD will support hot-unplug 
void 
set_userdevice 
(session ref , VBD ref , string ) 
Set the userdevice field of the given VBD.
Parameters: session ref session_id Reference to a valid session VBD ref self reference to the object string value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) user-friendly device name e.g. 0,1,2,etc. 
void 
unplug 
(session ref , VBD ref ) 
Hot-unplug the specified VBD, dynamically unattaching it from the running VM
Parameters: session ref session_id Reference to a valid session VBD ref self The VBD to hot-unplug Minimum role: vm-admin Errors: DEVICE_DETACH_REJECTED The VM rejected the attempt to detach the device. DEVICE_ALREADY_DETACHED The device is not currently attached Published in: XenServer 4.0 (rio) Hot-unplug the specified VBD, dynamically unattaching it from the running VM 
void 
unplug_force 
(session ref , VBD ref ) 
Forcibly unplug the specified VBD
Parameters: session ref session_id Reference to a valid session VBD ref self The VBD to forcibly unplug Minimum role: vm-admin Published in: XenServer 4.0 (rio) Forcibly unplug the specified VBD