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

AID: 9249
  • Status: Published

6938 points

  • Byhanccocka
  • TypeTutorial
  • Posted on2012-01-19 at 07:12:05
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.

VMware-vSphere-Client3.jpg
  • 26 KB
  • Using the VMware vSphere Client, login and connect to the VMware ESX/ESXi server
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.

vSphere-Client-Connection.jpg
  • 161 KB
  • Connected to VMware ESX/ESXi server
Connected to VMware ESX/ESXi server


The datastore properties are shown on the right hand side

datastore-properties.jpg
  • 20 KB
  • Datastore Properties
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.jpg
  • 25 KB
  • Browse 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.jpg
  • 33 KB
  • Datastore Browser - datastore contents
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.jpg
  • 29 KB
  • Create folder
Create folder


Enter a name for the folder name followed by OK.

 
Create-folder1.jpg
  • 37 KB
  • Enter folder name
Enter folder name


The folder will be created in the root of the datastore

Folder-Created.jpg
  • 38 KB
  • Folder Created in 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.jpg
  • 51 KB
  • VM Folder
VM Folder


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

 
Select-all-VM-files.jpg
  • 59 KB
  • Select all the VM files
Select all the VM files


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

Select-Copy.jpg
  • 64 KB
  • Right Click and Select Copy
Right Click and Select Copy


Select and open the folder created in Step 4.

 
Folder-Created.jpg
  • 38 KB
  • Folder Created in root of the datastore
Folder Created in root of the datastore


the folder will be empty

 
Empty-Folder.jpg
  • 29 KB
  • Empry Folder
Empry Folder


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

 
Paste-to-folder.jpg
  • 36 KB
  • 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.

Copy-Progress.jpg
  • 59 KB
  • The Copy Progress bar will be displayed
The Copy Progress bar will be displayed


Contents of the new folder, with the cloned/copied virtual machine files.

 
VM-Copied.jpg
  • 56 KB
  • Contents of the new folder, with copy or clone of the virtual machine.
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.jpg
  • 72 KB
  • Add to Inventory
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

 


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

 
Add-to-Inventory-Wizard2.jpg
  • 34 KB
  • Add VM to host
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.

Add-to-Inventory-Wizard3.jpg
  • 30 KB
  • Review and Finish
Review and Finish


You have successfully cloned or copied a virtual machine.

 
vSphere-Client-Inventory.jpg
  • 155 KB
  • vSphere Client Inventory with Cloned, Copied 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.
*******************************************************************************************************************************************
    Asked On
    2012-01-19 at 07:12:05ID9249
    Tags

    VMware vSphere Hypervisor

    ,

    ESXi 4.1

    ,

    ESXi 5.0

    ,

    ESX 4.1

    ,

    ESX 4.0

    ,

    Copy

    ,

    Clone

    ,

    Backup

    Topic

    VMware

    Views
    1921

    Comments

    Expert Comment

    by: sndmnsix on 2012-05-25 at 13:46:56ID: 55087

    Using this method, couldn't you potentially be able to just fire up the cloned/copied server and leave the 'powered-off' one off until you've verified that the cloned copy comes up properly?  

    On the second to last screen-shot, it says 'creation of the virtual machine does not include automatic installation of the guest operating system.'  I would think that if we're cloning, the OS would be there to boot up correct?

    Author Comment

    by: hanccocka on 2012-05-25 at 14:01:41ID: 55088

    Yes, you could do that! It depends on what you are trying to achieve!

    that's not cloning process, that's adding to the Inventory! it's just a reminder, you need to have an OS in the VM to Boot!!!

    Expert Comment

    by: sndmnsix on 2012-05-25 at 14:26:36ID: 55089

    Sweet.  I have been studying a little more as to how to move a VM to another datastore.  This seems like a very basic and easy way of making it happen.  Thanks again.

    Author Comment

    by: hanccocka on 2012-05-25 at 14:36:30ID: 55092

    if you find the article helpful please Vote Yes, if you have not already done so! Which is now At the End of the Article! Thanks

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top VMware Experts

    1. hanccocka

      2,402,899

      Genius

      20,820 points yesterday

      Profile
      Rank: Genius
    2. coolsport00

      259,512

      Guru

      0 points yesterday

      Profile
      Rank: Genius
    3. paulsolov

      48,915

      400 points yesterday

      Profile
      Rank: Genius
    4. BestWay

      41,955

      600 points yesterday

      Profile
      Rank: Sage
    5. danm66

      39,761

      0 points yesterday

      Profile
      Rank: Wizard
    6. IanTh

      32,340

      0 points yesterday

      Profile
      Rank: Genius
    7. andyalder

      32,308

      0 points yesterday

      Profile
      Rank: Genius
    8. thinkpads_user

      24,520

      0 points yesterday

      Profile
      Rank: Genius
    9. kevinhsieh

      23,604

      0 points yesterday

      Profile
      Rank: Genius
    10. millardjk

      18,282

      0 points yesterday

      Profile
      Rank: Master
    11. rindi

      17,077

      0 points yesterday

      Profile
      Rank: Savant
    12. CarlWebster

      16,686

      0 points yesterday

      Profile
      Rank: Genius
    13. RickEpnet

      14,468

      0 points yesterday

      Profile
      Rank: Guru
    14. EvertG

      14,300

      0 points yesterday

      Profile
    15. cwstad2

      13,984

      0 points yesterday

      Profile
      Rank: Guru
    16. cdfs

      13,168

      0 points yesterday

      Profile
      Rank: Master
    17. Neilsr

      12,652

      0 points yesterday

      Profile
      Rank: Genius
    18. npsingh123

      11,452

      0 points yesterday

      Profile
      Rank: Master
    19. dkotte

      11,400

      0 points yesterday

      Profile
      Rank: Guru
    20. dlethe

      11,100

      0 points yesterday

      Profile
      Rank: Genius
    21. arnold

      10,782

      0 points yesterday

      Profile
      Rank: Genius
    22. demazter

      10,656

      0 points yesterday

      Profile
      Rank: Genius
    23. Anuroopsundd

      9,724

      0 points yesterday

      Profile
      Rank: Sage
    24. S00007359

      9,676

      0 points yesterday

      Profile
      Rank: Guru
    25. LesterClayton

      9,100

      0 points yesterday

      Profile
      Rank: Guru

    Hall Of Fame