-/**
- * \ingroup simix_vm_management
- * \brief Encompassing simcall to prevent the removal of the src or the dst node at the end of a VM migration
- * The simcall actually invokes the following calls:
- * simcall_vm_set_affinity(vm, src_pm, 0);
- * simcall_vm_migrate(vm, dst_pm);
- * simcall_vm_resume(vm);
- *
- * It is called at the end of the migration_rx_fun function from msg/msg_vm.c
- *
- * \param vm VM to migrate
- * \param src_pm Source physical host
- * \param dst_pmt Destination physical host
- */
-void simcall_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm)
-{
- simgrid::simix::kernelImmediate(std::bind(
- SIMIX_vm_migratefrom_resumeto, vm, src_pm, dst_pm));
+ /* 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);
+
+ /* Don't free these things twice: they are the ones of my physical host */
+ vm->pimpl_cpu = nullptr;
+ vm->pimpl_netcard = nullptr;
+
+ vm->destroy();
+ });