NAME

Serve-DcsVirtualDisk

SYNOPSIS

Serves a virtual disk to a client, host group, or server. Snapshots and rollbacks are virtual disks and can also be served. This operation can also be performed on a virtual disk group.

SYNTAX

Serve-DcsVirtualDisk   -Machine <String>   -VirtualDisk <Object>   [ -StartingLun <UInt64> ]   [ -EnableRedundancy]   [ -Connection <String> ]   [ -PipelineVariable <String> ]

Serve-DcsVirtualDisk   -Machine <String>   -VirtualDiskGroup <String>   [ -StartingLun <UInt64> ]   [ -EnableRedundancy]   [ -Connection <String> ]   [ -PipelineVariable <String> ]

Serve-DcsVirtualDisk   -Machine <String>   -VirtualDisk <Object>   [ -Server <String> ]   -InitiatorPort <String>   -TargetPort <String>   [ -LUN <UInt64> ]   [ -Connection <String> ]   [ -PipelineVariable <String> ]

Serve-DcsVirtualDisk   -VirtualDisk <Object>   -VirtualDiskGroup <String>   -HostGroup <String>   [ -EnableRedundancy]   [ -Connection <String> ]   [ -PipelineVariable <String> ]

DESCRIPTION

Serves a virtual disk to a client, host group or server. Snapshots and rollbacks are virtual disks and can also be served. This operation can also be performed on a virtual disk group. For front-end non-redundant paths, the initiator and target paths can be specified. If paths are not specified, virtual disks will be served according to the standard software guidelines.

PARAMETERS

-Machine<String>
Computer name or ID that identifies a server or client (host) that will be served the virtual disk. The computer name for a machine must be unique or the names must be fully qualified.

Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-VirtualDisk<Object>
VirtualDiskData object, name, or ID that identifies a virtual disk to serve. Snapshots and rollbacks are virtual disks and can also be served if specified with this parameter.

Required: true
Position: named
Default value:
Accept pipeline input: true (ByValue)
Accept wildcard characters: false

-StartingLun<UInt64>
Use this parameter to serve virtual disks beginning with the specified LUN number. The LUNs will be assigned using consecutive numbers beginning with the starting LUN. A sufficient number of consecutive LUNs must be available to complete the operation. Valid values are 0 - 254.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-EnableRedundancy<SwitchParameter>
Specify this parameter to create redundant paths. Redundant paths creates two paths from the specified machine to each server. The server must have two ports (Fibre Channel or iSCSI) with the front-end role enabled (see Set-DcsServerPortProperties). Port paths are automatically selected.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-Connection<String>
Alias of the connection to the server group. If not specified, the default connection will be used.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-PipelineVariable<String>

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-VirtualDiskGroup<String>
VirtualDiskGroupData object, name or ID that identifies the virtual disk group to serve.

Required: true
Position: named
Default value:
Accept pipeline input: true (ByValue)
Accept wildcard characters: false

-Server<String>
Computer name, or ID that identifies a server. Computer names must be unique or the names must be fully qualified.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-InitiatorPort<String>
Name, address, or ID of the initiator port when specifying the front-end path.

Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-TargetPort<String>
Name, address, or ID of the target port when specifying the front-end path.

Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-LUN<UInt64>
The number to assign to the logical unit (LUN). If not specified, the next available LUN will be assigned.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-HostGroup<String>
Name or ID that identifies the host group, if serving to a host group.

Required: true
Position: named
Default value:
Accept pipeline input: true (ByValue)
Accept wildcard characters: false

INPUTS

VirtualDiskData : Object that identifies the virtual disk.

OUTPUTS

VirtualLogicalUnitData : Object that identifies and describes the virtual logical unit (path to the logical disk on a server). One object is returned for every path created.

NOTES

Also see related cmdlets Unserve-DcsVirtualDisk, Add-DcsvCenterDataStore, Set-DcsHypervisorHost. See Add-DcsVirtualLogicalUnit (-MappingType) to add mirror paths to virtual disks.

EXAMPLES


-------------- Example 1 Serves a mirrored virtual disk specified by name --------------
Serve-DcsVirtualDisk -Machine Host3 -VirtualDisk "Virtual disk 1"
		

Serves the mirrored virtual disk named "Virtual disk 1" to the machine named "Host3".

LogicalDiskId:LD:84972D6B-7E71-4616-BDA1-57ECEAF3FFC4_V.{91e63003-ca79-11e0-a962-00155d11e921}-00000015
VirtualTargetDeviceId:4e175a78-f623-4ae1-911c-e94b6a370ce8
Lun:0
Access:ReadWrite
Type:Client
Preferred:True
Enabled:True
Id:ee3688c9-05fc-45cf-b915-e0f3f9270581
Caption:iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV1 | LUN 0
ExtendedCaption:iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV1 | LUN 0
Internal:False
   
LogicalDiskId:LD:C553D471-3527-47EC-9326-D53E04204F2B_V.{9437d954-ca79-11e0-857f-00155d11e923}-0000000C
VirtualTargetDeviceId:453e5fbe-56f0-43be-ab37-f59bb95d18e8
Lun:0
Access:ReadWrite
Type:Client
Preferred:False
Enabled:True
Id:616e63a8-b2f7-4db3-a6b3-b14b1ad3421e
Caption:iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV2 | LUN 0
ExtendedCaption:iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV2 | LUN 0
Internal:False
   

