$\leftarrow$ False then
  10 $\vert$ $\vert$ $\vert$ metric $\leftarrow$ vm.getRam()
  11 $\vert$ $\vert$ $\vert$ if m &lt; mM then
  12 $\vert$ $\vert$ $\vert$ $\vert$ mM $\leftarrow$ m
  13 $\vert$ $\vert$ $\vert$ $\vert$ vmToM $\leftarrow$ vm
  14 $\vert$ return vmToM
  ------------------------------------------------------------

  : Energy Aware VM Selection (EAVMS).[]{data-label="table_example"}

General Description
-------------------

The dynamic VM consolidation migrates VMs when a host is considered to be underloaded or overloaded. An underloaded host is placed into sleep mode after migrating all running VMs on it. In the case of an overloaded host, at first, it is necessary to select VMs that need to be migrated. After that, the system needs to find a new placement for migrating all the selected VMs. Our new VM Selection policy decides which VMs needs to migrate first. This algorithm migrates VMs until a a host is considered to be overloaded.

Problem Formulation
-------------------

Our Maximum Migration Time (MxMT) policy migrates VM which took the maximum time for completing the migration. In a host, several VM could be allocated. When a host is considered to be overloaded, the MxMT policy will choose VM which need the longest period for migrating compared to other VMs that are allocated for that host. 