VmAllocationPolicyMigration

public interface VmAllocationPolicyMigration extends VmAllocationPolicy

An interface to be implemented by a VM allocation policy that detects Host under and over CPU utilization.

Author:Anton Beloglazov, Manoel Campos da Silva Filho

Fields

NULL

VmAllocationPolicyMigration NULL

An attribute that implements the Null Object Design Pattern for VmAllocationPolicyMigration objects.

Methods

getOverUtilizationThreshold

double getOverUtilizationThreshold(Host host)

Gets the host CPU utilization threshold to detect over utilization. It is a percentage value from 0 to 1. Whether it is a static or dynamically defined threshold depends on each implementing class.

Parameters:
  • host – the host to get the over utilization threshold
Returns:

the over utilization threshold

getUnderUtilizationThreshold

double getUnderUtilizationThreshold()

Gets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.

Returns:the under utilization threshold (in scale is from 0 to 1, where 1 is 100%)

getVmSelectionPolicy

VmSelectionPolicy getVmSelectionPolicy()

Gets the the policy that defines how VMs are selected for migration.

Returns:the VmSelectionPolicy.

isHostOverloaded

boolean isHostOverloaded(Host host)

Checks if host is currently over utilized, according the the conditions defined by the Allocation Policy.

Parameters:
  • host – the host to check
Returns:

true, if the host is over utilized; false otherwise

isHostUnderloaded

boolean isHostUnderloaded(Host host)

Checks if host is currently under utilized, according the the conditions defined by the Allocation Policy.

Parameters:
  • host – the host
Returns:

true, if the host is under utilized; false otherwise

setUnderUtilizationThreshold

void setUnderUtilizationThreshold(double underUtilizationThreshold)

Sets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.

Parameters:
  • underUtilizationThreshold – the under utilization threshold (in scale is from 0 to 1, where 1 is 100%)

setVmSelectionPolicy

void setVmSelectionPolicy(VmSelectionPolicy vmSelectionPolicy)

Sets the the policy that defines how VMs are selected for migration.

Parameters:
  • vmSelectionPolicy – the new vm selection policy