Tuesday, August 7, 2012

Cloning Virtual Machine in VMware ESXI


To clone a virtual machine disk using the ESX host terminal:
  1. Log into the VMware ESXI host's terminal.
  2. Navigate to the virtual machine's directory using the cd command. It is located at:

    /vmfs/volumes/datasotre1/virtual_machine_name/
  3. Confirm the destination directory where the clone will be copied to. Create this directory, if required.

    For example, if this destination directory does not exist:

    /vmfs/volumes/datastore1/virtual_machine_name/
    (Refer = clone)

    Create the directory using this command:

    mkdir /vmfs/volumes/datastore1/virtual_machine_name/
    (Refer = test)
  4. Clone the virtual hard disk using the vmkfstools -i command:

    # vmkfstools -i "/vmfs/volumes/datastoer1/clone/clone.vmdk" /vmfs/volumes/datastore1/test/test.vmdk

    Note: Encapsulate objects with quotes where appropriate to ensure spaces and other special characters are interpreted correctly.

    The output appears similar to:

    Destination disk format: VMFS thick
    Cloning disk '/vmfs/volumes/datastore1/test/test.vmdk'...
    Clone: 100% done.
  1. Then log on using VMware vSphere client and create Virtual machine using Existing Hardisk.
  2. Finally point out the test.vmdk Hard Disk to create the virtual machine. Within 10 minutes time you can finish the process.

Source : http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1027876

No comments:

Post a Comment