DellEMC EHC – ‘Onboarding A Local Cluster’ (Part 2)

The following two-part post details how to add an Enterprise Hybrid Cloud (EHC) vSphere Local Cluster, in EHC terms we refer to this cluster type as LC1S (Local Copy on One Site).

There are a number of prerequisites required in advance of running the Onboard Cluster workflow in EHC, namely:

  • Add a Site
  • Add a vCenter
  • Add a Hardware Island

Part 1 addresses the first two prerequisites (Add a Site, Add a vCenter):

DellEMC EHC – ‘Onboarding A Local Cluster’ (Part 1)

The following Part 2 post details how to:

  • Add a Hardware Island
  • Run the Onboard Local Cluster workflow in EHC

Adding A Hardware Island

An EHC hardware island is a set of compute, network and storage resources belonging to one vCenter for example a hardware island may consist of  subset of resources on one VxBlock, a vCenter can accommodate multiple hardware islands. A hardware island can support multiple vSphere clusters. A ViPR vArray can only be associated with a single hardware island. For further information on the EHC hardware island please refer to the EHC Concepts & Architecture Guide.

Begin by logging into the EHC tenant portal as the system administrator with entitlements to the EHC Maintenance catalog items. Navigate to: Catalog -> EHC Configuration -> Hardware Island Maintenance:

EHCCreateHW1 Continue reading

VMware PowerCLI – Adding VMFS Datastore’s

Thank you Cliff, Steve and Luc for helping me out with this task.

After you have created the required LUN’s on your storage array and mapped the LUN’s to your ESXi hosts, at this stage you may use PowerCLI to add these new LUNs as VMFS datastore’s.

1. Connect to vCenter:
Connect-VIServer -Server “vcenter_IP” -User UserName -Password Password

If you need to retreive the Cluster and Host names:
look up the Cluster Name:
Get-Cluster
look up the Host names in the cluster:
Get-Cluster ‘Cluster Name’ | Get-VMHost | Select Name

2. Retrieve the Canonical Name(s):
In order to use the New-Datastore cmdlet we require the ‘Canonical Name’ parameter associated with each LUN. In this example we will use the Get-SCSILun cmd to return the ‘Canonical Name’, Capacity and Runtime name in order for us to match the unique naa with the correct LUN#.

Get-SCSILun -VMhost “YourESXiHostname” -LunType Disk | Select CanonicalName,CapacityGB,runtimename

Runtime

The naa’s and runtime names are returned, but we want to order the output by the runtime names ‘LUN ID’ ‘vmhba1:C0:T0:L#’. Uning the | sort-object runtimename parameter the LUNs are ordered, but the double digit’s are not recognised:

sort-object

I was able to sort the SCSI LUN’s by RuntimeName including the double digit’s ‘vmhba1:C0:T0:L##’ using the following script provided by Luc:

Get-ScsiLun -VMHost “YourESXiHostname” -LunType disk |
Select RuntimeName,CanonicalName,CapacityGB |
Sort-Object -Property {$_.RuntimeName.Split(‘:’)[0],
[int]($_.RuntimeName.Split(‘:’)[1].TrimStart(‘C’))},
{[int]($_.RuntimeName.Split(‘:’)[2].TrimStart(‘T’))},
{[int]($_.RuntimeName.Split(‘:’)[3].TrimStart(‘L’))}

sort-object1

3. Adding the New VMFS Datatore’s:
vSphere PowerCLI provides the New-Datastore cmd to create the VMFS Datastore(s):

New-Datastore -VMHost “YourESXiHostname” -Name ‘VMFS_Datastore_1’ -Path naa.60000xxxxxxxxxxxxxxxxx36 -vmfs
New-Datastore -VMHost “YourESXiHostname” -Name ‘VMFS_Datastore_2’ -Path naa.60000xxxxxxxxxxxxxxxxx42 -vmfs

4. Rescanning the Cluster for the New VMFS Datastores:
To rescan the entire cluster of ESXi host’s for the VMFS volumes added, issue the following PowerCLI cmd to rescan all the ESXi hosts HBA’s:

Get-Cluster -name “YourClusterName” | Get-VMhost | Get-VMHostStorage –RescanAllHBA

5. List all the Newly Created VMFS Datastore’s:
Get-Datastore -VMhost “YourESXiHostname”
Get-Cluster -name “ClusterName” | Get-VMhost | Get-Datastore

******************************************************************************************

Script to Automate Adding VMFS Volumes
Here is a script which Steve Keating kindly helped put together which scans for the Host LUN ID and then attributes the $LUN_ parameter to the ‘Canonical Name’. This greatly simplifies the process of adding large quantities of VMFS datastore’s.

For example if we know the following:
Host LUN ID ‘1’ will equal ‘VMFS_Datastore_1’
Host LUN ID ‘2’ will equal ‘VMFS_Datastore_2’
etc…
The following example script will automatically create four VMFS datastore’s and scan the Hosts HBA’s:

###VMFS_Datastore_1###
$LUN_1 = Get-SCSILun -VMhost YourESXiHostname -LunType Disk | Where-Object {$_.runtimename -like "*L1"} | Select CanonicalName,runtimename
$LUN_1 = $LUN_1 | Select CanonicalName
$LUN_1 = $LUN_1 -replace "@{CanonicalName=", ""
$LUN_1 = $LUN_1 -replace "}", ""
$LUN_1
New-Datastore -VMHost YourESXiHostname -Name VMFS_Datastore_1 -Path $LUN_1 -Vmfs

###VMFS_Datastore_2###
$LUN_2 = Get-SCSILun -VMhost YourESXiHostname -LunType Disk | Where-Object {$_.runtimename -like "*L2"} | Select CanonicalName,runtimename
$LUN_2 = $LUN_2 | Select CanonicalName
$LUN_2 = $LUN_2 -replace "@{CanonicalName=", ""
$LUN_2 = $LUN_2 -replace "}", ""
$LUN_2
New-Datastore -VMHost YourESXiHostname -Name VMFS_Datastore_2 -Path $LUN_2 -Vmfs

###VMFS_Datastore_3###
$LUN_3 = Get-SCSILun -VMhost YourESXiHostname -LunType Disk | Where-Object {$_.runtimename -like "*L3"} | Select CanonicalName,runtimename
$LUN_3 = $LUN_3 | Select CanonicalName
$LUN_3 = $LUN_3 -replace "@{CanonicalName=", ""
$LUN_3 = $LUN_3 -replace "}", ""
$LUN_3
New-Datastore -VMHost YourESXiHostname -Name VMFS_Datastore_3 -Path $LUN_3 -Vmfs

###VMFS_Datastore_4###
$LUN_4 = Get-SCSILun -VMhost YourESXiHostname -LunType Disk | Where-Object {$_.runtimename -like "*L4"} | Select CanonicalName,runtimename
$LUN_4 = $LUN_4 | Select CanonicalName
$LUN_4 = $LUN_4 -replace "@{CanonicalName=", ""
$LUN_4 = $LUN_4 -replace "}", ""
$LUN_4
New-Datastore -VMHost YourESXiHostname -Name VMFS_Datastore_4 -Path $LUN_4 -Vmfs

###Scan Cluster Hosts HBA’s###
Get-Cluster -name "YourClusterName" | Get-VMhost | Get-VMHostStorage –RescanAllHBA