Set-XenVBD
Sets fields of a VBD object.
Syntax
Set-XenVBD [-VBD] <VBD> [-PassThru] [-Userdevice <string>] [-Bootable <bool>]
[-Type {CD | Disk | Floppy | unknown}] [-Unpluggable <bool>]
[-OtherConfig <hashtable>] [-QosAlgorithmType <string>]
[-QosAlgorithmParams <hashtable>] [-Mode {RO | RW | unknown}] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVBD [-Ref] <XenRef[VBD]> [-PassThru] [-Userdevice <string>] [-Bootable <bool>]
[-Type {CD | Disk | Floppy | unknown}] [-Unpluggable <bool>]
[-OtherConfig <hashtable>] [-QosAlgorithmType <string>]
[-QosAlgorithmParams <hashtable>] [-Mode {RO | RW | unknown}] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVBD [-Uuid] <guid> [-PassThru] [-Userdevice <string>] [-Bootable <bool>]
[-Type {CD | Disk | Floppy | unknown}] [-Unpluggable <bool>]
[-OtherConfig <hashtable>] [-QosAlgorithmType <string>]
[-QosAlgorithmParams <hashtable>] [-Mode {RO | RW | unknown}] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
Changes writable fields of a VBD. Each optional parameter listed below corresponds to a field that can be set.
Parameters
-Async
If set, the operation runs asynchronously and returns a Task object that can be used to track its progress. Available only for those fields whose underlying operation supports asynchronous invocation.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BestEffort
If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Bootable
Set the bootable field of the given VBD.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Confirm
Prompts for confirmation before running the cmdlet.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | cf |
-Mode
Sets the mode of the VBD. The power\_state of the VM must be halted.
| Attribute | Value |
|---|---|
| Type | vbd_mode |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | RO, RW, unknown |
-OtherConfig
Set the other\_config field of the given VBD.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PassThru
If set, the cmdlet returns the affected object. By default the cmdlet does not generate any output.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-QosAlgorithmParams
Set the qos/algorithm\_params field of the given VBD.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-QosAlgorithmType
Set the qos/algorithm\_type field of the given VBD.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Ref
The VBD object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[VBD] |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | opaque_ref |
-SessionOpaqueRef
The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Type
Set the type field of the given VBD.
| Attribute | Value |
|---|---|
| Type | vbd_type |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | CD, Disk, Floppy, unknown |
-Unpluggable
Set the unpluggable field of the given VBD.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Userdevice
Set the userdevice field of the given VBD.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Uuid
The UUID of the VBD to operate on.
| Attribute | Value |
|---|---|
| Type | guid |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
-VBD
The VBD object to operate on.
| Attribute | Value |
|---|---|
| Type | VBD |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | wi |
Inputs
-
VBD -
XenRef[VBD] -
guid
Outputs
-
VBD -
Task -
void
Examples
Example 1: Set the Userdevice field
PS> Get-XenVBD -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Set-XenVBD -Userdevice "new value"
Sets the Userdevice field of a VBD.
Example 2: Set the Bootable field
PS> Get-XenVBD -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Set-XenVBD -Bootable $true
Sets the Bootable field of a VBD.
Example 3: Set the Type field
PS> Get-XenVBD -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Set-XenVBD -Type CD
Sets the Type field of a VBD.
Related links
-
Class: VBD
-
Using the XenServer PowerShell module