The major aim of data center (DC) is to optimize the three parameters, viz., energy consumption, resource utilization, and quality of service (QoS). Our objective is to balance these three parameters by managing the virtual machine (VM) efficiently. Therefore, this paper presents a holistic view of VM consolidation and explains its constituent subprocesses: (i) host overload detection, (ii) VM selection for migration from the overloaded host, and (iii) VM placement for provisioning selected VMs on a new set of hosts. Later, this paper attempts to optimize the parameters mentioned above by proposing a host overload detection algorithm based on exponential weighted moving average (EWMA) and its variants. The performance of the proposed EWMA is compared with the stateof-the-art algorithms based on (i) local regression, (ii) median absolute deviation, and (iii) interquartile range. The efficacy of the proposed EWMA is evaluated in combination with four different existing VM selection policies: (i) minimum migration time, (ii) minimum utilization, (iii) maximum correlation, and (iv) random selection. The evaluation metrics comprise energy consumption, VM migration count from the overloaded hosts representing the resource utilization, service level agreement (SLA) violations describing the QoS, and the average execution time. Simulation experiments are carried out on the CloudSim simulator using PlanetLab real cloud trace as workload. The proposed EWMA consumes 18.33% less energy, causes 47.81% less VM migration, makes 9.91% less SLA violation, and takes 43.44% less average-time for the execution of the entire workload as compared to state-of-the-art algorithms.