in Fig. 3.

![image](Dyn_VM_cons){width="3in"}

VMs Placement and Selection in cloud
------------------------------------

Several VMs could be ran in a single machine based on the service request. Under the virtualization concept, multiple operating systems could be ran on multiple VMs in a single physical machine. Through the VM consolidation we can use system resources efficiently and unused resources could be placed in lower power state to save energy. Several heuristic methods have been proposed for VM consolidation by Beloglazov and Buyya \[18\]. To perform a VM consolidation it is necessary to select an overloaded host first and then, we must follow specific criteria for host overloading. Furthermore, one or more hosts need to be migrated into an underloaded host or a new host. Depending on the load, several underloaded hosts could be migrated in one or more hosts. In this case, surely some underloaded host could be programmed in sleep mode after migrating VMs, which is running on them. Which VM and what type of VM should be migrated first is the another an issue which should be taken into consideration. Furthermore, the selected VM will be placed into a new location.

Algorithm for resource optimization
===================================

In an operational environment, a 