Hi,
we are using Veeam for VM Backup and VeeamOne to create some reports based on VMware tags. VeeamOne is habing problems collecting all assigned tags with the default collection method, thus we switched via a regkey to a fallback method with powercli.
But this also fails. Powercli on command line fails after a couple of seconds with an internal server error (vCenter 6,7).
Any ideas?
> (Get-Tag).count
1134
> Get-TagAssignment
Get-TagAssignment : 09.11.2020 09:02:34 Get-TagAssignment com.vmware.vapi.std.errors.internal_server_error {'messages': [com.vmware.vapi.std.localizable_message {'id': vapi.bindings.method.impl.unexpected, 'default_message': Provider method implementation threw unexpected exception: null, 'args':
[null], 'params': , 'localized':}], 'data': , 'error_type': INTERNAL_SERVER_ERROR}
At line:1 char:1
+ Get-TagAssignment
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-TagAssignment], CisException
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTagAssignment.Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTagAssignment
PS C:\Users\de2rlgr> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware PowerCLI 12.1.0 build 17009493
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.1 build 16997174
VMware Cis Core PowerCLI Component PowerCLI Component 12.1 build 16997582
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.1 build 16997984
This issue has appeared before. Mostly it was related to the number of entities and assignments.
Can you try to do the same, but then in slices?
Something like this for example
$vms = Get-VM
$slice = 100
$num = 0
while ($num -le ($vms.Count - 1)) {
if(($num + $slice) -gt $vms.Count){
$max = $vms.Count - 1
}
else{
$max = $num + $slice - 1
}
Get-TagAssignment -Entity $vms[$num..$max]
$num = $max
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
this seems to be working - it's running now for a while and returning tags. Problems is I can do this in my own scripts but not with Veeam as I don't have any leverage how they implement their method.
I already followed this suggestion, and did a "cloudvm-ram-size -C 512 vmware-vapi-endpoint" but this didn't change anything.
Is there any workaround or global setting that 3rd party applications can use powershell again? Looking at the search results regarding these kind of errors and how long they exist, VMware seems to not have this on its priority list.
I would definitely suggest opening an SR.
And yes, contrary to what GSS might claim, PowerCLI is supported, even without a Developer Support contract.
Point them to PowerCLI Support Breakdown
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I've created a ticket now, but given the number of unsolved problems here and in other boards, I've little hope this an be fixed by support.
Perhaps true, but issues with many open SR tend to get a higher priority by the dev teams.
Note that this didn't say anything about the timing 😺
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference