Condividi tramite


New-SCVirtualDiskDrive

New-SCVirtualDiskDrive

Creates a virtual disk drive object on a virtual machine deployed on a host managed by VMM, or on a template in the VMM library.

Syntax

Parameter Set: AnyHostDiskToJobGroupParamSetIDE
New-SCVirtualDiskDrive -AnyStorageDisk -Bus <Byte> -IDE -JobGroup <Guid]> -LUN <Byte> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: AnyHostDiskToJobGroupParamSetSCSI
New-SCVirtualDiskDrive -AnyStorageDisk -Bus <Byte> -JobGroup <Guid]> -LUN <Byte> -SCSI [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: AnyHostDiskToTemplateParamSetIDE
New-SCVirtualDiskDrive -AnyStorageDisk -Bus <Byte> -IDE -LUN <Byte> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: AnyHostDiskToTemplateParamSetSCSI
New-SCVirtualDiskDrive -AnyStorageDisk -Bus <Byte> -LUN <Byte> -SCSI -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingHostVHDToVMParamSetIDE
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -IDE -LUN <Byte> -Path <String> -UseLocalVirtualHardDisk -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingHostVHDToVMParamSetIDEJobGroup
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -IDE -JobGroup <Guid]> -LUN <Byte> -Path <String> -UseLocalVirtualHardDisk [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingHostVHDToVMParamSetSCSI
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -LUN <Byte> -Path <String> -SCSI -UseLocalVirtualHardDisk -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingHostVHDToVMParamSetSCSIJobGroup
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -JobGroup <Guid]> -LUN <Byte> -Path <String> -SCSI -UseLocalVirtualHardDisk [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingVHDToJobGroupParamSetIDE
New-SCVirtualDiskDrive -Bus <Byte> -IDE -JobGroup <Guid]> -LUN <Byte> -VirtualHardDisk <StandaloneVirtualHardDisk> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-FileName <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingVHDToJobGroupParamSetSCSI
New-SCVirtualDiskDrive -Bus <Byte> -JobGroup <Guid]> -LUN <Byte> -SCSI -VirtualHardDisk <StandaloneVirtualHardDisk> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-FileName <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-SharedStorage <Boolean> ] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingVHDToTemplateParamSetIDE
New-SCVirtualDiskDrive -Bus <Byte> -IDE -LUN <Byte> -VirtualHardDisk <StandaloneVirtualHardDisk> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingVHDToTemplateParamSetSCSI
New-SCVirtualDiskDrive -Bus <Byte> -LUN <Byte> -SCSI -VirtualHardDisk <StandaloneVirtualHardDisk> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-SharedStorage <Boolean> ] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingVHDToVMParamSetIDE
New-SCVirtualDiskDrive -Bus <Byte> -IDE -LUN <Byte> -VirtualHardDisk <StandaloneVirtualHardDisk> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-FileName <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: existingVHDToVMParamSetSCSI
New-SCVirtualDiskDrive -Bus <Byte> -LUN <Byte> -SCSI -VirtualHardDisk <StandaloneVirtualHardDisk> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-FileName <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: HostDiskToJobGroupParamSetIDE
New-SCVirtualDiskDrive -Bus <Byte> -IDE -JobGroup <Guid]> -LUN <Byte> -StorageDisk <StorageDisk> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: HostDiskToJobGroupParamSetSCSI
New-SCVirtualDiskDrive -Bus <Byte> -JobGroup <Guid]> -LUN <Byte> -SCSI -StorageDisk <StorageDisk> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-FileName <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: HostDiskToVMParamSetIDE
New-SCVirtualDiskDrive -Bus <Byte> -IDE -LUN <Byte> -StorageDisk <StorageDisk> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: HostDiskToVMParamSetSCSI
New-SCVirtualDiskDrive -Bus <Byte> -LUN <Byte> -SCSI -StorageDisk <StorageDisk> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-FileName <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToJobGroupParamSetIDEDynamic
New-SCVirtualDiskDrive -Bus <Byte> -Dynamic -FileName <String> -IDE -JobGroup <Guid]> -LUN <Byte> -VirtualHardDiskSizeMB <Int64> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToJobGroupParamSetIDEFixed
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -Fixed -IDE -JobGroup <Guid]> -LUN <Byte> -VirtualHardDiskSizeMB <Int64> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToJobGroupParamSetSCSIDynamic
New-SCVirtualDiskDrive -Bus <Byte> -Dynamic -FileName <String> -JobGroup <Guid]> -LUN <Byte> -SCSI -VirtualHardDiskSizeMB <Int64> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToJobGroupParamSetSCSIFixed
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -Fixed -JobGroup <Guid]> -LUN <Byte> -SCSI -VirtualHardDiskSizeMB <Int64> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToTemplateParamSetIDEDynamic
New-SCVirtualDiskDrive -Bus <Byte> -Dynamic -FileName <String> -IDE -LUN <Byte> -VirtualHardDiskSizeMB <Int64> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToTemplateParamSetIDEFixed
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -Fixed -IDE -LUN <Byte> -VirtualHardDiskSizeMB <Int64> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToTemplateParamSetSCSIDynamic
New-SCVirtualDiskDrive -Bus <Byte> -Dynamic -FileName <String> -LUN <Byte> -SCSI -VirtualHardDiskSizeMB <Int64> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToTemplateParamSetSCSIFixed
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -Fixed -LUN <Byte> -SCSI -VirtualHardDiskSizeMB <Int64> -VMTemplate <Template> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToVMParamSetIDEDynamic
New-SCVirtualDiskDrive -Bus <Byte> -Dynamic -FileName <String> -IDE -LUN <Byte> -VirtualHardDiskSizeMB <Int64> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToVMParamSetIDEFixed
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -Fixed -IDE -LUN <Byte> -VirtualHardDiskSizeMB <Int64> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToVMParamSetSCSIDynamic
New-SCVirtualDiskDrive -Bus <Byte> -Dynamic -FileName <String> -LUN <Byte> -SCSI -VirtualHardDiskSizeMB <Int64> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newToVMParamSetSCSIFixed
New-SCVirtualDiskDrive -Bus <Byte> -FileName <String> -Fixed -LUN <Byte> -SCSI -VirtualHardDiskSizeMB <Int64> -VM <VM> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Parameter Set: newVirtualDiskDriveDifferencing
New-SCVirtualDiskDrive -Bus <Byte> -Differencing -FileName <String> -LUN <Byte> -ParentVirtualHardDiskPath <String> [-BootVolume] [-CreateDiffDisk <Boolean> ] [-IDE] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Path <String> ] [-PROTipID <Guid]> ] [-ReturnImmediately] [-RunAsynchronously] [-SCSI] [-StorageClassification <StorageClassification> ] [-SystemVolume] [-VirtualHardDiskFormatType <VHDFormatType> {VHD | VMDK | VHDX} ] [-VM <VM> ] [-VMMServer <ServerConnection> ] [-VolumeType <VolumeType> {None | Boot | System | BootAndSystem} ] [ <CommonParameters>]

