DSCResources/DSC_iSCSIVirtualDisk/en-US/about_iSCSIVirtualDisk.help.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.NAME
    iSCSIVirtualDisk
 
.DESCRIPTION
    This resource is used to create or remove Virtual Disks for use by iSCSI Targets.
 
.PARAMETER Path
    Key - String
    Specifies the path of the VHDX file that is associated with the iSCSI virtual disk.
 
.PARAMETER Ensure
    Write - String
    Allowed values: Present, Absent
    Ensures that Virtual Disk is either Absent or Present.
 
.PARAMETER DiskType
    Write - String
    Allowed values: Dynamic, Fixed, Differencing
    Specifies the type of the VHDX.
 
.PARAMETER SizeBytes
    Write - UInt64
    Specifies the size, in bytes, of the iSCSI virtual disk.
 
.PARAMETER BlockSizeBytes
    Write - UInt32
    Specifies the block size, in bytes, for the VHDX.
 
.PARAMETER LogicalSectorSizeBytes
    Write - UInt32
    Allowed values: 512, 4096
    Specifies the logical sector size, in bytes, for the VHDX.
 
.PARAMETER PhysicalSectorSizeBytes
    Write - UInt32
    Allowed values: 512, 4096
    Specifies the physical sector size, in bytes, for the VHDX.
 
.PARAMETER Description
    Write - String
    Specifies the description for the iSCSI virtual disk.
 
.PARAMETER ParentPath
    Write - String
    Specifies the parent virtual disk path if the VHDX is a differencing disk.
 
.EXAMPLE 1
 
This example installs the iSCSI Target Server, creates two
iSCSI Virtal Disks and then a new iSCSI Target called Cluster
with the two Virtual Disks assigned. The iSCSI target will accept
connections from cluster01.contoso.com, cluster02.contoso.com
or cluster03.contoso.com.
 
Configuration iSCSIServerTarget_ConfigureVirtualDisk_Config
{
    Import-DscResource -Module iSCSIDsc
 
    Node localhost
    {
        WindowsFeature iSCSITargetServerInstall
        {
            Ensure = "Present"
            Name = "FS-iSCSITarget-Server"
        }
 
        iSCSIVirtualDisk iSCSIClusterVDisk01
        {
            Ensure = 'Present'
            Path = 'D:\iSCSIVirtualDisks\ClusterVdisk01.vhdx'
            DiskType = 'Dynamic'
            SizeBytes = 20GB
            Description = 'Cluster Virtual Disk 01'
            DependsOn = "[WindowsFeature]ISCSITargetServerInstall"
        } # End of iSCSIVirtualDisk Resource
 
        iSCSIVirtualDisk iSCSIClusterVDisk02
        {
            Ensure = 'Present'
            Path = 'D:\iSCSIVirtualDisks\ClusterVdisk02.vhdx'
            DiskType = 'Dynamic'
            SizeBytes = 10GB
            Description = 'Cluster Virtual Disk 02'
            DependsOn = "[WindowsFeature]ISCSITargetServerInstall"
        } # End of iSCSIVirtualDisk Resource
 
        iSCSIServerTarget iSCSIClusterTarget
        {
            Ensure = 'Present'
            TargetName = 'Cluster'
            InitiatorIds = 'iqn.1991-05.com.microsoft:cluster01.contoso.com','iqn.1991-05.com.microsoft:cluster02.contoso.com','iqn.1991-05.com.microsoft:cluster03.contoso.com'
            Paths = 'D:\iSCSIVirtualDisks\ClusterVdisk01.vhdx','D:\iSCSIVirtualDisks\ClusterVdisk02.vhdx'
            iSNSServer = 'isns.contoso.com'
            DependsOn = "[iSCSIVirtualDisk]iSCSIClusterVDisk01","[iSCSIVirtualDisk]iSCSIClusterVDisk01"
        } # End of iSCSIServerTarget Resource
    } # End of Node
} # End of Configuration