VMware Cloud Community
nicholas1982
Hot Shot
Hot Shot
Jump to solution

Get VSAN Datastore Default Storage Policy

Hi guys,

Has anyone been able to get the default storage policy assigned to a VSAN datastore via powercli?

Nicholas
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I don't think that 'compatible' necessarily means that the storage policy is assigned.

Afaik, it says that the policy could be assigned to that datastore.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

Isn't this returning anything for you?

PS: I tested that's in PowerCLI 6.5.2

Get-SpbmStoragePolicy -Name 'vSAN Default Storage Policy'


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

nicholas1982
Hot Shot
Hot Shot
Jump to solution

Hi Luc,

Sorry I should have been more specific. We have many vsan clusters each with a vsanDatastore. We also have custom Storage Policies that should replace "Virtual SAN Default Storage Policy" as the default. I basically need to list all datastores and their Default Storage Policy. See attached screenshot.

Nicholas
Reply
0 Kudos
nicholas1982
Hot Shot
Hot Shot
Jump to solution

Get-SpbmCompatibleStorage

I thought this would do the trick but doesn't seem to work in my environment

Nicholas
Reply
0 Kudos
nicholas1982
Hot Shot
Hot Shot
Jump to solution

The best I can get is this, unfortunetely I can't do the reverse like Get-SpbmCompatibleStorage -CandidateStorage vsanDatastore to retrieve the Policy as the -StoragePolicy Parameter is required.

PS C:\Windows\system32> Get-SpbmCompatibleStorage -StoragePolicy FTT1

Name                               FreeSpaceGB      CapacityGB

----                               -----------      ----------

vsanDatastore                           56.887          59.977

PS C:\Windows\system32> Get-SpbmCompatibleStorage -StoragePolicy FTT1 -CandidateStorage vsanDatastore

Name                               FreeSpaceGB      CapacityGB

----                               -----------      ----------

vsanDatastore                           56.887          59.977

Nicholas
Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

I don't think that 'compatible' necessarily means that the storage policy is assigned.

Afaik, it says that the policy could be assigned to that datastore.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
nicholas1982
Hot Shot
Hot Shot
Jump to solution

yep just realised that as I saw your reply, its just means it compatible :smileysilly:

Nicholas
Reply
0 Kudos