Data transferring and load balancing are some of factors which make the resource allocation problem more challenging in cloud computing (CC) environment. So due to the lack of exact solution for this problem, this paper presents a new mathematical model based on group technology to allocate the virtual machines (VMs) to workflows with the aim of controlling the number of data transferring and server load variation simultaneously. Group technology is a resource allocation technique in industrial environments with proven ability to optimize some measures (e.g. part movements, resource utilization) also a genetic algorithm (GA) is designed to find near optimal solution for larger problems with no optimum solution.