VMware Cloud Community
istroh
Enthusiast
Enthusiast

Why does vApp.recompose(...) set E1000 as adapter type?

Hi there,

guys, I'm wondering why vApp.recompose(recomposeVAppParams) sets the resulting VM NICs type to E1000 since we migrated to VCO 5.5.1? If I create a vApp from a vAppTemplate the NIC type is set to VMXNET3, however if I recompose a vApp, e.g. using the example workflow in com.vmware.library.vCloud.vApp.addVAppTemplateVM, the created VM is showing E1000... any ideas?

Thanks

Igor

VCD: 5.5.1

VCO: 5.5.1 (VCD Plugin 5.5.0)

0 Kudos
7 Replies
igaydajiev
VMware Employee
VMware Employee

We have this issue reported and we are currently investigating it. Once I have more details I will provide update .

0 Kudos
qc4vmware
Virtuoso
Virtuoso

So far as I know this has always been an issue.  I have complained about this before but I think my complaints have mostly gone ignored.  My problem was/is similar but related to yours.  Mine was simply during a template deploy which I think ends up calling compose or recompose.  Anyway I ended up needing to deploy (in your case recompose) and after the activity completes I removed all nics and re-added them using a modified version of the action that creates a virtual nic.  I updated it to support types other than pc32net.  Here is a link to another thread and I uploaded the action.

Cloning a template network connections set to E1000 instead of VMXNET3

0 Kudos
igaydajiev
VMware Employee
VMware Employee

We were able to identify the cause for this behavior in com.vmware.library.vCloud.vApp.addVAppTemplateVM.

When  adding vm to vApp from template network settings are set to some predefined values for  example netCon.network = "none"; netCon.ipAddressAllocationMode = VclIpAddressAllocationModeType.NONE;

You could clone com.vmware.library.vCloud.vApp.addVAppTemplateVM and comment following code or modify it to suit your needs..


if (numNetConnections > 0) {

  var networkConnectionSection = new VclNetworkConnectionSection();

  networkConnectionSection.info = System.getModule("com.vmware.library.vCloud.common").createOvfMsg(null,"NetworkConnectionSection");

  for (netIx = 0; netIx < numNetConnections; netIx++) {

  var netCon = new VclNetworkConnection();

  netCon.networkConnectionIndex = netIx;

  netCon.network = "none";

  netCon.ipAddressAllocationMode = VclIpAddressAllocationModeType.NONE;

  netCon.isConnected = false;

  networkConnectionSection.networkConnection.add(netCon);

  }

  vmItem.instantiationParams.section.add(networkConnectionSection);

}

Then use the cloned action instead original addVAppTemplateVM.

Hope it helps...

0 Kudos
istroh
Enthusiast
Enthusiast

I'm not sure how to interpret this. Do you suggest to replace all network connections with

netCon.network = "none";

netCon.ipAddressAllocationMode = VclIpAddressAllocationModeType.NONE;

and then, after the VM was instantiated, reconnect the NICs to appropriate VDC networks?

0 Kudos
igaydajiev
VMware Employee
VMware Employee

What I ment is

1. duplicate com.vmware.library.vCloud.vApp.addVAppTemplateVM.action  and create new action com.vmware.library.vCloud.vApp.addVAppTemplateVMPreserveNetwork.action

2. edit scripting of the new action  and comment out the following code

if (numNetConnections > 0) {

  var networkConnectionSection = new VclNetworkConnectionSection();

  networkConnectionSection.info = System.getModule("com.vmware.library.vCloud.common").createOvfMsg(null,"NetworkConnectionSection");

  for (netIx = 0; netIx < numNetConnections; netIx++) {

  var netCon = new VclNetworkConnection();

  netCon.networkConnectionIndex = netIx;

  netCon.network = "none";

  netCon.ipAddressAllocationMode = VclIpAddressAllocationModeType.NONE;

  netCon.isConnected = false;

  networkConnectionSection.networkConnection.add(netCon);

  }

  vmItem.instantiationParams.section.add(networkConnectionSection);

}

3

3. Edit the workflow used to deploy the vm and use newly created action (com.vmware.library.vCloud.vApp.addVAppTemplateVMPreserveNetwork.action) instead of com.vmware.library.vCloud.vApp.addVAppTemplateVM.action.

When there is network section configured this will take precedence against the settings in the source template and vCD  will look for default adapter type based upon the OS.;

Skipping this section will allow vCD to use the settings present in the template.

0 Kudos
igaydajiev
VMware Employee
VMware Employee

You can try with attached  sample workflow.

0 Kudos
niallodwyer
Contributor
Contributor

I tried this change for a similar issue I was having and it appears to work.

However, I am a bit concerned that this change might have wider impacts because I am not overly sure how it works. Can you advise on why this code is un-necessary and so can be commented out? Or is it just a bug?

0 Kudos