sajithru
Enthusiast
Enthusiast

vRealize Automation - Make a clone from running VM

Hi All,

I have a requirement to clone a running virtual machine for distribution using vRA. Current clone options under blueprints only provide ability to clone a vm only if its a template or has a snapshot of it. Is there any other way to achieve this?

Thank you.

-Sajith

4 Replies
daphnissov
Immortal
Immortal

You'd have to write your own XaaS and do lots of complex things.

0 Kudos
sajithru
Enthusiast
Enthusiast

Thank you for your reply. Can you please elaborate on how to do that. So far I have written external vRO workflow to create a template from the VM I need to clone. My plan is to use this template to clone more VMs as needed.

Since the template creates on the fly is there a way I can submit the template name as a input for "Clone from"  in the blueprint. Or else do I have to write a separate workflow for provisioning clones from template as well.

Thank you.

-Sajith.

0 Kudos
Dave_01
Enthusiast
Enthusiast

Hi Sajithru,

This is the approach I took in order to makes Clones.

Within vRO  ( vCenter > Virutal Machine Management > Clones > Windows Customization ) Using Clone, Windows with Single NIC.

Within vRA Import this into  XaaS > Resource Actions, then under Catalog Management > Entitlements. Give the Entitlement Group the Reource Action. This will Clone the machine, but will need to run another vRO workflow to import the newly cloned machine back into vRA.

0 Kudos
CalicoJack
Enthusiast
Enthusiast

Here is a trick: to clone just one specific machine - make a new blueprint and type (type!!!) machine's name into "Clone from" field. vRA actually doesn't care what it is (template or machine) unless you click selection button.

If you want to give users the option to specify cloning source - yep, a lot of complicated things are waiting you ))) you may start with "Requests a catalog item using provisioning request" in the vRO and override its settings... A very funny game.

And Guest agent doesn't work in clone (well, because it has hash-key of original machine, you need to figure out how to clean it up upfront of cloning process), good luck!