public hypervisorCollection <hypSpec_iLo> requestAsManyHypervisorsAsPossible(string snapshotName) { initialiseIfNeeded(); using (BladeDirectorServices director = new BladeDirectorServices(machinePools.bladeDirectorURL)) { int nodeCount = director.svc.getAllBladeIP().Length; hypervisorCollection <hypSpec_iLo> toRet = new hypervisorCollection <hypSpec_iLo>(); DateTime deadline = DateTime.Now + TimeSpan.FromMinutes(60); try { for (int i = 0; i < nodeCount; i++) { resultAndBladeName res = director.svc.RequestAnySingleNode(); resultAndBladeName progress = director.waitForSuccess(res, deadline - DateTime.Now); bladeSpec bladeConfig = director.svc.getBladeByIP_withoutLocking(progress.bladeName); resultAndWaitToken snapRes = director.svc.selectSnapshotForBladeOrVM(progress.bladeName, snapshotName); director.waitForSuccess(snapRes, TimeSpan.FromMinutes(3)); snapshotDetails snapshot = director.svc.getCurrentSnapshotDetails(progress.bladeName); userDesc cred = bladeConfig.credentials.First(); NASParams nas = director.svc.getNASParams(); hypSpec_iLo spec = new hypSpec_iLo( bladeConfig.bladeIP, cred.username, cred.password, bladeConfig.iLOIP, bladeConfig.iLoUsername, bladeConfig.iLoPassword, nas.IP, nas.username, nas.password, snapshot.friendlyName, snapshot.path, bladeConfig.kernelDebugPort, bladeConfig.kernelDebugKey ); ipUtils.ensurePortIsFree(bladeConfig.kernelDebugPort); bladeDirectedHypervisor_iLo newHyp = new bladeDirectedHypervisor_iLo(spec); newHyp.setDisposalCallback(onDestruction); if (!toRet.TryAdd(bladeConfig.bladeIP, newHyp)) { throw new Exception(); } } return(toRet); } catch (Exception) { toRet.Dispose(); throw; } } }