VMware Cloud Community
chicojr
Enthusiast
Enthusiast

Copy of Create simple virtual machine issues with Network

I made a Copy of Create simple virtual machine workflow, when I input all my variables it fails with this error: TypeError: Cannot read property "name" from null (Dynamic Script Module name : createVirtualEthernetCardNetworkConfigSpec#8

 

Anyone know how to fix it please?

Reply
0 Kudos
10 Replies
nef_user
Enthusiast
Enthusiast

Check if you are passing the network in the right way. That action is trying to get network.name, and as the error shows your network is null. The input form can be a little tricky some times. As I know, this workflow only works with standard network too, if you are using distributed port groups you need to change the code below of the //add network 

Reply
0 Kudos
chicojr
Enthusiast
Enthusiast

So I did a copy of 'Create simple virtual machine'. We only use distributed switches so that rules out Network card of which this workflow is calling for. So if I add in 'distributedvirtualport' it is able to see network but then complains about vc:network and nothing will pull up for that. So It seems as if I cannot use this workflow copy?

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the macadress, you can pass null or "";

 

//add network

deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortgroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the macadress, you can pass null or "";

 

deviceConfigSpec = System.getModule("com. vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the macadress, you can pass null or "";

 

deviceConfigSpec = System.getModuel("com. vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the macadress, you can pass null or "";

 

deviceConfigSpec = System.getModuel("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

 

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the macadress, you can pass null.

 

System.getModuel("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the macadress, you can pass null or "";

 

deviceConfigSpec = System.getModuel("com. vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the mac, you can pass null or "";

System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos
nef_user
Enthusiast
Enthusiast

you need to change the module to use a distributed port group. The module createVirtualEthernetCardDvNetworkConfigSpec can use a vc distributed port group as input, the second parameter is the mac.

 

deviceConfigSpec = ... .createVirtualEthernetCardDvNetworkConfigSpec(dvPortGroup, null);

Reply
0 Kudos