153154155156157158159160161162163
vsphereServer.setCdromVm(newVm,vmCdromIsoPath,vmCdromDataStoreName); } if (vmVncActivate) { vsphereServer.vncActivateVm(newVm,vmVncPort,vmVncPassword); } String pxeInterface=""; //Determine the PXE interface for (int i=0; i< vmNics.length; i++) {
7172737475767778798081
//Find if vm by name vmname already exists VirtualMachine existingVm=vsphereServer.findVmByName(vmName); if (existingVm!=null) { vsphereServer.vncActivateVm(existingVm,vncPort,vncPassword); } else { System.out.println("VM "+vmName+" not found"); }