New-SCVirtualDiskDrive
创建虚拟磁盘驱动器对象。
语法
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-VirtualHardDisk <StandaloneVirtualHardDisk>
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-IDE]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-VirtualHardDisk <StandaloneVirtualHardDisk>
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-SCSI]
[-FileName <String>]
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-VirtualHardDisk <StandaloneVirtualHardDisk>
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-IDE]
[-FileName <String>]
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-VirtualHardDisk <StandaloneVirtualHardDisk>
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-IDE]
[-FileName <String>]
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-VirtualHardDisk <StandaloneVirtualHardDisk>
[-SharedStorage <Boolean>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-SCSI]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-VirtualHardDisk <StandaloneVirtualHardDisk>
[-SharedStorage <Boolean>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-SCSI]
[-FileName <String>]
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
-StorageDisk <StorageDisk>
[-SCSI]
[-FileName <String>]
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-SCSI]
[-Fixed]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-IDE]
-FileName <String>
-Path <String>
[-UseLocalVirtualHardDisk]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-SCSI]
-FileName <String>
-Path <String>
[-UseLocalVirtualHardDisk]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-IDE]
[-Fixed]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
-StorageDisk <StorageDisk>
[-IDE]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-IDE]
[-Dynamic]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VM <VM>
[-SCSI]
[-Dynamic]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
[-VM <VM>]
[-JobGroup <Guid>]
[-SCSI]
[-IDE]
-FileName <String>
[-Path <String>]
-ParentVirtualHardDiskPath <String>
[-Differencing]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-SCSI]
[-Dynamic]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-IDE]
[-Dynamic]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-AnyStorageDisk]
[-SCSI]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-AnyStorageDisk]
[-IDE]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-IDE]
[-Fixed]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-VMTemplate <Template>
[-SCSI]
[-Fixed]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
-StorageDisk <StorageDisk>
[-SCSI]
[-FileName <String>]
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
-StorageDisk <StorageDisk>
[-IDE]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-SCSI]
[-Fixed]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-IDE]
[-Dynamic]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-SCSI]
[-Dynamic]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-AnyStorageDisk]
[-SCSI]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-IDE]
[-Fixed]
-VirtualHardDiskSizeMB <Int64>
-FileName <String>
[-Path <String>]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-AnyStorageDisk]
[-IDE]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-SCSI]
-FileName <String>
-Path <String>
[-UseLocalVirtualHardDisk]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVirtualDiskDrive
[-VMMServer <ServerConnection>]
-Bus <Byte>
-LUN <Byte>
[-VirtualHardDiskFormatType <VHDFormatType>]
[-CreateDiffDisk <Boolean>]
-JobGroup <Guid>
[-IDE]
-FileName <String>
-Path <String>
[-UseLocalVirtualHardDisk]
[-BootVolume]
[-SystemVolume]
[-VolumeType <VolumeType>]
[-StorageClassification <StorageClassification>]
[-StorageQoSPolicy <StorageQoSPolicy>]
[-ReturnImmediately]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
说明
New-SCVirtualDiskDrive cmdlet 在由 Virtual Machine Manager (VMM) 托管的主机上部署的虚拟机上创建虚拟磁盘驱动器对象,或在 VMM 库中的模板上创建虚拟磁盘驱动器对象。
在 System Center 2019 中,可以使用 不同的和ParentVirtualHardDiskPath 参数创建差异磁盘。 差异磁盘是与要保持不变的另一个磁盘的父子关系中关联的磁盘。 可以在子磁盘上更改数据或操作系统,而不会影响父磁盘。 可以将更改还原到子磁盘。 子磁盘必须与父磁盘(VHD 或 VHDX)具有相同的虚拟硬盘格式。 可以使用 VirtualHardDiskFormat 参数设置格式。
存储在 VMM 库共享上但未附加到虚拟磁盘驱动器的虚拟硬盘文件作为库中的独立对象存在。 它可以是基于 Windows 的 .vhd 或 .vhdx 文件或基于 VMware 的 .vmdk 文件。
直通磁盘是 Hyper-V 或 VMware ESX 主机上的磁盘,该主机上的虚拟机可以使用,而不是使用虚拟硬盘。 相应的 VMware 术语是原始设备映射 (RDM) 。 主机磁盘可以是本地硬盘或存储区域网络 (SAN) 上的逻辑单元。 VMM 允许虚拟机绕过主机文件系统并直接访问直通磁盘。 Hyper-V 主机支持直通磁盘,以及将直通磁盘转换为 VHD。 VMware ESX 主机支持直通磁盘,但不支持磁盘转换。 Citrix XenServer 主机不支持直通磁盘。
无法创建直通磁盘的检查点,因为检查点创建旨在使用虚拟硬盘。
示例
示例 1:在模板上创建虚拟磁盘驱动器并附加现有的虚拟硬盘
PS C:\> $VHD = Get-SCVirtualHardDisk -Name "Blank Disk - Small.vhd"
PS C:\> $VMTemplate = Get-SCVMTemplate | Where-Object {$_.Name -Eq "VMTemplate01"}
PS C:\> New-SCVirtualDiskDrive -VMTemplate $VMTemplate -IDE -Bus 1 -Lun 1 -VirtualHardDisk $VHD
第一个命令使用 Get-SCVirtualHardDisk cmdlet 从 VMM 库中获取名为 Blank Disk - Small 的虚拟硬盘对象。 该命令将该对象存储在$VHD变量中。
第二个命令使用 Get-SCVMTemplate cmdlet 从库中获取名为 VMTemplate01 的虚拟机模板对象。 该命令将该对象存储在$Template变量中。
最后一个命令在 VMTemplate01 上创建虚拟磁盘驱动器。 该命令会将存储在$VHD中的虚拟硬盘附加到虚拟磁盘驱动器上 IDE 总线的第二个槽中的第二个通道。
示例 2:创建虚拟磁盘驱动器并将其添加到现有虚拟机
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> New-SCVirtualDiskDrive -VM $VM -Dynamic -FileName "Test" -IDE -Size 20000 -Bus 0 -LUN 1
第一个命令使用 Get-SCVirtualMachine cmdlet 获取名为 VM01 的虚拟机对象。 该命令将该对象存储在$VM变量中。
第二个命令在虚拟机的第二个槽的第一个 IDE 通道上创建动态虚拟磁盘驱动器。 该命令将其大小指定为 19.5 GB。
示例 3:从现有 VHD 创建虚拟磁盘驱动器并将其附加到新虚拟机
PS C:\> $JobGroupID = [Guid]::NewGuid().ToString()
PS C:\> $VHD = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | Where-Object {$_.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-Object {$_.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
第一个命令生成 GUID,并将其存储为$JobGroupID变量中的字符串。 作业组 ID 充当标识符,该标识符将后续命令(包括$JobGroupID)分组到单个作业组中。
第二个命令从 VMM 库位置 \LibraryServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhd 获取虚拟硬盘对象,然后将该对象存储在$VHD变量中。
第三个命令创建虚拟硬盘对象,并将新对象分配给 IDE 总线 0 和 LUN 1。 此命令还会将存储在$VHD中的虚拟硬盘附加到新对象。 通过使用 JobGroup 参数,此命令在调用作业组的最后一个命令之前运行,并将新的虚拟硬盘驱动器对象与在上一命令中创建的新虚拟机相关联。
第四个命令使用 Get-SCHardwareProfile cmdlet 获取包含字符串 NewHWProfile01 的硬件配置文件对象。 该命令将该对象存储在$HwProfile变量中。
第五个命令使用 Get-SCVMHost cmdlet 获取名为 VMHost03 的主机对象。 该命令将主机对象存储在$VMHost变量中。
最后一个命令使用存储在$HWProfile中的硬件设置创建名为 VM10 的虚拟机。 此命令在 VMHost03 上部署虚拟机。 该命令指定在主机启动时不会自动启动虚拟机,并在虚拟化服务停止时处于保存状态。 此命令使用 JobGroup 参数指示在创建虚拟机之前运行使用相同作业组 ID 的任何以前的 cmdlet。 在这种情况下,第三个命令中的 New-SCVirtualDiskDrive cmdlet 将创建虚拟磁盘驱动器并将其与新虚拟机相关联。
示例 4:使用主机磁盘创建虚拟磁盘驱动器并将其附加到现有虚拟机
PS C:\> $VM = Get-SCVirtualMachine -Name "VM04"
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost04.Contoso.com"
PS C:\> $HostDisk = @(Get-SCStorageDisk -VMHost $VMHost | Where-Object {$_.IsPassThroughCapable -Eq $True})
PS C:\> New-SCVirtualDiskDrive -VM $VM -HostDisk $HostDisk[0] -SCSI -Bus 0 -LUN 1
第一个命令获取名为 VM04 的虚拟机对象,然后将该对象存储在$VM变量中。
第二个命令获取名为 VMHost04 的主机对象,然后将该对象存储在$VMHost变量中。
第三个命令获取支持传递的 VMHost04 上的所有存储磁盘对象,然后将这些对象存储在$HostDisk变量中。 使用 @ 符号和括号可确保命令将结果存储在数组中,以防命令返回单个对象或$Null值。
最后一个命令创建连接到 VMHost04 上物理主机磁盘的虚拟磁盘驱动器对象。 虚拟磁盘驱动器连接到 VM04 上的第一个 SCSI 总线的第二个槽。 此示例假定虚拟机已具有 SCSI 控制器。
示例 5:从现有 VHDX 创建虚拟磁盘驱动器并将其附加到现有虚拟机
PS C:\> $VHDX = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | Where-Object {$_.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
第一个命令从 VMM 库获取名为 Blank Disk - Large.vhdx 的虚拟硬盘对象,然后将该对象存储在$VHDX变量中。
第二个命令获取名为 VM05 的虚拟机对象,然后将该对象存储在$VM变量中。
最后一个命令从空白磁盘 - Large.vhdx 创建虚拟磁盘驱动器,并将新的虚拟磁盘驱动器附加到 VM05。
示例 6:创建差异磁盘并将其附加到现有虚拟机
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
第一个命令获取名为 VM06 的虚拟机对象,并将该对象存储在$VM变量中。
第二个命令创建一个名为 DiffDisk.vhdx 的不同磁盘,该磁盘具有指定的父磁盘,并将差异磁盘附加到 VM06。
参数
-AnyStorageDisk
指示此 cmdlet 使用占位符参数,该参数指示在新虚拟机作业组中创建直通磁盘。
Type: | SwitchParameter |
Aliases: | AnyHostDisk |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BootVolume
指示附加到 VirtualDiskDrive 的卷是启动卷。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Bus
指定要将虚拟磁盘驱动器附加到的 IDE 总线或要附加到虚拟磁盘驱动器的 SCSI 总线。
Type: | Byte |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CreateDiffDisk
指示 cmdlet 是否创建差异磁盘。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Differencing
指示虚拟硬盘创建为差异磁盘。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Dynamic
指定虚拟硬盘可以动态扩展。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FileName
指定对虚拟硬盘文件进行重命名并将其添加到虚拟机时所要使用的文件名。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Fixed
指示虚拟硬盘的大小固定。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IDE
指示 IDE 是将虚拟机或模板上配置的虚拟磁盘驱动器对象附加到的总线类型。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
指定在包含相同作业组标识符的最终命令之前作为集运行的一系列命令的标识符。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪和存储作业进度的变量。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LUN
为虚拟磁盘驱动器对象或 SCSI 总线上的虚拟磁盘驱动器对象指定逻辑单元号 (LUN) 。
Type: | Byte |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
指定用户名。 此 cmdlet 代表此参数指定的用户操作。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
指定用户角色。 若要获取用户角色,请使用 Get-SCUserRole cmdlet。 此 cmdlet 代表此参数指定的用户角色进行操作。
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParentVirtualHardDiskPath
指定要用于创建差异磁盘的父虚拟硬盘的路径。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Path
指定虚拟磁盘驱动器的目标路径。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReturnImmediately
指示控件在创建作业之前立即返回到调用进程。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SCSI
指定 SCSI 作为总线类型,用于连接在虚拟机上或模板中配置的虚拟磁盘驱动器对象。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SharedStorage
指示虚拟磁盘驱动器是否使用共享存储。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageClassification
指定存储分类对象。
Type: | StorageClassification |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageDisk
指定 Hyper-V 或 VMware ESX 主机上的磁盘(该主机上的虚拟机可使用该磁盘,而不使用虚拟硬盘)。 此磁盘称为直通磁盘。 相应的 VMware 术语是 RDM) (原始设备映射。 主机磁盘可以是本地硬盘或存储区域网络 (SAN) 上的逻辑单元。 VMM 允许虚拟机绕过主机的文件系统,直接访问传递磁盘。 Hyper-V 主机支持直通磁盘,以及将传递磁盘转换为 VHD。 VMware ESX 主机支持直通磁盘,但不支持磁盘转换。 Citrix XenServer 主机不支持直通磁盘。
Type: | StorageDisk |
Aliases: | HostDisk |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageQoSPolicy
指定存储服务质量 (QoS) 策略。
Type: | StorageQoSPolicy |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SystemVolume
指示附加到 VirtualDiskDrive 的卷是系统卷。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UseLocalVirtualHardDisk
验证用于创建虚拟机的 VHD 文件或文件是否存在并存储在目标主机上。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualHardDisk
指定虚拟硬盘对象。
Type: | StandaloneVirtualHardDisk |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualHardDiskFormatType
指定硬盘格式类型。 有效值为:
- VHD
- VMDK
- VHDX
Type: | VHDFormatType |
Accepted values: | VHD, VMDK, VHDX, VHDS |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualHardDiskSizeMB
指定固定虚拟硬盘文件的大小(以 MB (MB) 为单位),或动态扩展虚拟硬盘文件的最大可能大小。
Type: | Int64 |
Aliases: | Size |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VM
指定一个虚拟机对象。
Type: | VM |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMTemplate
指定用于创建虚拟机的 VMM 模板对象。
Type: | Template |
Aliases: | Template |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VolumeType
指定虚拟硬盘的卷类型。 有效值为:Boot、System、BootAndSystem 和 None。
Type: | VolumeType |
Accepted values: | None, Boot, System, BootAndSystem |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输出
VirtualDiskDrive
此 cmdlet 返回 VirtualDiskDrive 对象。
备注
- 此 cmdlet 需要 VMM 虚拟硬盘对象,可以使用 Get-SCVirtualHardDisk cmdlet 检索该对象。
相关链接
- Compress-SCVirtualDiskDrive
- Convert-SCVirtualDiskDrive
- Expand-SCVirtualDiskDrive
- Get-SCHardwareProfile
- Get-SCVirtualDiskDrive
- Get-SCVirtualHardDisk
- Get-SCVirtualMachine
- Get-SCVMHost
- Get-SCVMTemplate
- Move-SCVirtualHardDisk
- New-SCVirtualMachine
- Remove-SCVirtualDiskDrive
- Remove-SCVirtualHardDisk
- Set-SCVirtualDiskDrive
- Set-SCVirtualHardDisk