1. A method to perform server provisioning on a plurality of computer systems to generate a plurality of target virtual machines, the method comprising: obtaining configurations from a pool comprising at least one existing candidate virtual server or server image through a discovery process; performing a clustering analysis on the configurations to group the configurations into at least two groups; for each group, selecting a configuration from among the configurations of the group as a candidate virtual machine image; determining a cost of actions required to be performed on the candidate virtual image to result in target virtual machines with a same configuration as the configurations of the group; and selecting the candidate virtual image with the lowest cost.