1. A method implemented to provide a virtual network to tenants requiring bandwidth in a cloud computing environment, wherein the virtual network includes virtual switches that manage servers that host virtual machines (VMs), the method comprising: receiving, at a network device in the cloud computing environment, a request for a task, the request including a first parameter indicating a number of VMs required, a second parameter indicating bandwidths the required VMs need, a third parameter indicating a duration of the task, and a fourth parameter indicating a deadline of the task; updating a value of the third parameter by increasing the value of the third parameters to allow the task a longer duration within the deadline of the task; selecting a starting time of the task and a bandwidth allocation of the task based on values of the first, second, third, and fourth parameters after the updating, wherein the bandwidth allocation of the task sets a bandwidth allocated to the task to be smaller than a value of the second parameter indicated by the request, and wherein the selection aims at minimizing a measurement of cloud resource utilization considering consumptions of both VMs and allocated bandwidth; and allocating the number of VMs for the request at the starting time with the bandwidth allocated at a particular location in the cloud computing environment such that the task is completed prior to the deadline.