-------------- Example 2 Creates multiple virtual disks and serves them to a host using a starting LUN --------------
Add-DcsVirtualDisk -Size 50GiB -Count 5 -FirstServer StorageSvr001 -SecondServer StorageSvr002 -FirstPool "Disk pool 1" -SecondPool "Disk pool 2" -EnableRedundancy | Serve-DcsVirtualDisk -Machine HostVM1 -StartingLun 20
		

The cmdlet Add-DcsVirtualDisk is invoked to create five mirrored virtual disk with a size of "50 GiB" from pools on servers "StorageSvr001" and "StorageSvr002". The virtual disks are created with redundant mirror paths. The VirtualDiskData objects obtained are piped to Serve-DcsVirtualDisk. The virtual disks are served to the machine named "Host3" beginning with the LUN "20".

LogicalDiskId:4f668b4c-8185-47f0-94da-31d9745b93b2
VirtualTargetDeviceId:0faf1802-5b83-4a6d-849e-947a5017e504
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-285539104fd542e5b4d162f45d9e2e6f
Lun:20
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5355
Id:098a9a59-2a75-4c60-a8bf-cae2acc4c63c
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 20
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 20
Internal:False
   
LogicalDiskId:67ba5af5-ed4b-4dab-927a-323e7504a3a4
VirtualTargetDeviceId:861183bc-3bac-4fe3-87a6-aa5d845b25b9
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-285539104fd542e5b4d162f45d9e2e6f
Lun:20
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5356
Id:322c4566-7b67-4e78-a3e2-3bc1190c6769
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 20
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 20
Internal:False
   
LogicalDiskId:1abe197c-896a-4aa2-a5e1-c7868f22b2ae
VirtualTargetDeviceId:0faf1802-5b83-4a6d-849e-947a5017e504
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-56cbba5287164d05bd450c7d071e994d
Lun:21
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5463
Id:9912b687-ca9c-400e-ba09-b6de2b5e6a3f
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 21
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 21
Internal:False
   
LogicalDiskId:a19e4ac6-71ec-4ff1-884c-f3fac5f3cc6e
VirtualTargetDeviceId:861183bc-3bac-4fe3-87a6-aa5d845b25b9
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-56cbba5287164d05bd450c7d071e994d
Lun:21
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5464
Id:5c4b3945-233c-4550-b2da-8f927819a3bd
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 21
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 21
Internal:False
   
LogicalDiskId:d39d8c75-f8f7-4886-9fea-f66c15870580
VirtualTargetDeviceId:0faf1802-5b83-4a6d-849e-947a5017e504
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-d6a393f831e34a13948d932b31a0d67b
Lun:22
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5573
Id:bbd34972-4813-4981-ad75-e3e670170034
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 22
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 22
Internal:False
   
LogicalDiskId:acb0a564-ba1f-47a7-bc5f-27c2dae18e56
VirtualTargetDeviceId:861183bc-3bac-4fe3-87a6-aa5d845b25b9
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-d6a393f831e34a13948d932b31a0d67b
Lun:22
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5574
Id:e73e5975-475d-48e5-9050-3d8f27b0b52b
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 22
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 22
Internal:False
   
LogicalDiskId:d622f50a-6a3c-4dc2-9644-a2e77e58645d
VirtualTargetDeviceId:0faf1802-5b83-4a6d-849e-947a5017e504
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-72f943815f744c719c1748291d3b2f42
Lun:23
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5683
Id:1de682a2-a5a3-489e-a87f-7172dc65fe30
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 23
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 23
Internal:False
   
LogicalDiskId:6911a3fe-be67-46ec-b97d-32af688df866
VirtualTargetDeviceId:861183bc-3bac-4fe3-87a6-aa5d845b25b9
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-72f943815f744c719c1748291d3b2f42
Lun:23
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5684
Id:a753a175-932a-4e2d-b355-170bf9aba266
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 23
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 23
Internal:False
   
LogicalDiskId:454f53e1-64bb-4ccc-91be-4f8f56413e11
VirtualTargetDeviceId:0faf1802-5b83-4a6d-849e-947a5017e504
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-a36fa8c7369c4623a3eba72004d34d17
Lun:24
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5793
Id:48b42d33-76ac-4b24-a43c-e568e157a0f7
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 24
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr001 | LUN 24
Internal:False
   
LogicalDiskId:3d43c810-3eb2-4e3d-9b5e-c864bf8cd50f
VirtualTargetDeviceId:861183bc-3bac-4fe3-87a6-aa5d845b25b9
PhysicalDiskId:5909e5ec1dbb460ca2273e6b8c7932ce-a36fa8c7369c4623a3eba72004d34d17
Lun:24
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:5794
Id:c9d669f0-0c85-4e33-b5a5-3422f21bebd2
Caption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 24
ExtendedCaption:iSCSI Port 1 on HostVM1 | Server iSCSI Port 3 on StorageSvr002 | LUN 24
Internal:False
   

