Tuesday, August 7, 2012

ESXi clone VM cli

SkyHi @ Tuesday, August 07, 2012
1. #mkdir W2K8R2; cd W2K8R2


2.# vmkfstools -i /vmfs/volumes/LocalDisk/w2k8_template/w2k8_template.vmdk -d thin /vmfs/volumes/LocalDisk/W2K8R2/W2K8R2.vmdk

Destination disk format: VMFS thin-provisioned
Cloning disk '/vmfs/volumes/LocalDisk/w2k8_template/w2k8_template.vmdk'...
Clone: 11% done.

3. create a normal VM
NOTE: the name must be same as "W2K8R2 "

4. use existing hard disk (browse to W2K8R2.vmdk)

5. done (all the related files should be under one folder).