X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/149c63f36e15b8500b1e826bda5138318ff7ba2b..73e97710413bba3ee2ae8baab0537fbd78811016:/examples/deprecated/java/cloud/migration/XVM.java diff --git a/examples/deprecated/java/cloud/migration/XVM.java b/examples/deprecated/java/cloud/migration/XVM.java index e5f7a9234c..ed27fd72fb 100644 --- a/examples/deprecated/java/cloud/migration/XVM.java +++ b/examples/deprecated/java/cloud/migration/XVM.java @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2021. 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. */ @@ -24,7 +24,7 @@ public class XVM extends VM { this.daemon = new Daemon(this); } - public void setLoad(int load){ + public void setLoad(int load){ if (load >0) { this.setBound(this.getSpeed()*load/100); daemon.resume(); @@ -48,13 +48,13 @@ public class XVM extends VM { @Override public void migrate(Host host) throws HostFailureException { Msg.info("Start migration of VM " + this.getName() + " to " + host.getName()); - Msg.info(" currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity + Msg.info(" currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity + "/remaining:" + String.format(java.util.Locale.US, "%.2E",this.daemon.getRemaining())); try{ super.migrate(host); } catch (Exception e){ Msg.info("Something wrong during the live migration of VM "+this.getName()); - throw new HostFailureException(); + throw new HostFailureException(); } this.setLoad(this.currentLoad); //Fixed the fact that setBound is not propagated to the new node. Msg.info("End of migration of VM " + this.getName() + " to node " + host.getName());