Under the emerging paradigm of federated computing services (FCS), one can create multiple virtual infrastructures (VI), one for each distributed computing application or service offering. Each VI may consist of a number of geographically distributed computing clusters that are connected with a set of dedicated circuits. In general, a VI submitted by a user to the FCS provider is unmapped at the time of the submission in that the user does not specify which computing clusters to use. The primary challenge to the FCS provider in supporting these novel applications is to establish a VI optimally over the substrate network such as a WDM network connecting many computing clusters. In this paper, we study the optimization problems of jointly allocating computing and wavelength resources for establishing Vis. First, we devise a branch and bound algorithm based on the decomposition and Lagrangian relaxation techniques to obtain the exact optimal solution with the objective being the minimization of the resource leasing cost of a VI. Second, we propose efficient heuristics to deal with a large number of online requests for Vis and compare their performance with the optimal solution.