try {
this.internalmig(destination);
} catch (Exception e){
- Msg.info("an exception occurs during the migration of VM "+this.getName());
+ Msg.info("Migration of VM "+this.getName()+" to "+destination.getName()+" is impossible ("+e.getMessage()+")");
throw new HostFailureException();
}
// If the migration correcly returned, then we should change the currentHost value.
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));