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 {

				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 [re]started. " +
							"Please check you credentials.");
				}
			}

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