public synchronized SlaveVM requestVM() {
		if (vmsInUse.size() >= maxVMs)
			return null;
		if (vmsAvailable.size() > 0) {
			return getAvailableVM();
		} else {
			try {
				addVM();
				synchronized (vmsAvailable) {
					while (availableVMCount() < 1) {
					} // wait for VM to become available
					return getAvailableVM();
				}
			} catch (UninstantiableException e) {
				return null;
			}
		}
	}