Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Keep the capping setting of a VM after migration.
[simgrid.git] / src / surf / vm_workstation_hl13.cpp
index 473c66e..b9dd19b 100644 (file)
@@ -383,6 +383,13 @@ void WorkstationVMHL13Lmm::migrate(surf_resource_t ind_dst_pm)
      int ret = p_action->unref();
      xbt_assert(ret == 1, "Bug: some resource still remains");
 
+     /* keep the bound value of the cpu action of the VM. */
+     double old_bound = p_action->getBound();
+     if (old_bound != 0) {
+       XBT_INFO("migrate VM(%s): set bound (%lf) at %s", vm_name, old_bound, pm_name_dst);
+       new_cpu_action->setBound(old_bound);
+     }
+
      p_action = new_cpu_action;
    }