Set-SCVirtualDVDDrive

Changes properties of a virtual DVD drive associated with a virtual machine, virtual machine template, or hardware profile used in VMM.

Description

The Set-SCVirtualDVDDrive cmdlet changes one or more properties of a virtual DVD drive object associated with a virtual machine, virtual machine template, or hardware profile used in a System Center Virtual Machine Manager (VMM) environment. 

You can use this cmdlet to connect a virtual DVD drive to a physical DVD drive on a virtual machine host server, to a different location on the IDE bus, or to an ISO image, or you can use it to disconnect the virtual DVD drive.

Most settings that you can configure for a virtual DVD drive on a virtual machine are the same regardless of whether the virtualization platform of the host is Hyper-V, VMware, or Citrix XenServer. All of these virtualization platforms support the following:

- Connecting a virtual DVD drive to a primary or secondary channel on 
  a host.

- Capturing information from a physical CD or DVD drive on the host 
  without specifying a drive letter. 

- Capturing information from an image (ISO) file stored in the VMM 
  library. 

- Capturing "no media" (used to disconnect a virtual DVD drive from 
  the host drive or from an ISO file).

The only setting that varies for this cmdlet by virtualization platform is whether an ISO file can be used directly from the VMM library:

- Hyper-V host. If you configure a connection to an ISO file in the
  VMM library, you can choose to use the ISO directly from the
  library instead of copying it to the host.

- VMware ESX host. If you configure a connection to an ISO file in the
  VMM library, you cannot use the ISO directly from the library but must
  instead accept the default, which copies the ISO file to the host.

- Citrix XenServer host. If you configure a connection to an ISO file in the
  VMM library, you cannot use the ISO directly from the library but must 
  instead accept the default, which copies the ISO file to the host. The 
  host must have at least one ISO repository available with write access 
  and enough storage space to contain the ISO file.

Note: If the virtual DVD drive is configured on a virtual machine that was created by using the Virtual Machine wizard in the Hyper-V Manager Console rather than in the VMM console, you must specify a drive letter. That drive letter will appear in the Properties for that virtual machine in the VMM console.

For more information about Set-SCVirtualDVDDrive, type: "Get-Help Set-SCVirtualDVDDrive -online".

Parameters

AnyVMHostDrive

Required? true
Accept Pipeline Input? false
Position? named
Indicates that a virtual DVD or floppy drive on a virtual machine will be connected to any corresponding physical drive on a host. This mapping occurs when you deploy a stored virtual machine on a host, or when you use a template or hardware profile to create and deploy a virtual machine on a host.

SourceBus

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source IDE bus for the drive.

SourceLUN

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source logical unit number (LUN) for a virtual DVD drive object on an IDE bus.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VirtualDVDDrive

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual DVD drive object. 

AnyVMHostDrive

Required? true
Accept Pipeline Input? false
Position? named
Indicates that a virtual DVD or floppy drive on a virtual machine will be connected to any corresponding physical drive on a host. This mapping occurs when you deploy a stored virtual machine on a host, or when you use a template or hardware profile to create and deploy a virtual machine on a host.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

SourceBus

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source IDE bus for the drive.

SourceLUN

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source logical unit number (LUN) for a virtual DVD drive object on an IDE bus.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VirtualDVDDrive

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual DVD drive object. 

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

SourceBus

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source IDE bus for the drive.

SourceLUN

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source logical unit number (LUN) for a virtual DVD drive object on an IDE bus.

VMHostDrive

Required? true
Accept Pipeline Input? false
Position? named
Specifies a drive on a virtual machine host. 

Example formats:
Hyper-V host hard drive: "C:"   
Hyper-V host floppy drive: "A:"
VMware ESX host hard drive: "/dev/tools"
VMware ESX host floppy drive: "/dev/sda"
Citrix XenServer host hard drive: “Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]”
Citrix XenServer host floppy drive: Not Supported

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VirtualDVDDrive

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual DVD drive object. 

VMHostDrive

Required? true
Accept Pipeline Input? false
Position? named
Specifies a drive on a virtual machine host. 

Example formats:
Hyper-V host hard drive: "C:"   
Hyper-V host floppy drive: "A:"
VMware ESX host hard drive: "/dev/tools"
VMware ESX host floppy drive: "/dev/sda"
Citrix XenServer host hard drive: “Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]”
Citrix XenServer host floppy drive: Not Supported

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

ISO

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an ISO object. 

SourceBus

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source IDE bus for the drive.