Detailed Description

The New-SCVirtualDiskDrive cmdlet creates a virtual disk drive object on a virtual machine deployed on a host managed by Virtual Machine Manager (VMM), or creates a virtual disk drive object on a template in the VMM library.

With System Center 2012 Service Pack 1 (SP1), you can now create a differencing disk by using the Differencing and ParentVirtualHardDiskPath parameters. A differencing disk is a disk associated in a parent-child relationship to another disk that you want to leave intact. You can make changes to the data or operating system on the child disk without affecting the parent disk, so that you can revert changes to the child disk. The child disk must have the same virtual hard disk format as the parent disk (either VHD or VHDX), which you can set with the VirtualHardDiskFormat parameter. See example 6 for a demonstration of how to create a differencing disk and attach it to an existing virtual machine.

A virtual hard disk file (a Windows-based .vhd or .vhdx file or a VMware-based.vmdk file) that is stored on a VMM library share, but is not attached to a virtual disk drive, exists as a standalone object in the library.

A pass-through disk is a disk on a Hyper-V or VMware ESX host that a virtual machine on that host can use as an alternative to using a virtual hard disk. The corresponding term used by VMware for a pass-through disk is Raw Device Mapping, or RDM. The host disk can be either a hard disk on the host or a logical unit on a Storage Area Network (SAN). VMM lets the virtual machine bypass the host's file system and access the pass-through disk directly.

-- Hyper-V. Supports pass-through disks.
-- Hyper-V. Supports converting a pass-through disk to a VHD.
-- VMware ESX. Supports pass-through disks (RDP), but not disk conversion.
-- Citrix XenServer. Does not support pass-through disks.

Note: You cannot create a checkpoint of a pass-through disk because checkpoint creation is designed to work with virtual hard disks.

Parameters

-AnyStorageDisk

Identifies a placeholder parameter that is used to indicate the creation of pass-through disks within a new virtual machine job group.

Aliases

AnyHostDisk

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BootVolume

Indicates that the volume attached to the VirtualDiskDrive is a boot volume.

Aliases

none

Required?

false

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?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CreateDiffDisk<Boolean>

Indicates whether the cmdlet creates a differencing disk.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Differencing

Specifies that the virtual hard disk should be created as a differencing disk.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Dynamic

Specifies that a virtual hard disk can expand dynamically.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FileName<String>

Specifies the file name to use when you rename a virtual hard disk file as you add it to a virtual machine.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Fixed

Specifies that a virtual hard disk is fixed in size.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IDE

