How to Clone Virtual Machine in ESXi without using vSphere Web Client

#SSH into ESXi host
#Find volume name:
ls -la /vmfs/volumes
#List all instances in a volume:
ls -la “/vmfs/volumes/{volume_name}”
#Create new folder to store a new VM instance
mkdir “/vmfs/volumes/{volume_name}/{new_machine_name}”
#Clone an existing machine with one disk file:
vmkfstools -i “/vmfs/volumes/{volume_name}/{machine_name}/{machine_name}.vmdk” “/vmfs/volumes/{volume_name}/{new_machine_name}/{new_machine_name}.vmdk” -d thin
#Clone an existing machine with a snapshot
vmkfstools -i /vmfs/volumes/{volume_name}/{machine_name}/{machine_name}-000001.vmdk /vmfs/volumes/{volume_name}/{new_machine_name}/{new_machine_name}.vmdk -d thin
Access Create vSphere Client >> right-click the host >> select New Virtual Machine >> select Custom >> input {new_machine_name} >> next >> next >> next >> select the correct OS, next >> next >> next >> select “Use an existing virtual disk” >> Browse to the newly cloned VMDK file >> OK >> next >> next >> Finish >> power on new Windows 7 VM >> Run: C:\windows\system32\sysprep\sysprep.exe

Leave a Reply

Your email address will not be published. Required fields are marked *