private void checkOSStarted(VirtualMachine virtualMachine) throws Exception {
		String startTimeout = virtualMachine
				.getProperty(VirtualMachineConstants.START_TIMEOUT);
		boolean checkTimeout = startTimeout != null;

		int remainingTries = 0;
		if (checkTimeout) {
			remainingTries = Integer.parseInt(startTimeout)
					/ START_RECHECK_DELAY;
		}

		while (true) {
			Exception ex = null;
			
			try {
				verifyProcessRunning(virtualMachine);
			} catch (Exception e) {
				stopCIFS(virtualMachine);
				throw e;
			}
			
			try {
				if (HypervisorUtils.isLinuxGuest(virtualMachine)) {
					createSSHClient(virtualMachine).disconnect();
					break;
				} else {
					ex = new Exception("Guest OS not supported");
				}
			} catch (Exception e) {
				if (checkTimeout && remainingTries-- == 0) {
					ex = new Exception(
							"Virtual Machine OS was not started. Please check you credentials.", e);
				}
			}

			if (ex != null) {
				stopCIFS(virtualMachine);
				throw ex;
			}
			Thread.sleep(1000 * START_RECHECK_DELAY);
		}
	}