VMware Cloud Community
maureenkelly
Contributor
Contributor

Clone, Linux with multiple NICs - Error - getCustomizationIPSettings

Using vCenter & Orchestrator 4.1.0 and I'm relatively new to both.

I'm trying to create a simple workflow using the Clone, Linux with multiple NICs built-in workflow.  I'm allowing my user to specify the following:

  • hostname (clientName)
  • the VM name
  • number of NICs (max of 2)
  • nic1/nic2 info (IP, gateway, subnet mask, DNS server list, network, and DNS domain)
  • the Linux VM template to clone from

a.)  When I run the workflow, I can't select one of the available networks to use for each NIC.  The select button is greyed out.  So just to test it out, I skip this field and submit the form with the data that I can add.  I see the description for nic1Network that says "no NIC is defined if network is not specified" so I assume this is the reason for the failure noted next.

b.)  This workflow fails with the following error message: "Unable to create Nic Setting Map: [object Error] (Dynamic Script Module name : getCustomizationIPSettings#28)"

Am I getting this error because I'm not selecting the network for each NIC or is this another issue alltogether?  And why would I not be able to select the network?

Thank you,

Maureen

0 Kudos
7 Replies
tschoergez
Leadership
Leadership

Hi!

I think the error is related to the issue that you haven't select a Network.

Do you use Standard vSwitches or Distributed Switches in your environment?

Can you provide a screenshot of the dialog where you usually should choos the network?

Regards,

Joerg

0 Kudos
maureenkelly
Contributor
Contributor

I'm not certain on the switch types but I believe they are standard switches.  I removed the IPs and any proprietary data from the screenshot simply for example.  But I think it conveys what I mentioned above.  No matter what network I click on, the "Select" button is greyed out.

screenshot_selectNetwork.jpg

0 Kudos
tschoergez
Leadership
Leadership

hm, you are not using the original workflow, because it has another input presentation...

So two possible errors:

1. something went wrong with the input presentation during copying/wrapping the clone, linux with ... workflow.

Compare your workflows "Input presentation"-tab with the one of the original workflows...

2. (more likely)

The workflow does some automatical filtering during input presentation by calling two actions. So you can only select Portgroups the target resource pool has access to.

(see screenshot)

110525inputpresi.png

As a workaround you could remove these data binding and "predefined list of elements" from the input presentation. With the risk a user selects a network which is not accessible for the target machine and you will get an error during the workflow run (or end up with a new VM without network connection).

Better is: build a small workflow wich call the same actions for the source VM to figure out, what Portgroups they return...

Regards,

Joerg

0 Kudos
maureenkelly
Contributor
Contributor

Great idea.  I went back and did some testing with the original "Clone, Linux with multiple NICs" workflow without making any customizations.  I noticed that if I select a particular resource pool (or even the parent "Resources"), there are no available networks to choose from.  But if I leave the resource pool blank, I can select any of the networks.  When I run the workflow without a resource pool, it gets all the way to the "Clone VM and wait" step and fails with the following error:  "Task 'CloneVM_Task' error: A specified parameter was not correct.   spec.location.pool (Dynamic Script Module name : vim3WaitTaskEnd#20)"

I'm going to ask the group responsible for the vCenter server and see if they have any more info.  Maybe something's misconfigured in vCenter?

And an answer to your previous question about switches, I confirmed that these are distributed switches, not standard.

0 Kudos
maureenkelly
Contributor
Contributor

So I've narrowed it down to one problem with what I'm trying to do.  I can select either a resource pool or a network, but not both, when I try to clone a VM from a template.

I just read a response to another discussion stating that you can't clone a VM from a template, only a VM from a VM, because the template isn't associated with a resource pool.  http://communities.vmware.com/thread/100144

mohd1024 wrote:

You right when I clone an ordinary Virtual machine (Not a template)  it works successfully and the newly cloned machine is attached to the  same resource pool to which the source machine is attached.

But  templates are not attached to any resource pools, So when I clone  template -> Virtual machine, the newly cloned machine is not attached  to any resource pools which fires an exception.

My goal is to create a single workflow that creates a VM from a specific template and configure the NICs with specified IPs, etc.  Other than starting from an existing VM instead of a template, any suggestions on how to go about this a better way?

0 Kudos
tschoergez
Leadership
Leadership

Hi!

You could rewrite the workflow and add some other logic that provides the resource pool and network settings for the new VM.

For example, based on the target environment where the new VM should be. (maybe the easiest way is just to hardcode it in the workflow…)

Is the resource pool and the network port group always the same?

Regards,

Joerg

0 Kudos
mcfadyenj
Hot Shot
Hot Shot

I have just been through this process as part of a mass deployment workflow I wrote.

I did this a multi phase process in the following steps.

1) deploy from template

2) sysprep boxes with IP / dns information passed in from XML params.

this step was a little tricky as vCO doesn't really handle passing of xml between actions or workflows.  This in turn meant you have to encapsulate the xml values into anther object type such as

properties,  configuration elements or arrays.

3) startup machine (to complete sysprep)

4) separate workflow to change portgroups of VirtualMachine previously created.

This one I chained into the main workflow creating what appears to be a single seemless deployment of multiple machines from template including portgroups etc.

I am not sure this is possible in a single step I tried and failed many times before resorting to this.

0 Kudos