Cloud computing offers infrastructure as a service to deliver large amount of computation and storage resources, in which fast provisioning of virtual machine(VM) instances has significant impacts on the overall system performance and elasticity. In this paper, we analyze the characteristics of image provisioning by studying the traces collected from the realworld cloud data center. From the analysis results, we observe that the overloaded and dynamic requests for some popular images result in degradation and fluctuation of performance and availability of the system. Addressing this issue, we propose a stochastic model based on queueing theory, which captures the main factors in image provisioning to optimize the number and placement of image replication, so as to manage the VM images in a cost-effective manner. We implement our theoretical model based on open-source cloud platform and carry out trace driven evaluation to validate its effectiveness. The evaluation results show that our system is cost-effective and can achieve high and stable performance in VM provisioning while remaining high availability under different test scenarios.