vmitra
Contributor
Contributor

Multiple vcenter os customization file against one blueprint

Hi All,

is it possible to use more than 1 customization file against same blueprint because we are having 2 domains and machines need to be deploy in both the environment from same blueprint ?/

8 Replies
eservent
Enthusiast
Enthusiast

Hello vmitra,

I use only one blueprint for all types of VM (linux, windows).

I'm not sure to understand what is "customization file". I assert that's Customization Specifications.

During the Build event (in lifecycle event broker), I update the custom spec attribute with the correct value.

And in the blueprint, I just save it with empty value.

virtualMachineAddOrUpdateProperties = new Properties();

virtualMachineAddOrUpdateProperties.put("CloneSpec", "MyCustomizationName");

Is it what you need ?

Emmanuel.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Emmanuel.
vmitra
Contributor
Contributor

Hi Eservent,

Thanks for quick reply !!

Yes we are talking about  customization spec , will you please share few steps with us for same so we can understand how to do that ? - if possible

0 Kudos
eservent
Enthusiast
Enthusiast

Hello,

If you don't know Event Broker Life Cycle, it will be a bit hard too explain all stuff.

You first need to read the documentation like this pdf

https://docs.vmware.com/en/vRealize-Automation/7.4/vrealize-automation-74-extensibility.pdf

And some tutorials like this one

https://virtualviking.net/2016/01/07/exploring-the-vrealize-automate-7-0-event-broker-service/

In few words, you have to configure VRA Subscription event to send event at each steps of the blueprint iaas request (request, building, provisioning, etc.).

The event call a VRO workflow.

And in this workflow you can check and edit some properties like the CloneSpec property.

Emmanuel.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Emmanuel.
0 Kudos
daphnissov
Immortal
Immortal

Although you can certainly use EBS + custom vRO code for this, a much easier solution which I've used to call as many as 9 templates/customization specs from a single blueprint that doesn't involve either is the SovLabs Property Toolkit. You can build essentially if/when statements to switch to a different customization spec all within vRA without writing any JavaScript.

0 Kudos
pedjono
Enthusiast
Enthusiast

Hello eservent

I am trying to use your method to set the custom spec, can you advise:

What are the settings for: "virtualMachineAddOrUpdateProperties"

  • Is this in a scriptable task or an action?
  • Is it a string?
  • Is it an output parameter or attribute?

I have the payload being sent etc 'PRE' 'BuildingMachine'

Any other info would be greatly appreciated.

Thanks

Jono

0 Kudos
rwk1982
Enthusiast
Enthusiast

Hello Jono!

"virtualMachineAddOrUpdateProperties" is just an Output Parameter (Type: Properties) of the Workflow:

pastedImage_0.png

Robert

Drink coffee.. Do stupid things faster with more energy...
pedjono
Enthusiast
Enthusiast

Thank you Robert ¯\_ツ_/¯

I still seem to be missing something, to make the selected customization spec be applied to the VM.

I can see the selected spec in the POST provisioning payload, with "CloneSpec Windows - DEV Domain" (the spec name) but it hasnt run it...

0 Kudos
pedjono
Enthusiast
Enthusiast

Have figured out the problem. Realised it was running the spec, but the user trying to join the domain in the spec didn't have enough permissions...  :smileysilly:

0 Kudos