VMware Cloud Community
BigBlueMike
Enthusiast
Enthusiast

Problem using Vmxnet3

Hello,

in would like to replace the action getVirtualPCNet32 with a new action getVirtualVmxnet3 in the workflow "Get multiple VirtualEthernetCard device change"

If I replace it with getVirtualVmxnet2 it works fine but if I use my new own action getVirtualVmxnet3 it fails "[object Error] (Dynamic Script Module name : getVirtualDeviceConfigSpec#65)"

I duplicated the action getVirtualVmxnet2 and created getVirtualVmxnet3

-


var device = new VcVirtualVmxnet2();

device = System.getModule("com.vmware.library.vc.vm.spec.config.device").getVirtualEthernetCard(device,backing,connectable,controllerKey,deviceInfo,key,unitNumber,addressType,macAddress,wakeOnLanEnabled);

return device;

-


var device = new VcVirtualVmxnet3();

device = System.getModule("com.vmware.library.vc.vm.spec.config.device").getVirtualEthernetCard(device,backing,connectable,controllerKey,deviceInfo,key,unitNumber,addressType,macAddress,wakeOnLanEnabled);

return device;

-


What am I doing wrong? Or can't it be done like that? Why wasn't there a getVirtualVmxnet3 in the first place?

Many thx for any help

0 Kudos
1 Reply
BigBlueMike
Enthusiast
Enthusiast

Seems I have resoved my own Question. Still learing. But maybe I could help someone with the same Problem.

I had to duplicate the action getVirtualDeviceConfigSpec and add the line

"if (device instanceof VcVirtualVmxnet3 ) return true;"

after "if (device instanceof VcVirtualVmxnet2 ) return true;"

and then of course use this new action in the "Get multiple VirtualEthernetCard device change" workflow instead of the old one.

0 Kudos