Specifies IDE as the bus type to which to attach a virtual disk drive object or a virtual DVD drive object configured on a virtual machine or on a template.

Example format: -IDE -Bus 0 -LUN 1

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

-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?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUser<System.String>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ParentVirtualHardDiskPath<String>

Specifies the path to the parent virtual hard disk to be used when creating a differencing disk.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the destination path for the operation.

Example formats:

Local: -Path "F:\"

UNC: -Path "\\Library\Templates"

Volume GUID: -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"

VMware ESX: -Path "[storage1]\MyVMwareFolderForVMs\MyVM.vmx"

Citrix XenServer: -Path "Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]"

Wildcards are supported for Get- cmdlets and when you specify the UNC path.

Example format:

UNC: -Path "\\VMHostServer\MyVMs\*VM*"

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

-ReturnImmediately

Indicates that control is returned to the calling process immediately, before the job is created.

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

-SCSI

Specifies SCSI as the bus type to which to attach a virtual disk drive object configured on a virtual machine or on a template.

Example format: -SCSI -Bus 0 -LUN 0

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SharedStorage<Boolean>

Indicates whether the object uses shared storage.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StorageClassification<StorageClassification>

Specifies a storage classification object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StorageDisk<StorageDisk>

Specifies a disk on a Hyper-V or VMware ESX host that a virtual machine on that host can use instead of using a virtual hard disk. This disk is referred to as a pass-through disk. The corresponding VMware term is Raw Device Mapping, or RDM. The host disk is either a local hard disk or a logical unit on a Storage Area Network (SAN). VMM lets the virtual machine bypass the host file system and access the pass-through disk directly. The types of host and whether each has pass-through disk support are:

Hyper-V: Supports pass-through disks and supports converting a pass-through disk to a VHD.

VMware ESX: Supports pass-through disks (RDP), but not disk conversion.

Citrix XenServer: Does not support pass-through disks.

Aliases

HostDisk

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SystemVolume

Indicates that the volume attached to the VirtualDiskDrive is a system volume.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UseLocalVirtualHardDisk

Verifies that the VHD file (or files) to be used to create the virtual machine exist and are stored on the destination host.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualHardDisk<StandaloneVirtualHardDisk>

Specifies a virtual hard disk object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualHardDiskFormatType<VHDFormatType>

Specifies the hard disk format type. Valid values are:

-- VHD
-- VHDX
-- VMDK

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualHardDiskSizeMB<Int64>

Specifies, in megabytes (MB), the size of a fixed virtual hard disk file or the maximum possible size of a dynamically expanding virtual hard disk file.

Aliases

Size

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<VM>

Specifies a virtual machine object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMTemplate<Template>

Specifies a VMM template object used to create virtual machines.

Aliases

Template

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VolumeType<VolumeType>

Specifies the volume type for a virtual hard disk. Valid values are:

-- Boot
-- System
-- BootAndSystem
-- None

Aliases

none

Required?

false

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

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.

  • VirtualDiskDrive

Notes

  • This cmdlet requires a VMM virtual hard disk object, which can be retrieved by using the Get-SCVirtualHardDisk cmdlet.

Examples

Example Example 1: Create a virtual disk drive on a template and attach an existing virtual hard disk to the virtual disk drive.

The first command gets the virtual hard disk object named Blank Disk - Small from the VMM library, and then stores the object in the $VHD variable.

The second command gets the virtual machine template object named VMTemplate01 from the library, and then stores it in the $VMTemplate variable.

The last command creates a new virtual disk drive on VMTemplate01 and attaches the virtual hard disk stored in $VHD to the second channel in the second slot of the IDE bus on the virtual disk drive.

PS C:\> $VHD = Get-SCVirtualHardDisk -Name "Blank Disk - Small.vhd"
PS C:\> $VMTemplate = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate01"}
PS C:\> New-SCVirtualDiskDrive -VMTemplate $VMTemplate -IDE -Bus 1 -Lun 1 -VirtualHardDisk $VHD

Example 2: Create a virtual disk drive and add it to an existing virtual machine

The first command gets the virtual machine object named VM01, and then stores the object in the $VM variable.

The second command creates a new dynamic virtual disk drive on the first IDE channel in the second slot of the virtual machine and specifies its size as 19.5 GB.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> New-SCVirtualDiskDrive -VM $VM -Dynamic -Filename "Test" -IDE -Size 20000 -Bus 0 -LUN 1

Example 3: Create a virtual disk drive from an existing VHD and attach it to a new virtual machine

The first command generates a globally unique identifier (GUID), and then stores the GUID string in the variable $JobGroupID. The job group ID functions as an identifier that groups subsequent commands that include $JobGroupID into a single job group.

The second command gets the virtual hard disk object from the VMM library location \\LibraryServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhd and then stores the object in the $VHD variable.

