ajayn
Contributor
Contributor

Deploying VMs from template workflow

Hi,

Need to create a workflow:

1. List all templates in vCenter.

2. Based on user selection of the template, need to deploy a VM.

Can anybody point me on how to get list of templates in vCenter Orchestrator workflow.

-Ajay

0 Kudos
7 Replies
abhilashhb
VMware Employee
VMware Employee

Hey Ajay,

Check out these below link. It is enough to get you started.

How to deploy multiple VM's from template in Orchestrator?I

This is a link by vCO team.

How to Deploy VM's form template in Orchestrator

------------------------------------------------------------------------------------------------------------------------------------ If you find this or any other answer useful please mark the answer as correct or helpful. Abhilash B | Blog : http://vpirate.in | Twitter : @abhilashhb | LinkedIn : https://www.linkedin.com/in/abhilashhb/ |
0 Kudos
richardjamesloc
Contributor
Contributor

Hi Ajay,

I've just created a similar workflow to select a template to deploy a VM from.  Do you have all your templates under a single folder path in "VMs and Templates"?  I did this part of the workflow by creating an input parameter for the source VM for the clone operation.  In the Presentation tab, I set properties for this parameter to "Specify a root object to be shown in the chooser...".  This root object is set to an attribute which is the root folder for all of our templates.

E.g.

VC

|--Templates

         |--Linux

         |     |--TmplRHEL1

         |--Windows

               |--TmplWin1

When the user runs the workflow, it lists all the templates under this root folder and they can pick one.  This is then fed into the rest of the workflow for the clone/customisation operation.

Hope that helps.  Let me know if you need any more info.

Kind regards, Richard

ajayn
Contributor
Contributor

Thanks Abhilash - I have already looked into those URLs before posting here.

Richard:  This is really useful info for me.  Can you please share more details on how you implemented the full workflow.  Thank you.

0 Kudos
richardjamesloc
Contributor
Contributor

Hi Ajay,

Sure, I based my workflow on one of the workflows included with vCO 5.1 called "Clone, Linux with single NIC".  I found that it originally had an error where one of the steps in the workflow was missing a parameter binding, so it caused the deployed Linux VM to have a blank /etc/resolv.conf file.  I corrected this in my workflow and added some modifications to allow the RAM and vCPUs for the deployed VM to be configured as part of the workflow, populate the annotation field, and also to reset the root password and run some other guest commands after the deployment.  I've also put some validation into the presentation of the parameters to provide defaults for our team when deploying, and also ensure certain parts are filled in correctly.  I'm still working to add a step to create static DNS entries for Linux VMs in our AD-integrated DNS.  Once I've completed the full Linux workflow, I was going to do the same for deploying Windows VMs from template including creating the computer account in AD.  I was then going to join these two workflows into one master workflow which gives the choice of Linux or Windows, then prompts for the required information.  I also have the auto-generated documentation from vCO for my workflow in case it's useful.  Any questions please ask.

I'm not sure how to attach the workflow and pdf to this post, but I'm happy to email it to you if you let me have your address (or to post it here if that's possible).

Thanks, Richard

0 Kudos
naaz_4
Contributor
Contributor

Can you please share the workflow to create VM(with customization task) using template for both Windows and Linux

Thank You

0 Kudos
TenForceLOD2
Contributor
Contributor

Would be nice to have this too.

Thanks

0 Kudos
Totopolis
Contributor
Contributor

It is still useful few years after.

0 Kudos