+ return (simcall_host_get_properties(vm));
+}
+
+/** \ingroup m_host_management
+ * \brief Change the value of a given host property
+ *
+ * \param host a host
+ * \param name a property name
+ * \param value what to change the property to
+ * \param free_ctn the freeing function to use to kill the value on need
+ */
+void MSG_vm_set_property_value(msg_vm_t vm, const char *name, void *value,void_f_pvoid_t free_ctn) {
+
+ xbt_dict_set(MSG_host_get_properties(vm), name, value,free_ctn);
+}
+
+/** \ingroup msg_vm_management
+ * \brief Finds a msg_vm_t using its name.
+ *
+ * This is a name directory service
+ * \param name the name of a vm.
+ * \return the corresponding vm
+ *
+ * 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_get_by_name(const char *name){
+ return MSG_get_host_by_name(name);
+}
+
+/** \ingroup m_vm_management
+ *
+ * \brief Return the name of the #msg_host_t.
+ *
+ * This functions checks whether \a host is a valid pointer or not and return
+ its name.
+ */
+const char *MSG_vm_get_name(msg_vm_t vm) {
+ return MSG_host_get_name(vm);
+}
+
+/* **** ******** MSG vm actions ********* **** */
+
+/** @brief Create a new VM (the VM is just attached to the location but it is not started yet).
+ * @ingroup msg_VMs*
+ *
+ * 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.