X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fcfc285a211242ff365a365ffdcd3fab0f426a29..1637938a79546eb0b858a3e8ae3b28bd4af96ea4:/src/plugins/vm/VmLiveMigration.cpp diff --git a/src/plugins/vm/VmLiveMigration.cpp b/src/plugins/vm/VmLiveMigration.cpp index 384d90f66e..c6b78817ab 100644 --- a/src/plugins/vm/VmLiveMigration.cpp +++ b/src/plugins/vm/VmLiveMigration.cpp @@ -1,4 +1,4 @@ -/* 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. */ @@ -66,7 +66,7 @@ void MigrationRx::operator()() 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()); @@ -326,10 +326,10 @@ void sg_vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm) { 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());