Quantcast
Channel: VMware Communities : All Content - VMware vCenter Converter SDK
Viewing all articles
Browse latest Browse all 706

How to add new nic for target VM using vCenter Converter SDK?

$
0
0

Hi all ,

I can use vCenter Converter Standalone program to add new nic for VM .

Then I tried to use following code to add a new nic for VM , but it failed.

The log shows invalid argument for adding nic.

What should I modify for these parameters?

 

ConverterNetworkParams network = new ConverterNetworkParams();
      ConverterNetworkParamsNicParams nic_info[] = new ConverterNetworkParamsNicParams[1] ;
      nic_info[0] = new ConverterNetworkParamsNicParams();
      nic_info[0].setConnected(true);
      nic_info[1].setConnected(true);
      nic_info[1].setConnected(true);
      network.setPreserveNicCount(false);
      network.setPreserveNicMapping(false);
      network.setNic(nic_info);
      cloningParams.setNetworkParams(network);

 

Thanks

Scott


Viewing all articles
Browse latest Browse all 706

Trending Articles