We have migrated a couple of our vCenters to VCSA 6.5.
I can't seem to retrieve the storage policies with Get-SpbmStoragePolicy from these vCenters. The cmdlet takes *forever*. After 15 minutes with no output I have just closed the window.. The same command against a vCenter 6.0 U2 works like it should.
Here's my PowerCLI version:
PS C:\> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware PowerCLI 6.5.1 build 5377412
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component 6.5 build 5374323
VMware VimAutomation Core PowerCLI Component 6.5 build 5374329
VMware Storage PowerCLI Component 6.5 build 5374001
Has anyone seen the same?
Did you call the cmdlet with or without any parameters?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, no parameters
Does the cmdlet show the same behaviour when you the -Name parameter with a specific storage policy name?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, same behavior when specifying name
That sounds like a bug.
Can you open an SR?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sure, thanks for your effort LucD
So.. I opened an SR with support. They couldn't replicate it in their lab and gave me the "PowerCLI is community support only"...
I've tried from multiple workstations against multiple VCSA 6.5's, same result. Against our last Windows vCenter server it's working.
Any suggestions on how to proceed / what to check?
Support is wrong (unless things have changed recently), PowerCLI is supported.
They just do not support debugging customer scripts, they do support obvious issues in PowerCLI cmdlets.
I'll forward to the PowerCLI PM.
Perhaps you could provide your SR#
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
#17506092207
Thanks LucD
Do you happen to have any usage of tags within your environment?
There's the potential for this cmdlet to get weird if there are tags which do not have the 'Category' property populated.
Try the following command within your environment: Get-Tag | Where {$_.Category -eq $null}
If you receive any response, that's what the issue is.
Apologies for that, support is incorrect. I'll work with the support engineer to ensure the ticket continues moving towards resolution.
Thanks 🙂
Running that command shows the same behavior as Get-SpbmStoragePolicy. It just sits there doing "nothing"
I have done some digging and found what could be some clues.. There is different behavior on Win10/2016 and 2012 R2, or at least with the Powershell version and in conjunction with Regional settings/date format.
The command will not work on 2012 R2 - PS Version 5.1.14409.1005
I got it to work on a Win10 laptop and a 2016 server with PS version 5.1.14393.1480 and by setting the dateformat to English US. With my default dateformat on Win10/2016 I got an error message like this
I can successfully run the Get-Tag command on that 2016 server against my vCenters and I have no Tags missing Category..
I did some more testing on a different 2016 server only to find that it didn't work...
After more troubleshooting I found out that the actual issue here in addition to the Dateformat was that the InvalidCertificateAction in the PowerCLI configuration was not set (we should of course have used valid certificates...). With that set to Ignore and an English US dateformat I got it to work on 2012 as well.
I'll update the Support Request and hopefully VMware can provide a fix for this.
If anyone is interested I've done a blog post about it here Issues with Get-Spbm* PowerCLI cmdlets and vCenter 6.5 – rudimartinsen.com
Kruddy, I wanted to let you know your suggestion to look for tags without category items resolved my issue. I have noted as such and placed back on the forums at Get-SpbmStoragePolicy error "Object reference not set to an instance of an object" . Thank you!
Hello!
just wanted to let you know even on vCenter 6.5U1 and PowerCLI 6.5.4 this is still a issue, I tried the suggestion you said but didn't get any positive results this is what I get:
It seems like any TAG and Storage Policy command just does not work, I tried finding how to do the invalid certificate and Date format suggestion you mentioned, as we are currently using a self-signed certificate but i'm unable to resolve the issue still. Any help would be appreciative, Uridium454 thanks!
Battle, any chance you are able to run commands Get-Tag or Get-TagCategory and get returned values? I ran into an issue in the past in which those simply did not function, and it turned out to be a problem with the vCenter inventory service. From what I understand, there have been some significant tweaks to the way 6.5 handles tagging. I am experiencing an issue while trying to perform those commands when executing through vRO to my PowerShell host due to authentication changes.
I would be interested to know if retrieving the Tag and TagCategory would work through the REST API.
If you have a minute, can you give it a try with the rCisTag module?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD, I'll give this a try tomorrow and get back to you with the results.