- {
- // Now the VM is running on the new host (the migration is completed) (even if the SRC crash)
- vm->pimpl_vm_->isMigrating = false;
- XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", ms->vm->cname(), ms->src_pm->cname(), ms->dst_pm->cname());
-
- if (TRACE_msg_vm_is_enabled()) {
- static long long int counter = 0;
- char key[INSTR_DEFAULT_STR_SIZE];
- snprintf(key, INSTR_DEFAULT_STR_SIZE, "%lld", counter++);
-
- // start link
- container_t msg = PJ_container_get(vm->cname());
- type_t type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
- new_pajeStartLink(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
-
- // destroy existing container of this vm
- container_t existing_container = PJ_container_get(vm->cname());
- PJ_container_remove_from_parent(existing_container);
- PJ_container_free(existing_container);
-
- // create new container on the new_host location
- PJ_container_new(vm->cname(), INSTR_MSG_VM, PJ_container_get(ms->dst_pm->cname()));
-
- // end link
- msg = PJ_container_get(vm->cname());
- type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
- new_pajeEndLink(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
- }
+
+ // Now the VM is running on the new host (the migration is completed) (even if the SRC crash)
+ vm->pimpl_vm_->isMigrating = false;
+ XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", ms->vm->cname(), ms->src_pm->cname(), ms->dst_pm->cname());
+
+ if (TRACE_msg_vm_is_enabled()) {
+ static long long int counter = 0;
+ char key[INSTR_DEFAULT_STR_SIZE];
+ snprintf(key, INSTR_DEFAULT_STR_SIZE, "%lld", counter);
+ counter++;
+
+ // start link
+ container_t msg = PJ_container_get(vm->cname());
+ type_t type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
+ new StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+
+ // destroy existing container of this vm
+ container_t existing_container = PJ_container_get(vm->cname());
+ PJ_container_remove_from_parent(existing_container);
+ PJ_container_free(existing_container);
+
+ // create new container on the new_host location
+ PJ_container_new(vm->cname(), INSTR_MSG_VM, PJ_container_get(ms->dst_pm->cname()));
+
+ // end link
+ msg = PJ_container_get(vm->cname());
+ type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
+ new EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);