VMware Cloud Community
ymichalak
Hot Shot
Hot Shot

Get all "VM Customization Specifications" available on vCenter

Hello,

Do you have an idea to get all "VM Customization Specifications" (see below) object with vRO from a given vCenter ?

ymichalak_0-1637249019523.png

 


We want to list all object "VM Customization Specifications" available, and after apply one of it on a vm from vRO 8.6.


Thx for your help.

0 Kudos
2 Replies
eoinbyrne
Expert
Expert

You might be able to get them via here using the VC plugin?

eoinbyrne_0-1637755381224.png

Getting a reference to the CustomizationSpecManager involves the VcServiceContent object which I can remember asking about before but can't find the answer I was given

0 Kudos
ymichalak
Hot Shot
Hot Shot

Search customSpec from name.

inputs:

- sdkConnection / vc:sdkConnection
- customizationSpecName = name of your customSpec

customizationSpecManager = sdkConnection.customizationSpecManager;
System.warn ("customizationSpecManager found : " + customizationSpecManager);

customizationSpec = customizationSpecManager.getCustomizationSpec(customizationSpecName);
customSpecInfo = customizationSpec.info;
customSpecName = customSpecInfo.name;
System.warn ("customSpecName found to use : " + customSpecName);

 

0 Kudos