With the promise of providing flexible and elastic computing resources on demand, the cloud computing has been attracting enterprises and individuals to migrate workloads in the legacy environment to the public/private/hybrid clouds. However, the workload migration is often interpreted as an image migration or re-installation/data copying as the exact snapshot of the source machine, and the various cloud platforms and service models are rarely taken into consideration during migration planning. Thus, the cloud migration techniques have not provided enough options that can satisfy the various migration requirements. In this paper, we propose a model to tackle the migration challenges that transforms one resource into the same or another resource in hybrid clouds. We formulate the problem as a constraint satisfaction problem, and iteratively decompose the server components and consolidate the servers. Furthermore, we propose a compute-network mapping algorithm to match computing resources with network resources to guarantee network affinity. The ultimate goal is to recommend the optimal target cloud platform with network affinity and the minimum cost. Through the evaluation of the proposed model using real enterprise datasets (up to 2012 machines), we prove that the proposed model satisfies the goal. We show that when migrating into virtualized cloud environments, thorough resource planning can reduce 16% of current resources, 5%-10% servers can be consolidated, and more than 60% servers are possible candidates for server decomposition.