We have two datacenters and thus two vCenter environments. Recently one DC received an update from vCenter 7.0.1 to 7.0.2. The other one is still on 7.0.1.
On the upgraded environment the get-tagassignment and get-tag commands now error out :
get-vm alani001|get-tagassignment
Get-TagAssignment: 3/23/2021 1:13:50 PM Get-TagAssignment com.vmware.vapi.std.errors.operation_not_found {'messages': [com.vmware.vapi.std.localizable_message {'id': vapi.method.input.invalid.interface, 'default_message': Cannot find service 'com.vmware.cis.data.svc.resource_model'., 'args': [com.vmware.cis.data.svc.resource_model], 'params': , 'localized':}], 'data': , 'error_type': OPERATION_NOT_FOUND}
Is this a known issue, and if so, what can we do to resolve this, please ?
Before I forget, I tried this on both PowerCLI on Windows (v. 6.5.1) and Linux (v. 12.0). Both go wrong....
Is your environment and vCenter configured in En-US or a local language?
PowerCLI 6.5.1?
That is a very old version, I suggest you upgrade that version.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Does the error return after you stop your PowerShell/PowerCLI session and start it again?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Already asked our Wintel guys to hurry up and upgrade PowerCLI asap......🙄
But..the error also occurs when I do the same on Linux in Powershell Core and PowerCLI 12.0.0
vCenter is configured EN-US.
And yes, after starting a fresh powershell session and reissuing the command get-vm alani001 | get-tagassignment, I do get the right output, but only in Linux, NOT in Windows...
I'm curious why you asked that question, and more curious to the solution it leads to...
There have been cases reported when a PS/PowerCLI got corrupted, and a restart helped.
I'm afraid I have no solution, I would advise opening an SR.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
We ran into same issue after VSCA 7.0.2 upgrade, we are going to open SR.
PS W:\> get-tagassignment
get-tagassignment : 4/8/2021 10:13:23 AM Get-TagAssignment com.vmware.vapi.std.errors.operation_not_found {'messages': [com.vmware.vapi.std.localizable_message {'id':
vapi.method.input.invalid.interface, 'default_message': Cannot find service 'com.vmware.cis.data.svc.resource_model'., 'args': [com.vmware.cis.data.svc.resource_model], 'params': ,
'localized':}], 'data': , 'error_type': OPERATION_NOT_FOUND}
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.GetT
agAssignment
Yes, we have the same problem. After upgrading vCenter 7.0.1 to 7.0.2 we can not read or write the tags. All other information like name, network, notes we can read.
Different PowerShell versions on Windows 10, Windows Server and linux clients tried. All have the same issue:
PS V:\> (Get-TagAssignment -Entity $vm -Category "Administator").Tag
Get-TagAssignment : 21.04.2021 15:09:09 Get-TagAssignment Der Wert darf nicht NULL sein.
Parametername: collection
In Zeile:1 Zeichen:2
+ (Get-TagAssignment -Entity $vm -Category "Administator").Tag
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-TagAssignment], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTag
Assignment
PS V:\> Get-TagAssignment -Entity $vm
Get-TagAssignment : 21.04.2021 15:10:17 Get-TagAssignment com.vmware.vapi.std.errors.operation_not_found {'messages':
[com.vmware.vapi.std.localizable_message {'id': vapi.method.input.invalid.interface, 'default_message': Cannot find
service 'com.vmware.cis.data.svc.resource_model'., 'args': [com.vmware.cis.data.svc.resource_model], 'params': ,
'localized':}], 'data': , 'error_type': OPERATION_NOT_FOUND}
In Zeile:1 Zeichen:1
+ Get-TagAssignment -Entity $vm
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-TagAssignment], CisException
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTagAssi
gnment.Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTagAssignment
Updating to Powercli 12.3.0 solved the issue for us.:
No changes 😕. The Powercli-Module was on Windows-client already with version 12.3.
PS V:\> Find-Module *powercli
Version Name Repository Description
------- ---- ---------- -----------
12.3.0.... VMware.PowerCLI PSGallery This Windows PowerShell module contains VMware.P...
Also tried with downloaded powercli-Script 😞
Not sure if it helps, but I ran upgrade with -force parameter and it didn't work until I rebooted the machine.
Yes. First -force install grumbles some of the modules are in use. Reboot, install again with -force no problems. Reboot again. Now it works.
hello
our vcenter was updated to 6.7.0.48 and "get-tag" command have the same error.
1. powercli on pc was updated to 12.3
2. pc rebooted
result: not successful
3. deleted vmware Modul - rebooted pc - install vmware modul - rebooted pc
result: not successful again
pls help
I suggest opening an SR
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
PA3CRZ,
Did you open an SR? What's the status now?
Lars
Has anyone been able to find a way to get this working. I am having the same issue.
jrodriguez00,
Not sure what OP did, but I opened SR 21235836807 and support has opened a PR with engineering.
Lars
It seems that the tag commands work fine on Windows Server 2019, but not on 2012R2.
Lars
Hi, has anyone found a solution for this? We still have this problem by using PowerCLI 12.4.0.18633274 and Windows Server 2016. Thanks for any help
Maybe this has something to do with the Powershell version.
On Server 2012R2 you get
> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 0 10586 117
Windows 10 (1909): 5 1 18362 1801
Windows 10 (21H1): 5 1 19041 1320
Server 2019: 5 1 17763 2268
Linux ($ pwsh --version): PowerShell 7.2.0
Server 2012 R2 is out of date. I cannot test which version you have on Server 2016.
Hi,
thanks for your reply. You're right, after I updated the Powershell version the script works again.
$PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 14393 4583