Network virtualization realizes the vision of an Internet where resources offered by different stakeholders are used and shared by multiple coexisting virtual networks. The abstraction introduced by network virtualization opens new business opportunities.We expect that in the near future, infrastructure providers (or resource brokers and resellers) will offer flexibly specifiable and on-demand virtual networks over the Internet, similarly to the elastic resources in today's clouds. This paper initiates the discussion on the optimal resource allocations in such an economic environment. We attend to a scenario where a flexible service (such as a web service or an SAP database) is implemented over a virtual network. This service can be seamlessly migrated closer to the current locations of the (mobile) users. We assume that a virtual network provider offers different contracts to the service provider, and we distinguish between two fundamentally different pricing models: (1) a Pay-as-You-Come model where the service provider needs to decide in advance which time-based contracts to buy in order to implement the service, and a (2) Pay-as-You-Go-model where the service provider is charged only when the service terminates and only for the amount of resources actually used. In both cases, the virtual network provider may offer a discount if more resources are bought, e.g., buying a resource contract of double duration or of twice as much bandwidth only costs fifty percent more than a simple contract. We describe two optimal migration algorithms PAYC (for the Pay-as-You-Come model) and PAYG (for the Pay-as-You-Go model), provide a quantitative comparison of the two pricing models, and discuss their implications. Finally, extensions to online algorithms are discussed.