We are developing some automation to manage the import and deployment of VM templates.
The team working on the scripts to do this have stumbled on a problem which appears to be a long running issue...
When an OVF is imported into the system, we have a requirement to uniquely mark the template created so that it can be positively matched to the import file and media it came from from. VMs are managed through a process that allocates a unique numerical identifier when the OVF is created. The import of the OVF into vSphere is working fine.
They then intended to create a Tag holding the UID and assigning it to the template. However they are getting problems creating the tag category :
15:12:51 - INFO 28/05/2020 15:12:51 New-TagCategory vSphere single sign-on failed for connection '/VIServer=vsphere.local\administrator@{VCSA IP address}:443/'. Future operations which require single sign-on on this connection will fail. The underlying cause was: The profile for the user is a temporary profile.
This looks to me like a Windows problem, and Google searches suggests that Tag operations in PowerCLI have been plagued with this sort of problem for some time.
Is there a way to correct or work around this?
If not are there any other suggestions for how to label or apply the UID to the template?
My thoughts are that maybe something with "Custom Attributes" or if there was a way to directly manipulate the VMTX file and store the UID there.