Managing cloud datacenters is the most prevailing challenging task ahead for the IT industries. The data centers are considered to be the main source for resource provisioning to the cloud users. Managing these resources to handle large number of virtual machine requests has created the need for heuristic optimization algorithms to provide the optimal placement strategies satisfying the objectives and constraints formulated. In this paper, we propose to apply firefly colony and fuzzy firefly colony optimization algorithms to solve two key issues of datacenters, namely, server consolidation and multiobjective virtual machine placement problem. The server consolidation aims to minimize the count of physical machines used and the virtual machine placement problem is to obtain optimal placement strategy with both minimum power consumption and resource wastage. The proposed techniques exhibit better performance than the heuristics and metaheuristic approaches considered in terms of server consolidation and finding optimal placement strategy.