String type = ConfigUtils.getString(vmProperties, VM_TYPE);
final VMConfig vmConfig;
if (KVM_TYPE.equals(type)) {
vmConfig = new KVMConfig(vmProperties);
} else if (VMWARE_TYPE.equals(type)) {
vmConfig = new VMwareConfig(vmProperties);
} else if (JVM_TYPE.equals(type)) {
vmConfig = new JVMConfig(vmProperties);
} else {
throw new IllegalArgumentException("unsupported type for " + vm + " vm : " + type);
}