VMware Cloud Community
tvanholland
Contributor
Contributor

vSphere Tags with Multiple vCenters

Anyone have experience working with vSphere Tags that are replicated between vCenter instances via enhanced linked mode? When I connect to both vCenter instances I get an error when assigning a tag that it expects a single value.

To explain a bit more. When querying for the tag "No Backup" I get a response from both vCenter instances.

no backup.jpg

When I try to assign the tag I get the error below.

error.jpg

0 Kudos
3 Replies
LucD
Leadership
Leadership

Did you try adding the Server parameter and specify one of the 2 vCenters ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
tvanholland
Contributor
Contributor

Thanks LucD! This gets me pretty close. I'm still trying to work through the logic of how I would implement this.

For example, If I have 2 vcenters and run a get-vm I will get a list of all the vms from both vcenters. However I would need a way to discern the tag from each vCenter that should be applied.

So right now I'm having to write two separate functions to perform the same task. Does that make sense?

0 Kudos
LucD
Leadership
Leadership

If you have a Replication Agreement between the two PSC, the tag replication should occur.

Use KB2127057 to check.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos