In virtual machine (VM) deployment, the physical machine (PM) usually first retrieves VM image files from the central image server through block transfer, and the VM image retrieval and communication are the two main factors that consume network bandwidth resources, In this paper, we propose a heuristic-based algorithm to minimize both image retrieval cost and communication cost for VM placement in a fat-tree network. It consists of three phases: PM clustering, VM partitioning, 1) We first cluster the PMs based on the possible longest communication distance, which is estimated by a pre 2) To reduce the traffic between PM clusters, a semidefinite programming algorithm is used to place the coarsened VMs to PM Here coarsening means packing the resources of smaller VMs as a whole, so as to accelerate the solving process. 3) In each PM cluster, the VMs are mapped to PMs one by one, and the VMs with common blocks and communication traffic between each other are more likely to be placed together. Extensive simulations show that our algorithm is more effective and efficient than the state-of-the-art.