SIMIX_vm_shutdown(vm, simcall->issuer);
}
-/**
- * @brief Function to destroy a SIMIX VM host.
- *
- * @param vm the vm host to destroy (a sg_host_t)
- */
+extern xbt_dict_t host_list; // FIXME:killme don't dupplicate the content of s4u::Host this way
+ /**
+ * @brief Function to destroy a SIMIX VM host.
+ *
+ * @param vm the vm host to destroy (a sg_host_t)
+ */
void SIMIX_vm_destroy(sg_host_t vm)
{
/* this code basically performs a similar thing like SIMIX_host_destroy() */
/* Don't free these things twice: they are the ones of my physical host */
vm->pimpl_cpu = nullptr;
vm->pimpl_netcard = nullptr;
+
+ if (xbt_dict_get_or_null(host_list, vm->name().c_str()))
+ xbt_dict_remove(host_list, vm->name().c_str());
}