Virtual machine (VM) migration is a process of migrating VMs from one physical server to another. It provides several benefits to a data center in a variety of scenarios including improved performance, fault tolerance, manageability load balancing and power management. However, VM’s migration leads to performance degradation and service-level agreement (SLA) violations which cannot be ignored, particularly if critical business goals are to be met. In this paper, we propose an algorithm for VM’s placement and migration that considers different users quality of service requirement, in order to decrease energy consumption and SLA violations due to under utilization of data centers. The proposed work mainly focuses on a novel heuristics-based energy-aware resource allocation to allocate the user’s tasks in the form of cloudlets to the cloud resources that consumes minimal energy. In addition to that, it is incorporated with load balancing and constraint-based scheduling mechanism. The proposed work is implemented using the service-oriented-based architecture, and the same has been simulated using the CloudSim toolkit. In this paper, we compared our work with non-power-aware (NPA), dynamic voltage and frequency scaling (DVFS), single-threshold (ST) policies and minimization migration policy (MMP). The experiment results indicate that our approach saves about $$83\%$$ of power comparing to the NPA system and $$77\%$$ comparing to a system that apply only DVFS. However, if we compare these algorithms, which allow dynamic consolidation of VMs such as ST, it saves $$53\%$$ , and finally, if we compare to MMP, it saves power between 22 and $$38\%$$ . Similarly if we compare number of VM migration comparing to ST, it reduces 23 and $$73\%$$ compared to MMP polices.