The third command creates a virtual hard disk drive object and assigns the new object to IDE Bus 0 and LUN 1. This command also attaches the virtual hard disk stored in $VHD to the new object. By using the JobGroup parameter, this command will run just before the last command that invokes the JobGroup and associate the new virtual hard drive object with the new virtual machine created in the last command.

The fourth command gets the hardware profile object that contains the string NewHWProfile01 in its name, and then stores the object in the $HwProfile variable.

The fifth command gets the host object named VMHost03 and then stores the host object in the $VMHost variable.

The last command creates a new virtual machine named VM10 using the hardware settings stored in $HWProfile, deploys the virtual machine on VMHost03, and specifies that the virtual machine is not automatically started when the host starts and is put into a saved state when the virtualization service stops. This command uses the JobGroup parameter to indicate that any previous cmdlets that use the same job group ID is run prior to creating the new virtual machine. In this case, the New-SCVirtualDiskDrive cmdlet from the third command creates a virtual disk drive and associates it with the new virtual machine.

PS C:\> $JobGroupID = [Guid]::NewGuid().ToString()
PS C:\> $VHD = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | where {$_.Location -eq "\\LibServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhd"}
PS C:\> New-SCVirtualDiskDrive -IDE -Bus 0 -LUN 1 -JobGroup $JobGroupID -VirtualHardDisk $VHD
PS C:\> $HWProfile = Get-SCHardwareProfile | where {$_.Name -match "NewHWProfile01"}
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost03"
PS C:\> New-SCVirtualMachine -Name "VM10" -Description "New Virtual Machine VM10" -VMMServer "VMMServer01.Contoso.com" -Owner "Contoso\Katarina" -VMHost $VMHost -Path "D:\VirtualMachinePath" -HardwareProfile $HWProfile -JobGroup $JobGroupID -RunAsynchronously -StartAction NeverAutoTurnOnVM -StopAction SaveVM

Example Example 4:. Create a virtual disk drive using a host disk and attach it to an existing virtual machine.:

The first command gets the virtual machine object named VM04, and then stores the object in the $VM variable.

The second command gets the host object named VMHost04, and then stores the object in the $VMHost variable.

The third command gets all storage disk objects on VMHost04 that are pass-through capable, and then stores the objects in the $HostDisk variable. Using the @ symbol and parentheses ensures that the command stores the results in an array, in case the command returns a single object or $Null.

The last command creates a new virtual disk drive object that is connected to a physical host disk on VMHost04. The virtual disk drive is attached to the second slot of the first SCSI bus on VM04. This example assumes the virtual machine already has a SCSI controller.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM04"
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost04.Contoso.com"
PS C:\> $HostDisk = @(Get-SCStorageDisk -VMHost $VMHost | where {$_.IsPassThroughCapable -eq $True})
PS C:\> New-SCVirtualDiskDrive -VM $VM -HostDisk $HostDisk[0] -SCSI -Bus 0 -LUN 1

Example 5: Create a virtual disk drive from an existing VHDX and attach it to an existing virtual machine

The first command gets the virtual hard disk object named Blank Disk - Large.vhdx from the VMM library. and then stores the object in the $VHDX variable.

The second command gets the virtual machine object named VM05, and then stores the object in the $VM variable.

The last command creates a virtual disk drive from Blank Disk - Large.vhdx and attaches the new virtual disk drive to VM05.

PS C:\> $VHDX = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | where {$_.Location -eq "\\LibServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhdx"}
PS C:\> $VM = Get-SCVirtualMachine -Name "VM05"
PS C:\> New-SCVirtualDiskDrive -VM $VM -VirtualHardDisk $VHDX -IDE -Bus 0 -LUN 1

Example 6: Create a differencing disk and attach it to an existing virtual machine

The first command gets the virtual machine object named VM06, and then stores the object in the $VM variable.

The second command creates a differing disk named DiffDisk.vhdx with the specified parent disk, and attaches the differing disk to VM06.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM06"
PS C:\> New-SCVirtualDiskDrive -Bus 1 -LUN 1 -FileName "DiffDisk" -ParentVirtualHardDiskPath "C:\VirtualMachines\ParentDisk01.vhdx" -Differencing -VirtualHardDiskFormat "VHDX" -IDE -VM $VM

Compress-SCVirtualDiskDrive

Convert-SCVirtualDiskDrive

Expand-SCVirtualDiskDrive

Get-SCVirtualDiskDrive

Remove-SCVirtualDiskDrive

Set-SCVirtualDiskDrive

Get-SCVirtualHardDisk

Move-SCVirtualHardDisk

Remove-SCVirtualHardDisk

Set-SCVirtualHardDisk

Get-SCHardwareProfile

Get-SCVirtualMachine

Get-SCVMHost

Get-SCVMTemplate