SourceLUN

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source logical unit number (LUN) for a virtual DVD drive object on an IDE bus.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

Link

Required? false
Accept Pipeline Input? false
Position? named
Indicates that a resource should be linked to instead of copied.

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VirtualDVDDrive

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual DVD drive object. 

ISO

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an ISO object. 

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

Link

Required? false
Accept Pipeline Input? false
Position? named
Indicates that a resource should be linked to instead of copied.

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

NoMedia

Required? true
Accept Pipeline Input? false
Position? named
Disconnects a virtual DVD drive from the host drive or ISO to which it was connected, or disconnects a virtual floppy drive from the host drive or virtual floppy disk to which it was connected.

SourceBus

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source IDE bus for the drive.

SourceLUN

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source logical unit number (LUN) for a virtual DVD drive object on an IDE bus.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VirtualDVDDrive

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual DVD drive object. 

NoMedia

Required? true
Accept Pipeline Input? false
Position? named
Disconnects a virtual DVD drive from the host drive or ISO to which it was connected, or disconnects a virtual floppy drive from the host drive or virtual floppy disk to which it was connected.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 
Requires a VMM virtual DVD drive object, which can be retrieved by using the Get-SCVirtualDVDDrive cmdlet.

Examples

1: Connect a virtual DVD drive to a physical DVD drive.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $DVDDrive = Get-SCVirtualDVDDrive -VM $VM | where { $_.Bus -eq 1 -and $_.LUN -eq 0 }
PS C:\> Set-SCVirtualDVDDrive -VirtualDVDDrive $DVDDrive -VMHostDrive "E:"
The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The second command gets the virtual DVD drive object that is located on Secondary Channel 0 (specified by -Bus 1 and -LUN 0) on the IDE bus on VM01 and stores the object in the $DVDDrive variable.

The last command connects the virtual DVD drive object stored in $DVDDrive to a physical drive on the host (the D: drive). It also deletes any ISO file that the virtual DVD drive used earlier if no other virtual machine currently uses that ISO file. 
2: Connect a virtual DVD drive to a different location on the IDE bus.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM02"
PS C:\> $DVDDrive = Get-SCVirtualDVDDrive -VM $VM | where { $_.Bus -eq 1 -and $_.LUN -eq 0 }
PS C:\> Set-SCVirtualDVDDrive -VirtualDVDDrive $DVDDrive -Bus 1 -LUN 1
The command gets the virtual machine object named VM02 and stores the object in the $VM variable.

The second command gets the virtual DVD drive object that is located on Secondary Channel 0 (specified by -Bus 1 and -LUN 0) on the IDE bus on VM02 and then stores the virtual DVD drive object in $DVDDrive.

The last command connects the virtual DVD drive object stored in $DVDDrive to a different position on the IDE bus by setting the logical unit number (LUN) to 1.
3: Disconnect a virtual DVD drive.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM03"
PS C:\> $DVDDrive = Get-SCVirtualDVDDrive -VM $VM | where { $_.Bus -eq 1 -and $_.LUN -eq 0 }
PS C:\> Set-SCVirtualDVDDrive -VirtualDVDDrive $DVDDrive -NoMedia
The first command gets the virtual machine object named VM03 and stores the object in the $VM variable.

The second command gets the virtual DVD drive object that is located on Secondary Channel 0 (specified by -Bus 1 and -LUN 0) on the IDE bus on VM03 and then stores the virtual DVD drive object in $DVDDrive.

The last command uses the NoMedia parameter to disconnect the virtual DVD drive object stored in $DVDDrive from any host drive or ISO to which it is connected. It also deletes any ISO file that the virtual DVD drive used earlier if no other virtual machine currently uses that ISO file.
4. Connect a virtual DVD drive on an existing virtual machine to any available physical DVD drive.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM04"
PS C:\> Set-SCVirtualDVDDrive -AnyVMHostDrive -VirtualDVDDrive (Get-VirtualDVDDrive -VM $VM | where {$_.Bus -eq 1 -and $_.Lun -eq 0})
The first command gets the virtual machine object named VM04 and stores the object in the $VM variable.

The last command gets the virtual DVD drive object that is located on the first slot of the Secondary Channel (specified by -Bus 1 and -LUN 0) on the IDE bus on VM04. The command uses the Set-SCVirtualDVDDrive cmdlet with the AnyVMHostDrive parameter to connect the virtual DVD drive to any available physical DVD drive on the host.

See Also