Cloud computing is the paradigm for delivering streaming content, office applications, software functions, computing power, storage, and more as services over the Internet. It offers elasticity and scalability to the service consumer and profit to the provider. The success of such a paradigm has resulted in a constant increase in the providers’ infrastructure, most notably data centers. Data centers are energy-intensive installations that require power for the operation of the hardware and networking devices and their cooling. To serve cloud computing needs, the data center organizes work as virtual machines placed on physical servers. The policy chosen for the placement of virtual machines over servers is critical for managing the data center resources, and the variability of workloads needs to be considered. Inefficient placement leads to resource waste, excessive power consumption, and increased communication costs. In the present work, we address the virtual machine placement problem and propose an Imitation-Based Optimization (IBO) method inspired by human imitation for dynamic placement. To understand the implications of the proposed approach, we present a comparative analysis with state-of-the-art methods. The results show that, with the proposed IBO, the energy consumption decreases at an average of 7%, 10%, 11%, 28%, 17%, and 35% compared to Hybrid meta-heuristic, Extended particle swarm optimization, particle swarm optimization, Genetic Algorithm, Integer Linear Programming, and Hybrid Best-Fit, respectively. With growing workloads, the proposed approach can achieve monthly cost savings of €201.4 euro and CO2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\hbox {CO}_2$$\\end{document} Savings of 460.92 lbs CO2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\hbox {CO}_2$$\\end{document}/month.