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) {
			try {

				ExecutionResult executionResult = exec(virtualMachine,
						"/bin/echo check-started");
				HypervisorUtils.checkReturnValue(executionResult);

				break;
			} catch (Exception e) {
				if (checkTimeout && remainingTries-- == 0) {
					throw e;
				}
			}

			Thread.sleep(1000 * START_RECHECK_DELAY);
		}
	}