- XBT_DEBUG("destroy %s", sg_host_get_name(vm));
-
- /* this will call the registered callback function, i.e., SIMIX_host_destroy(). */
- sg_host_simix_destroy(vm);
+ XBT_DEBUG("destroy %s", vm->name().c_str());
+
+ /* FIXME: this is really strange that everything fails if the next line is removed.
+ * This is as if we shared these data with the PM, which definitely should not be the case...
+ *
+ * We need to test that suspending a VM does not suspends the processes running on its PM, for example.
+ * Or we need to simplify this code enough to make it actually readable (but this sounds harder than testing)
+ */
+ vm->extension_set<simgrid::simix::Host>(nullptr);