VMware Cloud Community
risben2
Contributor
Contributor
Jump to solution

VRO updated cloudconfig not copied to VM, however appears correct in Assembler deployment

Hi,

I have a workflow that generates strings depending on what network/domain/endpoint my workload is being pointed to. The workflow has been set to replace strings in cloud-config (per answer here: (1) Solved: Change a value in vRA cloudconfig from a vRO workf... - VMware Technology Network VMTN), ie: 

var cloudConfig = inputProperties.customProperties.get("cloudConfig");
cloudConfig = cloudConfig.replace("updatedgateway",gateway)
...
customProperties.put("__computeConfigContent", cloudConfig)
 
...which renders correctly in the deployment view:
risben2_0-1696334006017.png

... but doesn't flow correctly to the instance:

risben2_2-1696334518435.png

&

risben2_1-1696334378339.png

 

Does anyone have any advice how to ensure the updated cloud-config gets copied to the instance correctly and in time for build? I'm currenly using OVA on VSPhere/VMC builds, however we'll be moving to AWS and GCP deployments soon, for which this will be a common catalogue item - hence the requirement to set ie. networking via cloud-init and not VMWare customization. 

 

Reply
0 Kudos
2 Solutions

Accepted Solutions
d3m1g0d
Enthusiast
Enthusiast
Jump to solution

In which extensibility phase are you setting __computeConfigContent? I noticed, if this is too early in the deployment lifecycle then it might get overridden at a later stage. Thus, I usually apply such changes to cloudConfig in the Compute Provision phase to ensure that it would be passed to Compute Post Provision without being changed anymore.
Also make sure, that your Extensibility subscription is blocking.

View solution in original post

ronaldod
Enthusiast
Enthusiast
Jump to solution

I do it on the event "Compute initial power on " and have blocking enabled.

View solution in original post

3 Replies
d3m1g0d
Enthusiast
Enthusiast
Jump to solution

In which extensibility phase are you setting __computeConfigContent? I noticed, if this is too early in the deployment lifecycle then it might get overridden at a later stage. Thus, I usually apply such changes to cloudConfig in the Compute Provision phase to ensure that it would be passed to Compute Post Provision without being changed anymore.
Also make sure, that your Extensibility subscription is blocking.

ronaldod
Enthusiast
Enthusiast
Jump to solution

I do it on the event "Compute initial power on " and have blocking enabled.

risben2
Contributor
Contributor
Jump to solution

Thanks for the info d3m1g0d and ronaldod. Exactly the info I required, makes perfect sense.

FYI, I've changed the subscription to run at initial power on, but I assume both answers would work. 

Reply
0 Kudos