Community Pick: Many members of our community have endorsed this article.

HOW TO: Clone or Copy a virtual machine in VMware vSphere Hypervisor ESX/ESXi 4.x or ESXi 5.0

Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
EE Fellow, 2xMVE, Expert of the Year 2017-2011, Scribe 2016-2012, Author of the Year 2018-6,2013-2012 VMware vExpert Pro, vExpert 2020-2011
Published:
Updated:
This Tutorial covers a very basic and common question asked on Experts Exchange, "How Do I Clone or Copy a virtual machine in VMware vSphere Hypervisor ESX/ESXi 4.x, ESXi 5.0?"

Using the following method, no third party tools are required or need to be installed, other than the VMware vSphere Client.. The VMware vSphere Client is used to manage a VMware vSphere Hypervisor ESX/ESXi 4.x, ESXi 5.0 host server. This procedure can be used when connected directly to the host server or VMware vSphere vCenter Management Server.

1. Connect to the VMware vSphere Hypervisor Server


Using the VMware vSphere Client, login and connect to the ESX/ESXi server, using the IP address or hostname of the ESX/ESXi server, using the root username and password credentials. If you have a VMware vSphere vCenter server, you could also specify IP address or hostname of the vCenter server which manages your ESX/ESXi servers.

Using the VMware vSphere Client, login and connect to the VMware ESX/ESXi server

2. Select and browse the datastore


Once connected to the server, the VMware vSphere Client will display the following inventory of the VMware vSphere ESX/ESXi server.

Connected to VMware ESX/ESXi server
The datastore properties are shown on the right hand side

Datastore Properties
Select the datastore, if you've not rename the datastore, the datastore default name is datastore1.

Right Click the datastore datastore1 and select Browse datastore. All VMware virtual machine files are stored in the datastore.

Browse Datastore

3. Select the correct virtual machine folder


The Datastore Browser will open and show the contents of the datastore. The virtual machines are stored in folders.

Datastore Browser - datastore contents
Double click the virtual machine folder you need to clone or copy.


4. Create a destination virtual machine folder for the virtual machine clone or copy


Select the root (/) of the datastore, and click the New Folder icon to create a new destination folder for the new virtual machine clon or copy..

Create folder
Enter a name for the folder name followed by OK.

 Enter folder name
The folder will be created in the root of the datastore

Folder Created in root of the datastore

5. Select and Copy Virtual Machine files


Before you can CLONE/COPY the virtual machine files the Virtual Machine needs to be POWERED-OFF.

Double click the virtual machine folder you need to clone/copy.

VM Folder
Select ALL the files in the VM folder to be cloned/copied.

 Select all the VM files
Once all the files have been selected, Right Click and Select Copy.

Right Click and Select Copy
Select and open the folder created in Step 4.

 Folder Created in root of the datastore
the folder will be empty

 Empry Folder
Right click the empty folder space and Right Click and Select Paste

 Right click the empty folder space and Right Click and Select Paste[
The Copy Progress bar will be displayed, indicating a time to completion.

The Copy Progress bar will be displayed
Contents of the new folder, with the cloned/copied virtual machine files.

 Contents of the new folder, with copy or clone of the virtual machine.

6. Register the cloned/copied virtual machine with the Inventory


Select and Right Click the virtual machine VMX file.

 Add to Inventory
Follow the Add to Inventory Wizard, make sure the name is different and unique, it must be different to the original virtual machine name. This is just a friendly name for the inventory, it does not change the name of the name of the virtual machine OS.

Enter a Inventory Name followed by Next

 Add name
Select the host, that you want to add this virtual machine to, followed by Next

 Add VM to host
Review the details and Click Finish to add the VM to the Host Machines Inventory. The Virtual Machine will be added to the inventory.

Review and Finish
You have successfully cloned or copied a virtual machine.

 vSphere Client Inventory with Cloned, Copied Virtual Machine
*******************************************************************************************************************************************
Thank you for reading my article, please leave valuable feedback. If you liked my VMware article and would like to see more VMware Articles from me, please click the Yes button near the: Was this article helpful? at the Top of this article to the right of the Article title. Thank You.
*******************************************************************************************************************************************
50
121,774 Views
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
EE Fellow, 2xMVE, Expert of the Year 2017-2011, Scribe 2016-2012, Author of the Year 2018-6,2013-2012 VMware vExpert Pro, vExpert 2020-2011

Comments (27)

Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Author

Commented:
@Ian C - Thanks for reading my EE Article. Please post a question with your issue.  You have a problem beyond the scope of this article.

Commented:
Excellent, article!  Question regarding the cloning process - if the parent clone is in a production environment, does making a full clone take the parent clone off line making it inaccessible to end users?  Should this be done during a maintenance window?
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Author

Commented:
@Jay E - Thanks for reading my article. Glad you like it. This method outlined in my article you will need to power off the Parent VM, to be CLONED. So that would naturally make the Production VM unavailable to end users, because you've turned off the VM.

But the CLONE function in vCenter Server can be performed whilst the VM is Powered on. BUT... like any function on a VM, this will invoke a snapshot, which could cause performance related issues. If you are not familiar with snapshots, see my other EE Article

HOW TO: VMware Snapshots :- Be Patient

If you want to continue to discuss this, I would recommend posting a question for myself or other experts to Answer.
WHAT FILES DO i NEED TO COPY IN ORDER TO GET THE C:\  ONLY AND NOT THE SHARE DRIVES THAT ARE ATTACHED? I HAVE A FILE SERVER THAT I NEED JUST THE OS DRIVE AND NOT FILE SHARES.
THANKS
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Author

Commented:
@bstevens1964 Please post a question and myself or other experts will be glad to assist.

View More

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.

Get access with a 7-day free trial.
Continue Growing Your Skills and Your Career
  • Interact with leading experts on your specific technology problems.
  • Receive the guidance of experienced professionals.
  • Learn from troubleshooting others have experienced.
  • Gain knowledge from a library of courses, all included.