-------------- Example 3 Serves a virtual disk using ports specified by name --------------
Serve-DcsVirtualDisk -Machine Host3 -VirtualDisk "Virtual disk 1" -InitiatorPort "iSCSI Port 1" -TargetPort "Server iSCSI Port 3" -Server SSV2
		

Serves the virtual disk named "Virtual disk 1" to the machine named "Host3". The initiator port on Host3 is named "iSCSI Port 1" and the target port on server SSV2 is named "Server iSCSI Port 3". The parameter Server is used to resolve the server because ports of the same name exist on both servers in the server group.

LogicalDiskId:LD:C553D471-3527-47EC-9326-D53E04204F2B_V.{9437d954-ca79-11e0-857f-00155d11e923}-0000000C
VirtualTargetDeviceId:98ccd6a3-33ff-47d6-9301-f9b77dbb2101
Lun:0
Access:ReadWrite
Type:Client
Preferred:False
Enabled:True
Id:f7116ac7-4ea0-4dfb-aff6-5b3a82426af4
Caption:iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV2 | LUN 0
ExtendedCaption:iSCSI Port 1 on Host3 | Server iSCSI Port 3 on SSV2 | LUN 0
Internal:False
   

-------------- Example 4 Serves a virtual disk group to a host group --------------
Serve-DcsVirtualDisk -VirtualDiskGroup "VDGroup1" -HostGroup "HostGroup1"
		

The virtual disk group "VDGroup1" is served to the host group named "HostGroup1". Since no other parameters were specified, the virtual disks are served according to standard guidelines.

LogicalDiskId:caa3ec30-419d-4254-922a-f52e9b21af6f
VirtualTargetDeviceId:85f6c01e-f690-4519-8404-a782d40b9bf3
PhysicalDiskId:4e18b7c089c94eda802f689cd253f80a-0fa6024958424ab9831bf788fdb09f10
Lun:0
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:6119
Id:64e9967a-3198-41be-b5eb-d2cce9df0637
Caption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 3 on SSV1 | LUN 0
ExtendedCaption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 3 on SSV1 | LUN 0
Internal:False
   
LogicalDiskId:54141939-8535-4329-9213-858026eae6ad
VirtualTargetDeviceId:2b6cc2e1-ead7-450b-af4b-de8e448df99e
PhysicalDiskId:4e18b7c089c94eda802f689cd253f80a-0fa6024958424ab9831bf788fdb09f10
Lun:0
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:6120
Id:b206d872-5789-47af-b763-0011ac01f758
Caption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 2 on SSV2 | LUN 0
ExtendedCaption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 2 on SSV2 | LUN 0
Internal:False
   
LogicalDiskId:63d138c3-0362-4569-966e-1ddc9e39ea99
VirtualTargetDeviceId:fff1ede0-c2a8-420b-8912-fbc10f7c314a
PhysicalDiskId:4e18b7c089c94eda802f689cd253f80a-414a212179684f0e801788e9dfeb1c16
Lun:0
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:6121
Id:e68ec1e5-6207-4c27-accd-91ddcdf35d63
Caption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 1 on SSV1 | LUN 0
ExtendedCaption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 1 on SSV1 | LUN 0
Internal:False
   
LogicalDiskId:c8870e88-6ea3-4644-97f4-117b27129909
VirtualTargetDeviceId:a359d56d-a93d-4da1-85f8-a8987f75a4a1
PhysicalDiskId:4e18b7c089c94eda802f689cd253f80a-414a212179684f0e801788e9dfeb1c16
Lun:0
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:6122
Id:9b794a2e-6fc6-4988-861e-6b3b8dd984a8
Caption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 4 on SSV2 | LUN 0
ExtendedCaption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 4 on SSV2 | LUN 0
Internal:False
   
LogicalDiskId:0ebc035f-fa28-4ab2-8de9-d8a4e8bbdcae
VirtualTargetDeviceId:7866941b-4e0a-4026-8db6-e9e477f75cb3
PhysicalDiskId:4e18b7c089c94eda802f689cd253f80a-ca28e270349c426ca891ab6a7578467e
Lun:0
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:6123
Id:54113d22-6db8-42e4-92e2-6bb48140d677
Caption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 4 on SSV1 | LUN 0
ExtendedCaption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 4 on SSV1 | LUN 0
Internal:False
   
LogicalDiskId:4ae34a27-2356-432e-8dab-455b9dbbff6a
VirtualTargetDeviceId:989b3a01-a913-4a8b-9761-f62bd3417aaf
PhysicalDiskId:4e18b7c089c94eda802f689cd253f80a-ca28e270349c426ca891ab6a7578467e
Lun:0
Access:ReadWrite
Type:Client
Preferred:NotSet
Enabled:True
Sequencenumber:6124
Id:e4d057f1-30d2-4a82-97b2-e017cfa7718b
Caption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 3 on SSV2 | LUN 0
ExtendedCaption:iSCSI Port 1 on HostVM2 | Server iSCSI Port 3 on SSV2 | LUN 0
Internal:False