HPE Morpheus Enterprise
1833568 Members
4281 Online
110061 Solutions
New Discussion

VMware tagging not being applied

 
Not applicable

VMware tagging not being applied

In our catalog we have metadata entry for costcode.

“metadata”: [
{
“name”: “cost code”,
“value”: “<%= customOptions.input_vm_costcode %>”
}
],

When VMware system is created, the tag gets created in vcentre but does not get automatically assigned to the VM.

Within the catalog history of the VM you can also see the tag assigned:

Should the tag be automatically assigned to the VM?

Cheers
Jon

8 REPLIES 8
Not applicable

Re: VMware tagging not being applied

I’m experiencing a similar thing. I have export as tag selected on the option but the tag doesn’t get set in VMware. Don’t see any obvious errors on VMware.

Not applicable

Re: VMware tagging not being applied

I believe you also have to have that input assigned to the layout.

cbunge
HPE Pro

Re: VMware tagging not being applied

Yours is creating the Key / Value in vCenter but not applying to the VM as well?

Not applicable

Re: VMware tagging not being applied

Correct - I think I found out the issue. In my case the field name case did not match the vCenter tag category (BackupSchedule category name vs backupSchedule field name). I had to update everything to match, including some fields that aren’t displayed on the option edit form.

UPDATE option_type SET field_set_name = 'BackupSchedule', field_get_name = 'BackupSchedule' WHERE id = 1;
Not applicable

Re: VMware tagging not being applied

Hi,

Can you explain more please? Within the layouts I cannot see anything about metadata/tags.

Cheers
Jon

Not applicable

Re: VMware tagging not being applied

Sadly it’s not working for me.

I have added:

  1. Add the metadata entry to the catalog

“metadata”: [
{
“name”: “cost code”,
“value”: “<%= customOptions.input_vm_costcode %>”
}
],

  1. then add to the customoptions:

“cost code”: “<%= customOptions.input_vm_costcode %>”

So apart from those two steps nothing else is required?

cbunge
HPE Pro

Re: VMware tagging not being applied

I check the box on the inputs for “Export as Tag”.

That said, if it’s creating in vCenter and not associating there should be an event/error in vCenter on what’s happening. Are you setting invalid values with your key? Are you trying to do multi-cardinality tags?

cbunge
HPE Pro

Re: VMware tagging not being applied

To get mine to tag, I simply had to add the customOptions under:

"config": {
     "customOptions": {
      "password": "<%=customOptions.password%>",
      "steamBackup": "<%=customOptions.steamBackup%>",
      "world": "<%=customOptions.world%>",
      "steamPort": "<%=customOptions.steamPort%>",
      "optionList": "<%=customOptions.optionList%>",
      "nfs": "<%=customOptions.nfs%>",
      "newSteamBackup": "<%=customOptions.newSteamBackup%>"
    }
}

And I made sure that I have ‘export as tag’ checked on the input in my form.

b876931d87216b90c932f781c9fa04fc3911094c.png