Package com.xensource.xenapi
Class VBD
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.VBD
A virtual block device
First published in XenServer 4.0.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToOtherConfig
(Connection c, String key, String value) Add the given key-value pair to the other_config field of the given VBD.void
addToQosAlgorithmParams
(Connection c, String key, String value) Add the given key-value pair to the qos/algorithm_params field of the given VBD.void
Throws an error if this VBD could not be attached to this VM if the VM were running.Throws an error if this VBD could not be attached to this VM if the VM were running.static VBD
create
(Connection c, VBD.Record record) Create a new VBD instance, and return its handle.static Task
createAsync
(Connection c, VBD.Record record) Create a new VBD instance, and return its handle.void
Destroy the specified VBD instance.Destroy the specified VBD instance.void
eject
(Connection c) Remove the media from the device and leave it empty Minimum allowed role: vm-operator First published in XenServer 4.0.Remove the media from the device and leave it empty Minimum allowed role: vm-operator First published in XenServer 4.0.boolean
If obj is a VBD, compares XenAPI references for equality.getAll
(Connection c) Return a list of all the VBDs known to the system.Get the allowed_operations field of the given VBD.static Map<VBD,
VBD.Record> Return a map of VBD references to VBD records for all VBDs known to the system.Get the bootable field of the given VBD.static VBD
getByUuid
(Connection c, String uuid) Get a reference to the VBD instance with the specified UUID.Get the currently_attached field of the given VBD.Get the current_operations field of the given VBD.Get the device field of the given VBD.Get the empty field of the given VBD.Deprecated.since XenServer 6.1Get the mode field of the given VBD.Get the other_config field of the given VBD.Get the qos/algorithm_params field of the given VBD.Get the qos/algorithm_type field of the given VBD.Get the qos/supported_algorithms field of the given VBD.Get a record containing the current state of the given VBD.Get the runtime_properties field of the given VBD.Get the status_code field of the given VBD.Get the status_detail field of the given VBD.Get the storage_lock field of the given VBD.Get the type field of the given VBD.Get the unpluggable field of the given VBD.Get the userdevice field of the given VBD.Get the uuid field of the given VBD.getVDI
(Connection c) Get the VDI field of the given VBD.getVM
(Connection c) Get the VM field of the given VBD.int
hashCode()
void
insert
(Connection c, VDI vdi) Insert new media into the device Minimum allowed role: vm-operator First published in XenServer 4.0.insertAsync
(Connection c, VDI vdi) Insert new media into the device Minimum allowed role: vm-operator First published in XenServer 4.0.void
plug
(Connection c) Hotplug the specified VBD, dynamically attaching it to the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.Hotplug the specified VBD, dynamically attaching it to the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.void
removeFromOtherConfig
(Connection c, String key) Remove the given key and its corresponding value from the other_config field of the given VBD.void
Remove the given key and its corresponding value from the qos/algorithm_params field of the given VBD.void
setBootable
(Connection c, Boolean bootable) Set the bootable field of the given VBD.void
setMode
(Connection c, Types.VbdMode value) Sets the mode of the VBD.setModeAsync
(Connection c, Types.VbdMode value) Sets the mode of the VBD.void
setOtherConfig
(Connection c, Map<String, String> otherConfig) Set the other_config field of the given VBD.void
setQosAlgorithmParams
(Connection c, Map<String, String> algorithmParams) Set the qos/algorithm_params field of the given VBD.void
setQosAlgorithmType
(Connection c, String algorithmType) Set the qos/algorithm_type field of the given VBD.void
setType
(Connection c, Types.VbdType type) Set the type field of the given VBD.void
setUnpluggable
(Connection c, Boolean unpluggable) Set the unpluggable field of the given VBD.void
setUserdevice
(Connection c, String userdevice) Set the userdevice field of the given VBD.void
unplug
(Connection c) Hot-unplug the specified VBD, dynamically unattaching it from the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.Hot-unplug the specified VBD, dynamically unattaching it from the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.void
Forcibly unplug the specified VBD Minimum allowed role: vm-admin First published in XenServer 4.0.Forcibly unplug the specified VBD Minimum allowed role: vm-admin First published in XenServer 4.0.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a VBD, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public VBD.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a record containing the current state of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- all fields from the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByUuid
public static VBD getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a reference to the VBD instance with the specified UUID. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onuuid
- UUID of object to return- Returns:
- reference to the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
create
public static VBD create(Connection c, VBD.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException Create a new VBD instance, and return its handle. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onrecord
- All constructor arguments- Returns:
- reference to the newly created object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createAsync
public static Task createAsync(Connection c, VBD.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException Create a new VBD instance, and return its handle. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onrecord
- All constructor arguments- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Destroy the specified VBD instance. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Destroy the specified VBD instance. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the uuid field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllowedOperations
public Set<Types.VbdOperations> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the allowed_operations field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getCurrentOperations
public Map<String,Types.VbdOperations> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the current_operations field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getVM
Get the VM field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getVDI
Get the VDI field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getDevice
public String getDevice(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the device field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUserdevice
public String getUserdevice(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the userdevice field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getBootable
public Boolean getBootable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the bootable field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getMode
public Types.VbdMode getMode(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the mode field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getType
public Types.VbdType getType(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the type field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUnpluggable
public Boolean getUnpluggable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the unpluggable field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.1.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getStorageLock
public Boolean getStorageLock(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the storage_lock field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getEmpty
public Boolean getEmpty(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the empty field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getOtherConfig
public Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the other_config field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getCurrentlyAttached
public Boolean getCurrentlyAttached(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the currently_attached field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getStatusCode
public Long getStatusCode(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the status_code field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getStatusDetail
public String getStatusDetail(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the status_detail field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getRuntimeProperties
public Map<String,String> getRuntimeProperties(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the runtime_properties field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getQosAlgorithmType
public String getQosAlgorithmType(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the qos/algorithm_type field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getQosAlgorithmParams
public Map<String,String> getQosAlgorithmParams(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the qos/algorithm_params field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getQosSupportedAlgorithms
public Set<String> getQosSupportedAlgorithms(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the qos/supported_algorithms field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getMetrics
@Deprecated(since="XenServer 6.1") public VBDMetrics getMetrics(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Deprecated.since XenServer 6.1Get the metrics field of the given VBD. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setUserdevice
public void setUserdevice(Connection c, String userdevice) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the userdevice field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onuserdevice
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setBootable
public void setBootable(Connection c, Boolean bootable) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the bootable field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onbootable
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setType
public void setType(Connection c, Types.VbdType type) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the type field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made ontype
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setUnpluggable
public void setUnpluggable(Connection c, Boolean unpluggable) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the unpluggable field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.1.- Parameters:
c
- The connection the call is made onunpluggable
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setOtherConfig
public void setOtherConfig(Connection c, Map<String, String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, IOExceptionSet the other_config field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onotherConfig
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addToOtherConfig
public void addToOtherConfig(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException Add the given key-value pair to the other_config field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onkey
- Key to addvalue
- Value to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeFromOtherConfig
public void removeFromOtherConfig(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, IOException 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. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onkey
- Key to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setQosAlgorithmType
public void setQosAlgorithmType(Connection c, String algorithmType) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the qos/algorithm_type field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onalgorithmType
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setQosAlgorithmParams
public void setQosAlgorithmParams(Connection c, Map<String, String> algorithmParams) throws Types.BadServerResponse, Types.XenAPIException, IOExceptionSet the qos/algorithm_params field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onalgorithmParams
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addToQosAlgorithmParams
public void addToQosAlgorithmParams(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException Add the given key-value pair to the qos/algorithm_params field of the given VBD. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onkey
- Key to addvalue
- Value to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeFromQosAlgorithmParams
public void removeFromQosAlgorithmParams(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, IOException 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. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onkey
- Key to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
eject
public void eject(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.VbdNotRemovableMedia, Types.VbdIsEmpty Remove the media from the device and leave it empty Minimum allowed role: vm-operator First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.VbdNotRemovableMedia
- Media could not be ejected because it is not removableTypes.VbdIsEmpty
- Operation could not be performed because the drive is empty
-
ejectAsync
public Task ejectAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.VbdNotRemovableMedia, Types.VbdIsEmpty Remove the media from the device and leave it empty Minimum allowed role: vm-operator First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.VbdNotRemovableMedia
- Media could not be ejected because it is not removableTypes.VbdIsEmpty
- Operation could not be performed because the drive is empty
-
insert
public void insert(Connection c, VDI vdi) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.VbdNotRemovableMedia, Types.VbdNotEmpty Insert new media into the device Minimum allowed role: vm-operator First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onvdi
- The new VDI to 'insert'- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.VbdNotRemovableMedia
- Media could not be ejected because it is not removableTypes.VbdNotEmpty
- Operation could not be performed because the drive is not empty
-
insertAsync
public Task insertAsync(Connection c, VDI vdi) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.VbdNotRemovableMedia, Types.VbdNotEmpty Insert new media into the device Minimum allowed role: vm-operator First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onvdi
- The new VDI to 'insert'- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.VbdNotRemovableMedia
- Media could not be ejected because it is not removableTypes.VbdNotEmpty
- Operation could not be performed because the drive is not empty
-
plug
Hotplug the specified VBD, dynamically attaching it to the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
plugAsync
public Task plugAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Hotplug the specified VBD, dynamically attaching it to the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
unplug
public void unplug(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.DeviceDetachRejected, Types.DeviceAlreadyDetached Hot-unplug the specified VBD, dynamically unattaching it from the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.DeviceDetachRejected
- The VM rejected the attempt to detach the device.Types.DeviceAlreadyDetached
- The device is not currently attached
-
unplugAsync
public Task unplugAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.DeviceDetachRejected, Types.DeviceAlreadyDetached Hot-unplug the specified VBD, dynamically unattaching it from the running VM Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.DeviceDetachRejected
- The VM rejected the attempt to detach the device.Types.DeviceAlreadyDetached
- The device is not currently attached
-
unplugForce
public void unplugForce(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Forcibly unplug the specified VBD Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
unplugForceAsync
public Task unplugForceAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Forcibly unplug the specified VBD Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
assertAttachable
public void assertAttachable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Throws an error if this VBD could not be attached to this VM if the VM were running. Intended for debugging. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
assertAttachableAsync
public Task assertAttachableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Throws an error if this VBD could not be attached to this VM if the VM were running. Intended for debugging. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setMode
public void setMode(Connection c, Types.VbdMode value) throws Types.BadServerResponse, Types.XenAPIException, IOException Sets the mode of the VBD. The power_state of the VM must be halted. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onvalue
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setModeAsync
public Task setModeAsync(Connection c, Types.VbdMode value) throws Types.BadServerResponse, Types.XenAPIException, IOException Sets the mode of the VBD. The power_state of the VM must be halted. Minimum allowed role: vm-admin First published in XenServer 4.0.- Parameters:
c
- The connection the call is made onvalue
- New value to set- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAll
public static Set<VBD> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a list of all the VBDs known to the system. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- references to all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllRecords
public static Map<VBD,VBD.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a map of VBD references to VBD records for all VBDs known to the system. Minimum allowed role: read-only First published in XenServer 4.0.- Parameters:
c
- The connection the call is made on- Returns:
- records of all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-