From 85acc2e00e2192b965303edd7ae2a96ca8c9e8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantino=20V=C3=A1zquez=20Blanco?= Date: Fri, 10 Jul 2009 16:36:53 +0000 Subject: [PATCH] Now VMWare drivers remove predefined NICs from VMWare VMs git-svn-id: http://svn.opennebula.org/one/trunk@672 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- src/vmm_mad/vmware/DeployVM.java | 53 ++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/src/vmm_mad/vmware/DeployVM.java b/src/vmm_mad/vmware/DeployVM.java index bcc342e095..b84c97dcfa 100644 --- a/src/vmm_mad/vmware/DeployVM.java +++ b/src/vmm_mad/vmware/DeployVM.java @@ -256,46 +256,49 @@ public class DeployVM void configureNetwork() { - String[][] nics = pXML.getNet(); - + String[][] nics = pXML.getNet(); + int nics_toRemove_counter = 0; if(nics.length==1 && nics[0].equals("")) { return; } // First, let's find out the number of NICs to be removed - // VirtualDevice [] test = vmConfigInfo.getHardware().getDevice(); + VirtualDevice [] test = vmConfigInfo.getHardware().getDevice(); - - - // Lenth of array is #nicsToBeRemoved-#nicsToBeAdded - - //test.length+ - VirtualDeviceConfigSpec [] nicSpecArray = new VirtualDeviceConfigSpec[ - nics.length]; + VirtualDeviceConfigSpec [] nicSpecArray_toRemove = new VirtualDeviceConfigSpec[test.length]; // Let's remove existing NICs - - /* for(int i=0;i