-/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
simgrid::instr::Container::by_name(vm_->get_name())->remove_from_parent();
// create new container on the new_host location
- new simgrid::instr::Container(vm_->get_cname(), "VM", simgrid::instr::Container::by_name(dst_pm_->get_name()));
+ new simgrid::instr::Container(vm_->get_name(), "VM", simgrid::instr::Container::by_name(dst_pm_->get_name()));
// end link
msg = simgrid::instr::Container::by_name(vm_->get_name());
{
simgrid::s4u::Host* src_pm = vm->get_pm();
- if (src_pm->is_off())
+ if (not src_pm->is_on())
THROWF(vm_error, 0, "Cannot migrate VM '%s' from host '%s', which is offline.", vm->get_cname(),
src_pm->get_cname());
- if (dst_pm->is_off())
+ if (not dst_pm->is_on())
THROWF(vm_error, 0, "Cannot migrate VM '%s' to host '%s', which is offline.", vm->get_cname(), dst_pm->get_cname());
if (vm->get_state() != simgrid::s4u::VirtualMachine::state::RUNNING)
THROWF(vm_error, 0, "Cannot migrate VM '%s' that is not running yet.", vm->get_cname());