From: Martin Quinson Date: Wed, 31 May 2017 15:52:37 +0000 (+0200) Subject: destroying a VM that was not shutdown is OK X-Git-Tag: v3.16~170 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a17b0ff0037fd6627fff5de9e6a1b6628e3094eb?hp=b49b084a5d5a97a105f59244e14f02448f5e25a8 destroying a VM that was not shutdown is OK Even more because sometimes in Java, the VM is already half destroyed when the garbage collector wants to finish it. --- diff --git a/src/msg/msg_vm.cpp b/src/msg/msg_vm.cpp index d7c829eb73..26e46b822a 100644 --- a/src/msg/msg_vm.cpp +++ b/src/msg/msg_vm.cpp @@ -154,9 +154,6 @@ void MSG_vm_destroy(msg_vm_t vm) if (MSG_vm_is_running(vm)) MSG_vm_shutdown(vm); - xbt_assert(MSG_vm_is_created(vm) || __MSG_vm_is_state(vm, SURF_VM_STATE_DESTROYED), - "shutdown the given VM before destroying it"); - /* Then, destroy the VM object */ simgrid::simix::kernelImmediate([vm]() { vm->destroy(); @@ -172,7 +169,7 @@ void MSG_vm_destroy(msg_vm_t vm) /** @brief Start a vm (i.e., boot the guest operating system) * @ingroup msg_VMs * - * If the VM cannot be started (because of memory overprovisionning), an exception is generated. + * If the VM cannot be started (because of memory over-provisioning), an exception is generated. */ void MSG_vm_start(msg_vm_t vm) {