Dynamic virtual network allocation algorithms have emerged as a powerful way to control traffic and virtual link capacity for the popular multi-tenant data center. Unfortunately, the existing dynamic virtual network allocation algorithms are either suboptimal or inapplicable to cloud resident data center, which is a promising OpenFlow based multi-tenant data center offering virtual data centers to customers from the provider's substrate cloud. This paper proposes a new algorithm, which is both optimal and applicable to cloud resident data center. An existing dynamic virtual network allocation algorithm which is relevant to cloud resident data center has been analyzed and the assumption which makes the algorithm suboptimal has been relaxed. The optimization problem with the assumption relaxed has been solved to get the new dynamic virtual network allocation algorithm. Numerical experiments with a mix of delay-sensitive and throughput-sensitive traffic show that our algorithm out performs the existing one in terms of total utility meanwhile having the convergence rate nearly unchanged.