Network function virtualization provides a new network resource utilization approach which decouples network functions from proprietary hardware and enables adaptive services to end-user requests. In this paper, we present a joint design which optimally deploys network functions and allocates physical resources satisfying end-to-end requests with generated routes. We first discuss the problem behind such design and show its NP-completeness. We then propose a mixed-integer program which simultaneously identifies physical nodes to be deployed with network functions and generates routes sharing common physical resources realizing end-to-end requests. Computational results demonstrate the value of the integrated approach and its ability to allocate network functions supporting end-to-end requests with limited physical resources.