VMware Cloud Community
VirExprt
Expert
Expert
Jump to solution

Create VM WF add flexible NIC

Hello,

I using predefined Workflow named 'Create Simple Virtual machine' came in with vCenter Plug-In. Now the Problem is when the VM is created, Nic which it add, is Adaptor Type = Flexible and is not recogised by vCenter Configuration Manager`s Operating system Provisioning server and my operation get failed.

I am not sure how can i modify code in the workflow to make is Add NIC with E1000 or E1000E Adaptor Type.

i need your help in fixing this issue.

Regards,

MG

Regards, MG
Reply
0 Kudos
1 Solution

Accepted Solutions
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

Hi,

dupplicate the original workflow and edit it. In the scriptable task, change the following scripting line:

deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardNetworkConfigSpec( vmNetwork );

to

deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardNetworkConfigSpec( vmNetwork, null, "<your adapter type>" );

for <your adapter type>, you can choose from the following:

"pcnet32" for VcVirtualPCNet32
"e1000" for VcVirtualE1000
"e1000e" for VcVirtualE1000e
"vmxnet2" for VcVirtualVmxnet2
"vmxnet3" VcVirtualVmxnet3

I hope this helps.

Regards,

Chris

View solution in original post

Reply
0 Kudos
2 Replies
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

Hi,

dupplicate the original workflow and edit it. In the scriptable task, change the following scripting line:

deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardNetworkConfigSpec( vmNetwork );

to

deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardNetworkConfigSpec( vmNetwork, null, "<your adapter type>" );

for <your adapter type>, you can choose from the following:

"pcnet32" for VcVirtualPCNet32
"e1000" for VcVirtualE1000
"e1000e" for VcVirtualE1000e
"vmxnet2" for VcVirtualVmxnet2
"vmxnet3" VcVirtualVmxnet3

I hope this helps.

Regards,

Chris

Reply
0 Kudos
VirExprt
Expert
Expert
Jump to solution

Thanks a lot for prompt and simple answer , it worked Smiley Happy

Regards,

MG

Regards, MG
Reply
0 Kudos