VMware Cloud Community
LuckyT
Contributor
Contributor

Missing Additional Virtual Disk in Clone VM workflow

Hi,

I cloned windows VM with 2 additional disk using built-in clone vm workflow. Vm got cloned but additional virtual disk didn't get cloned. can anyone help me on this?

Thanks in advance.

0 Kudos
2 Replies
Burke-
VMware Employee
VMware Employee

Wow, I haven't seen this topic come up since vCenter 3.x Smiley Wink Back then, I worked a project that had this requirement and as you found the library workflows do not account for multi-disks... I do NOT have a current version of the workflow, but here's a description of the issue and what needs to be done:

Description

- The Clone * workflows call an action named "getRelocateSpec" ... that action has an input named "disk" that is an Array/Any type -- the actual objects that need to be in the array are VirtualMachineRelocateSpecDiskLocator ... Since the Library versions of the workflows pass a null value to that input, only the default disk gets cloned. Here's what you need to do to work around this.

Solution Walk Through

  1. Duplicate the desired Clone workflow (For example, "Clone, Windows with single NIC and credential")
  2. Modify the workflow:
    1. Change the null input on the "getRelocateSpec" to a NEW input parameter named something like diskRelocateSpecs (Array/Any)
  3. Create NEW Workflow that Prepares the Array of VirtualMachineRelocateSpecDiskLocator and stores in an Attribute of that new workflow
  4. Add your duplicated Clone * workflow to the NEW workflow.
    1. Right Click on the workflow and Synchronize Presentation -- this will add all the necessary inputs to your new workflow and adjust presentation settings to match original workflow
    2. Re-map the "diskRelocateSpecs" Input of the called workflow so that it binds to the Attribute in your NEW workflow

Attached is a package containing my solution built with vCenter 3.x -- it will NOT work for 4.x/5.x environments - I only include it so you have some reference as to how I built it.

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

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
LuckyT
Contributor
Contributor

Thanks, will try and let you know

0 Kudos