By utilizing Virtual Machines (VM) and doing server consolidation in a datacenter, a cloud provider can reduce the total energy consumption for servicing his clients with little performance degradation. In particular, the cloud provider can take advantage of dissimilar workloads and by assigning these workloads to the same server, can utilize fewer active servers to service his clients. Placing multiple copies of a VM on different servers and distributing the incoming requests among these VM copies can reduce the resource requirement for each VM copy and help the cloud provider utilize the servers more efficiently. In this paper, the problem of energy-efficient VM placement in a cloud computing system is solved. Precisely, we present an approach that first creates multiple copies of VMs and then uses dynamic programming and local search to place these copies on the physical servers. Simulation results show that the proposed algorithm reduces the total energy consumption by up to 20% with respect to previous work.