VMware Cloud Community
LeroyJenkins608
Contributor
Contributor
Jump to solution

Customization Specification 'Run Once' vs. vRA Guest Agent Software Components

My goal is to run PowerShell scripts during post-provisioning of a cloned VM to do things like set configs and install apps. This process can takes hours with all the apps I am installing.

I am always starting from kicking off a blueprint in vRA. Yet it looks like there a couple ways that VMware offers to kick off these post-provisioning scripts.

I can use the 'Run Once' section of a VMware Customization Specification to have commands execute during the OS guest customization phase.

Pros: As the machine clones and enters this step you can watch the commands/scripts get executed (when paired with the 'Log on Automatically' feature)

Cons: Scaling this will result in lots of different Customization Specifications, as well as embedding scripts into templates (leading to image sprawl)

I can use the vRA Guest Agent Software Components Custom Properties to have scripts execute during the post provisioning phase.

Pros: The commands can leverage things like wget to pull scripts from an online repo or file share, allowing you to not have to keep scripts locally on templates (leading to less images)

Cons: You can't really watch the Guest Scripts execute. You can log into a provisioned VM and look at the logs, but you don't get the interactive console viewing activity to see progress of the scripts or commands executing.

I am probably missing out some pros/cons of each method. I like the vRA Software Components method, however the lack of console interactivity is annoying.

Thoughts? What method(s) are you using and why?

Reply
0 Kudos
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

When dealing with a cloud automation solution like vRA, there really shouldn't be a focus on being able to watch things fly by on the console. That really just doesn't matter. What does matter are the features and flexibility afforded by each system. The vRA guest agent isn't designed to install lengthy, complex series of scripts to install large numbers of applications or especially orchestrated app installs among multiple systems simultaneously. This is one thing that software components does pretty well. So it sounds like you're a better candidate for software components (requiring vRA Enterprise) than either customization spec installation (which is the absolute last thing I would ever recommend) or guest agent installs. If you don't have or can't afford the uplift to vRA Enterprise, you might want to start looking at external automation solutions like Ansible or similar to handle your app installations.

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

View solution in original post

Reply
0 Kudos
4 Replies
daphnissov
Immortal
Immortal
Jump to solution

When dealing with a cloud automation solution like vRA, there really shouldn't be a focus on being able to watch things fly by on the console. That really just doesn't matter. What does matter are the features and flexibility afforded by each system. The vRA guest agent isn't designed to install lengthy, complex series of scripts to install large numbers of applications or especially orchestrated app installs among multiple systems simultaneously. This is one thing that software components does pretty well. So it sounds like you're a better candidate for software components (requiring vRA Enterprise) than either customization spec installation (which is the absolute last thing I would ever recommend) or guest agent installs. If you don't have or can't afford the uplift to vRA Enterprise, you might want to start looking at external automation solutions like Ansible or similar to handle your app installations.

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

Reply
0 Kudos
LeroyJenkins608
Contributor
Contributor
Jump to solution

Yeah I agree, the Software Components piece would be nice, but we do not have Enterprise licensing.

Eventually I plan to use Salt to do the app installations. For now I'm trying to build with the tools that I have.

Just curious - why do you state the customization specs are the last thing you would ever recommend? What don't you like about that approach?

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

There are many reasons why I don't fancy using customization specs to install software.

  1. It couples customizing the machine identity with software installation. These are separate concerns.
  2. It causes a huge proliferation of customization specs as you create bespoke "profiles" for not only VM customization but software installs.
  3. It provides no output visible back to vRA.
  4. It doesn't enable you to do any sort of reporting on what software is being called where and by what.
  5. It doesn't allow for orchestrated installs between multiple VMs in the same blueprint.
  6. There's no way to pass variables into customization specs.
  7. Etc.
Reply
0 Kudos
GeiAll
Enthusiast
Enthusiast
Jump to solution

Hi LeroyJenkins608.

As a tip, you can also use guest operations to install software. But it does require you do to some VRO workflows for it.

We use this to install software (and report any errors, like not able to join AD and so on).

You can even solve the issue of no console here, if you autologon a user, you can start your powershell script with an interactive session.

Reply
0 Kudos