Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (41 sloc) 1.89 KB
#The EQL Powershell Extension is required - https://eqlsupport.dell.com/support/download_file.aspx?id=3336
#The Nimble Powershell Module is required - https://infosight.nimblestorage.com/InfoSight/media/software/active/15/49/Nimble_PowerShell_ToolKit_1.0.0.zip
#Nick Shores 8-1-17
#Change paramaters below to match your enviornment
$vcenter = 192.168.0.46
$vcenteruser = yourusername
$vcenterpass = your vcenter password
$EqlCred = Get-Credential
$NimbleCred = Get-Credential
$nimblemgmt = 192.168.0.66
$eqlmgmt = 192.168.0.81
#Import Modules
Import-Module -Name 'C:\Program Files\EqualLogic\bin\EqlPSTools.dll'
import-module -Name 'NimblePowerShellToolKit'
#Connect to dependencies
connect-viserver -server $vcenter -User $vcenteruser -Password $vcenterpass
Connect-Eqlgroup -GroupAddress $eqlmgmt -Credential $EqlCred
Connect-NSGroup -group $nimblemgmt -credential $NimbleCred
#Get list of EQL Volumes to create
write-host 'Getting EQL Volumes...'
$eqlvolume = Get-EqlVolume
$volumestats = $eqlvolume | select VolumeName,VolumeSize
write-host "$volumestats"
Write-Host "Creating $eqlvolume.count New Volumes - Continue? "
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
#On nimble, create each volume
#TODO - Figure out how to set chap / initator access
foreach ($volume in $eqlvolume) {
new-nsvolume -name $volume.VolumeName -size $volume.VolumeSizeMB -multi_initiator $true
}
Get-NSVolume | select name-size
write-host "Creating Datastores"
#Find nimble LUN's / create new datastores
$id = Get-ScsiLun -vmhost * | Get-ScsiLunPath | ? {($_.Sanid -like '*nimble*') -and ($_.State -eq 'Active')}
foreach ($lun in $id){
$name = $lun.sanid -replace '.*?:(.+?)-.*','$1'
new-datastore -Name $name -path $lun.ScsiCanonicalName -vmhost *
}
#Rescan Hosts
Get-VMHostStorage -VMHost * -RescanAllHBA | Out-Null
write-host "Complete!"
You can’t perform that action at this time.