You can add a VASA provider to a vCenter Server system and create a storage policy.
Prerequisites
- Verify that you are connected to a vCenter Server system.
- Verify that the datastore is mounted to the ESXi host.
Procedure
- Add a VASA provider to the vCenter Server system.
$script:vasProvider = New-VasaProvider -Name 'name' -Url 'URL' -Username 'user_name' -Password 'password' -Description 'description' -Force
- Get all SPBM capabilities exposed by the registered VASA provider.
- Create a new SPBM rule with the exposed capabilities of the registered VASA provider.
$rule = New-SpbmRule -Capability $capability -Value $value
- Create a new SPBM rule set.
New-SpbmRuleSet -Name $ruleset -AllofRules @(($rule))
- Create a storage policy.
New-SpbmStoragePolicy -Name $storagepolicy -RuleSet $ruleset
- Refresh the VASA provider registered with the vCenter Server system.
$provider = Get-VasaProvider -Name $providername -Refresh
- Verify the VASA storage array.
$vasaStorageArray = Get-VasaStorageArray -Provider $vasaProvider -Server $script:vcsrv
- Refresh the VASA provider registered with the vCenter Server system.
$provider = Get-VasaProvider -Name $providername -Refresh
- Get the VASA provider registered with the vCenter Server system.
$vasaProvider = Get-VasaProvider -Name $providername
- (Optional) Remove the VASA provider.
Remove-VasaProvider -Provider $provider -Confirm:$false
- (Optional) Verify that the VASA provider is removed.
$provider = Get-VasaProvider -Name $providername