X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e3c6a3a49d7cd0ac064304d2403637e8f25b3678..7018d53f4b991df9ddfa5b0c53293118d200efd6:/src/msg/msg_vm.c diff --git a/src/msg/msg_vm.c b/src/msg/msg_vm.c index 2cd4a4a995..9bc7ab0c84 100644 --- a/src/msg/msg_vm.c +++ b/src/msg/msg_vm.c @@ -912,7 +912,7 @@ static int do_migration(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm) msg_task_t task = NULL; msg_error_t ret = MSG_TIMEOUT; while (ret == MSG_TIMEOUT && MSG_host_is_on(dst_pm)) //Wait while you receive the message o - ret = MSG_task_receive_with_timeout(&task, ms->mbox_ctl, 3); + ret = MSG_task_receive_with_timeout(&task, ms->mbox_ctl, 4); xbt_free(ms->mbox_ctl); xbt_free(ms->mbox); @@ -975,6 +975,12 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t new_pm) msg_host_t old_pm = simcall_vm_get_pm(vm); + if(!MSG_host_is_off(old_pm)) + THROWF(vm_error, 0, "SRC host(%s) seems off, cannot start a migration", sg_host_name(old_pm)); + + if(!MSG_host_is_off(new_pm)) + THROWF(vm_error, 0, "DST host(%s) seems off, cannot start a migration", sg_host_name(new_pm)); + if (!MSG_vm_is_running(vm)) THROWF(vm_error, 0, "VM(%s) is not running", sg_host_name(vm));