private void addVM() {
		final SlaveVM slave = new SlaveVM(openNebula);
		slave.createVM();
		slave.setState(VMState.INIT);
		allVms.put(slave.getId(), slave);

		Thread creator = new Thread() {
			public void run() {
				while (!slave.getVm().lcmStateStr().equals("RUNNING")) {
					slave.getVm().info();
				}
				System.out.println("VM " + slave.getId() + " "
						+ slave.getVm().stateStr());
				while (!slave.testConnection()) {
					try {
						Thread.sleep(1000);
					} catch (InterruptedException e) {
					}
				}
				System.out.println("VM " + slave.getId()
						+ " SSH connection established");

				if (slave.initialize()) {
					synchronized (vmsAvailable) {
						vmsAvailable.add(slave);
						slave.setState(VMState.WAITING);
						slave.setBootEndtime(System.currentTimeMillis());
					}
					System.out.println("VM " + slave.getId()
							+ " now available. " + vmsAvailable.size()
							+ " VMs in total");
				}
			}
		};
		creator.start();
	}