+ * Please note that a VM is a specific host. Hence, you should give a different name
+ * for each VM/PM.
+ */
+msg_vm_t MSG_vm_create(msg_host_t ind_host, const char *name,
+ int core_nb, int mem_cap, int net_cap){
+
+ // Note new and vm_workstation refer to the same area (due to the lib/dict appraoch)
+ msg_vm_t new = NULL;
+ void *ind_vm_workstation = NULL;
+ // Ask simix to create the surf vm resource
+ ind_vm_workstation = simcall_vm_create(name,ind_host);
+ new = (msg_vm_t) __MSG_host_create(ind_vm_workstation);
+
+ MSG_vm_set_property_value(new, "CORE_NB", bprintf("%d", core_nb), free);
+ MSG_vm_set_property_value(new, "MEM_CAP", bprintf("%d", mem_cap), free);
+ MSG_vm_set_property_value(new, "NET_CAP", bprintf("%d", net_cap), free);
+
+ XBT_DEBUG("A new VM has been created");
+ // TODO check whether the vm (i.e the virtual host) has been correctly added into the list of all hosts.
+
+ #ifdef HAVE_TRACING
+ TRACE_msg_vm_create(name, ind_host);
+ #endif
+
+ return new;
+}
+
+/** @brief Start a vm (ie. boot)
+ * @ingroup msg_VMs
+ *
+ * If the VM cannot be started, an exception is generated.