When a number of FlashArrays’ VASA providers are to be registered, using a PowerCLI script may be preferable. The VMware PowerCLI cmdlet called New-VasaProvider registers VASA providers with vCenter (vSphereView 6).
New-VasaProvider Cmdlet
New-VasaProvider -Name "MyProvider" -Username "UserName" -Password "Password" -Url "MyUrl"
|
New-VasaProvider Cmdlet PowerShell Core Example
PS /Users/alex.carver> $vc_creds = Get-Credential
PowerShell credential request
Enter your credentials.
User: purecloud\alex
Password for user purecloud\alex:
PS /Users/alex.carver> $vasa_creds = Get-Credential
PowerShell credential request
Enter your credentials.
User: vvol-admin
Password for user vvol-admin:
PS /Users/alex.carver> connect-viserver -Server 10.21.202.95 -Credential $vc_creds
Name Port User
---- ---- ----
10.21.202.95 443 PURECLOUD\alex
PS /Users/alex.carver> New-VasaProvider -Name 'sn1-x70-c05-36-ct0' -Credential $vasa_creds -Url 'https://10.21.149.22:8084'
Name Status VasaVersion LastSyncTime Namespace Url
---- ------ ----------- ------------ --------- ---
sn1-x70-c05-36-ct0 online 3.0 11/5/2020 1:28:50 PM com.purestorage https://10.21.149.22:8084
PS /Users/alex.carver> New-VasaProvider -Name 'sn1-x70-c05-36-ct1' -Credential $vasa_creds -Url 'https://10.21.149.23:8084'
Name Status VasaVersion LastSyncTime Namespace Url
---- ------ ----------- ------------ --------- ---
|
The output from registering ct1 is expected as ct1 will be the standby provider. Currently PowerCLI only displays the details on Active Storage Providers and not with standby providers.
An additional method with PowerShell would be the New-PfaVasaProvider cmdlet from the Everpure VMware PowerShell Module. This will require having the Everpure PowerShell SDK also installed, but will work with either PowerShell Core or PowerShell. A connection to a vCenter Server and FlashArray will be required to use the New-PfaVasaProvider cmdlet
New-PfaVasaProvider Cmdlet
New-PfaConnection -Endpoint "Management IP" -Credentials (Get-Credential) -DefaultArray -IgnoreCertificate
New-PfaVasaProvider -Flasharray $Global:DefaultFlashArray -Credentials (Get-Credential)
|
New-VasaProvider Cmdlet PowerShell Core Example
PS /Users/alex.carver> Install-Module -Name PureStoragePowerShellSDK
PS /Users/alex.carver>
PS /Users/alex.carver> Install-Module -Name PureStorage.FlashArray.VMware
PS /Users/alex.carver>
PS /Users/alex.carver> New-PfaConnection -Endpoint 10.21.149.21 -Credentials (Get-Credential) -DefaultArray -IgnoreCertificateError
PowerShell credential request
Enter your credentials.
User: vvol-admin
Password for user vvol-admin:
Disposed : False
EndPoint : 10.21.149.21
UserName : vvol-admin
ApiVersion : 1.17
Role : ArrayAdmin
ApiToken : 18e939a3
PS /Users/alex.carver> connect-viserver -Server 10.21.202.95 -Credential (Get-Credential)
PowerShell credential request
Enter your credentials.
User: purecloud\alex
Password for user purecloud\alex:
Name Port User
---- ---- ----
10.21.202.95 443 PURECLOUD\alex
PS /Users/alex.carver> New-PfaVasaProvider -Flasharray $Global:DefaultFlashArray -Credentials (Get-Credential)
PowerShell credential request
Enter your credentials.
User: vvol-admin
Password for user vvol-admin:
Name Status VasaVersion LastSyncTime Namespace Url
---- ------ ----------- ------------ --------- ---
sn1-x70-c05-33-CT0 online 3.0 11/5/2020 5:06:10 PM com.purestorage https://10.21.149.22:8084
|