Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Set-SCVirtualDVDDrive

Updated: November 1, 2013

Applies To: System Center 2012 R2 Virtual Machine Manager

Set-SCVirtualDVDDrive

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

Syntax

Parameter Set: BusChangesWithVirtualDVDDriveSpecified
Set-SCVirtualDVDDrive [-VirtualDVDDrive] <VirtualDVDDrive> [-Bus <Byte> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: AnyHostDriveWithSourceBusAndLunSpecified
Set-SCVirtualDVDDrive -AnyVMHostDrive -JobGroup <Guid> -SourceBus <Byte> -SourceLUN <Byte> [-Bus <Byte> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: AnyHostDriveWithVirtualDVDDriveSpecified
Set-SCVirtualDVDDrive [-VirtualDVDDrive] <VirtualDVDDrive> -AnyVMHostDrive [-Bus <Byte> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: BusChangesWithSourceBusAndLunSpecified
Set-SCVirtualDVDDrive -JobGroup <Guid> -SourceBus <Byte> -SourceLUN <Byte> [-Bus <Byte> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: HostDriveWithSourceBusAndLunSpecified
Set-SCVirtualDVDDrive -JobGroup <Guid> -SourceBus <Byte> -SourceLUN <Byte> -VMHostDrive <String> [-Bus <Byte> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: HostDriveWithVirtualDVDDriveSpecified
Set-SCVirtualDVDDrive [-VirtualDVDDrive] <VirtualDVDDrive> -VMHostDrive <String> [-Bus <Byte> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: ISOWithSourceBusAndLunSpecified
Set-SCVirtualDVDDrive -ISO <ISO> -JobGroup <Guid> -SourceBus <Byte> -SourceLUN <Byte> [-Bus <Byte> ] [-JobVariable <String> ] [-Link] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: ISOWithVirtualDVDDriveSpecified
Set-SCVirtualDVDDrive [-VirtualDVDDrive] <VirtualDVDDrive> -ISO <ISO> [-Bus <Byte> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-Link] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: NoMediaWithSourceBusAndLunSpecified
Set-SCVirtualDVDDrive -JobGroup <Guid> -NoMedia -SourceBus <Byte> -SourceLUN <Byte> [-Bus <Byte> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: NoMediaWithVirtualDVDDriveSpecified
Set-SCVirtualDVDDrive [-VirtualDVDDrive] <VirtualDVDDrive> -NoMedia [-Bus <Byte> ] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LUN <Byte> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]




Detailed 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 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.

Parameters

-AnyVMHostDrive

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Bus<Byte>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ISO<ISO>

Specifies an ISO object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-JobGroup<Guid>

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Link

Indicates that a resource should be linked to instead of copied.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LUN<Byte>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoMedia

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceBus<Byte>

Specifies the source IDE bus for the drive.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceLUN<Byte>

Specifies the source logical unit number (LUN) for a virtual DVD drive object on an IDE bus.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualDVDDrive<VirtualDVDDrive>

Specifies a virtual DVD drive object.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMHostDrive<String>

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • VirtualDVDDrive

Notes

  • 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.

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.


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:"

2: Connect a virtual DVD drive to a different location on the IDE bus.

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.


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

3: Disconnect a virtual DVD drive.

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.


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

4. Connect a virtual DVD drive on an existing virtual machine to any available physical DVD drive.

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.


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})

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.