When trying to query tag assigments using PowerCLI, the following error is thrown:
Get-VM | Get-TagAssignment -Category '<string>'
Get-TagAssignment : DD/MM/YYYY hh:mm:ss 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: com.vmware.vapi.std.errors.Unauthorized, 'args': [com.vmware.vapi.std.errors.Unauthorized], 'params': , 'localized':}], 'data': , 'error_type': INTERNAL_SERVER_ERROR}
When doing the same in vSphere Client, the wizard remains empty
VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x
This issue can happen when the vCenter machineGUID does not match the solution user IDs.
For example,
/usr/lib/vmware-vmafd/bin/vmafd-cli get-machine-id --server-name localhost
AAAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAAA
# /usr/lib/vmware-vmafd/bin/dir-cli service list
Enter password for [email protected]:
1. machine-BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
2. vsphere-webclient-BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
3. vpxd-BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
4. vpxd-extension-BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
5. hvc-BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
6. wcp-BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
To resolve this issue, update the machine GUID of the vCenter Server Appliance(s) in order to match the UID contained in the solution user names.
Before implementing the following steps, please ensure that the necessary precautions have been taken and that either a fresh backup or a snapshot of the VCSA has been created. If the vCenter Server is running in an Enhanced Linked Mode (ELM) replication group with other vCenter Servers, please be aware that offline snapshots (in powered off) state need to be created for the affected VCSA itself as well as of all of its ELM replication partners.
Then follow these steps:
# /usr/lib/vmware-vmafd/bin/dir-cli service list
/usr/lib/vmware-vmafd/bin/vmafd-cli get-machine-id --server-name localhost
/usr/lib/vmware-vmafd/bin/vmafd-cli set-machine-id --id BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB —server-name localhost
/opt/likewise/bin/lwregshell set_value '[HKEY_THIS_MACHINE\Services\vmdir]' 'MachineGuid' ‘BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB'
service-control --stop --all && service-control --start --all
( AAAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAAA and BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB are used as replacers in this article.
In an actual vCenter, those strings will be real hex values)