New-IscsiVirtualDisk
New-IscsiVirtualDisk
Creates an iSCSI virtual disk with the specified file path and size.
구문
Parameter Set: Dynamic
New-IscsiVirtualDisk [-Path] <String> [-SizeBytes] <UInt64> [-BlockSizeBytes <UInt32> ] [-ComputerName <String> ] [-Credential <PSCredential> ] [-Description <String> ] [-LogicalSectorSizeBytes <UInt32> ] [-PhysicalSectorSizeBytes <UInt32> ] [ <CommonParameters>]
Parameter Set: Differencing
New-IscsiVirtualDisk [-Path] <String> [[-SizeBytes] <UInt64> ] -ParentPath <String> [-BlockSizeBytes <UInt32> ] [-ComputerName <String> ] [-Credential <PSCredential> ] [-Description <String> ] [-PhysicalSectorSizeBytes <UInt32> ] [ <CommonParameters>]
Parameter Set: Fixed
New-IscsiVirtualDisk [-Path] <String> [-SizeBytes] <UInt64> -UseFixed [-BlockSizeBytes <UInt32> ] [-ComputerName <String> ] [-Credential <PSCredential> ] [-Description <String> ] [-DoNotClearData] [-LogicalSectorSizeBytes <UInt32> ] [-PhysicalSectorSizeBytes <UInt32> ] [ <CommonParameters>]
자세한 설명
The New-IscsiVirtualDisk cmdlet creates a new iSCSI Virtual Hard Disk (VHDX) object with the specified file path and size. After the iSCSI VHDX object has been created, the virtual disk can be assigned to an iSCSI target. Once a virtual disk has been assigned to a target, and an initiator connects to that target, the iSCSI initiator can then access the virtual disk after the initiator connects to the target.
If the virtual hard disk file path does not exist, then a new VHDX file will then be created.
If the VHDX file path exists, then the server will return an error. Use the Import-IscsiVirtualDisk cmdlet to import existing virtual hard disks.
If an error is displayed during the creation of the virtual disk, please check the following conditions:
-- An absolute file path must be specified for the Path and ParentPath parameters.
-- The virtual disk file name must have a .vhdx file extension.
-- The VHDX file cannot be a network file, or be in a compressed, sparse, or transacted folder.
매개 변수
-BlockSizeBytes<UInt32>
Specifies the block size, in bytes, for the VHDX. For fixed VHDX, if the value of the SizeBytes parameter is less than 32 MB, the default size if 2 MB. Otherwise, the default value is 32 MB. For dynamic VHDX, the default size is 2 MB. For differencing VHDX, the default size is the parent BlockSize.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ComputerName<String>
Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.
Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.
If you do not specify a value for this parameter, the cmdlet uses the local computer.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Credential<PSCredential>
Specifies the credentials when connecting to a remote computer.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Description<String>
Specifies the description for the iSCSI virtual disk.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-DoNotClearData
Indicates that the cmdlet does not clear the fixed VHDX. Because failing to clear data can reveal pre-existing data, we do not recommend this option.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-LogicalSectorSizeBytes<UInt32>
Specifies the logical sector size, in bytes, for the VHDX. 이 매개 변수에 허용되는 값은 다음과 같습니다. 512 and 4096. The default value is 512.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
512 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ParentPath<String>
Specifies the parent virtual disk path if the VHDX is a differencing disk.
별칭 |
없음 |
필수 여부 |
true |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Path<String>
Specifies the path of the VHDX file that is associated with the iSCSI virtual disk.
If the VHDX file path does not exist, then a new VHDX file will then be created.
If the virtual hard drive file path exists, then the server will return an error. Use the Import-IscsiVirtualDisk cmdlet to import existing virtual hard drives.
별칭 |
DevicePath |
필수 여부 |
true |
위치 |
1 |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-PhysicalSectorSizeBytes<UInt32>
Specifies the physical sector size, in bytes, for the VHDX. 이 매개 변수에 허용되는 값은 다음과 같습니다. 512 and 4096. The default value is 4096.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
4096 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-SizeBytes<UInt64>
Specifies the size, in bytes, of the iSCSI virtual disk.
별칭 |
Size |
필수 여부 |
true |
위치 |
2 |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-UseFixed
Indicates that the cmdlet creates a fixed VHDX.
별칭 |
Fixed |
필수 여부 |
true |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).
입력
입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.
- None
출력
출력 유형은 cmdlet이 내보내는 개체의 유형입니다.
- Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk
예제
EXAMPLE 1
This example creates a fixed VHDX with 10GB in size.
PS C:\> New-IscsiVirtualDisk –Path "E:\temp\test.vhdx" -Size 10GB
EXAMPLE 2
This example creates a differencing VHDX, with the parent path E:\temp\test.vhdx and the differencing VHDX path is E:\temp\child\diff.vhdx.
PS C:\> New-IscsiVirtualDisk -ParentPath "E:\temp\test.vhdx" -Path "E:\temp\child\diff.vhdx"
EXAMPLE 3
This example creates a fixed VHDX with the size 10GB at E:\temp\test.vhdx on the computer named iscsisvr.
PS C:\> New-IscsiVirtualDisk –Path "E:\temp\test.vhdx" -Size 10GB -ComputerName "iscsisvr"
EXAMPLE 4
This example creates a VHDX with the size 20MB. This VHDX will not be saved, the VHDX will be lost if the wintarget service is restarted or the system is restarted.
PS C:\> New-IscsiVirtualDisk –Path ramdisk:test.vhdx –Size 20MB