Cloud computing is a well-adapted model to deploy organizational computing workload to a remote datacentre infrastructure. The organizational workloads are processed in virtual servers. Virtual machines are hosted in physical servers using virtualization technology favors dynamic allocation resources and migration. In certain business use cases, a set of virtual servers are deployed to handle high-performance data-intensive computing workloads. These sets of virtual machines frequently need to communicate with one another to process the workload assigned called Inter VM communication. From the cloud provider's perspective, when the clusters are VMs are placed apart in different server racks, the inter VM communication has a negative impact on bandwidth usage and networking device utilization. At the same time, the performance of the application hosted in the VMs is degraded. Therefore, placing virtual machines close to each other, reducing impacts on networking devices is desired. In this research article, we propose a modified Firefly algorithm to place the virtual machine considering the flat tree network topology. The proposed algorithm is tested with different workloads represented in correlation coefficient and compared with Invasive Weed Optimization Algorithm IWO and Particle Swarm Optimization Algorithm shows better performance in terms of a number of servers used and the data transfer rate.