As cloud computing and the use of virtual machines (VMs) have become a widespread phenomenon, a wide variety of optimization techniques have been invented for this field. One of them is live migration, which enables relocation of VMs between physical hosts without shutting them down. Since this feature has been implemented and simplified in the majority of popular virtualization platforms, IT administrators have begun migrating VMs regularly. There are many reasons for this, including load balancing, server consolidation and disaster recovery. This thesis have used a machine learning based algorithm to partition mi- gration marked VMs into migration groups, with the goals of minimizing network load and lower the time consumption. A new algorithm, proposed by this thesis, is used to provide additional cost-optimization.