Friday, 15 January 2016

Cloning a VM without vCenter :- 


In this example .
vSphere client connection
vSphere client connection
First connect to the VSphere using the vSphere client and power off the source VM.
vSphere client User Interface
vSphere client User Interface
Select the Configuration tab and Storage settings on the left menu. The Datastores list will come up on the right pane.
vSphere Datastores
vSphere Datastores
Right click on the datastore of the source VM and select Browse.
Datastore
Datastore
Right click on the root folder on the left tree and create a new folder. e.g Application
Copying the files
Copying the files
Select the source folder of the VM to be cloned (2008R2 Machine in this example) and select the configuration file (.vmx) and the virtual disk file (.vmdk). Right click and copy them to clipboard. Now select the destination folder and paste the two files. Finally, right click the copied .vmx file and select Add to Inventory.
Add to Inventory wizard
Add to Inventory wizard
Enter the name of the cloned VM and finish the wizard. Now the VM has been created to the vSphere hypervisor.
In case of  using a VM as a template you should make sure that the template is unique everytime. So you must use sysprep utility to generalize the VM. In case of windows 2008R2 sysprep is included in the windows installation, under the folder c:\windows\System32\sysprep. This utility exists for other Windows versions as well.
Sysprep utility
Sysprep utility
Run sysprep and select Enter System Out-of-Box Experience, check the Generalize box and select Shutdown.
Make a generic VM template
Make a generic VM template
Now everytime you power on the template VM, a mini setup will come up to configure your new VM.

No comments:

Post a Comment