<div dir="ltr" style="text-align: left;"><span itemprop="articleBody"></span></p>
<div>
<h3>Cloning a virtual machine disk without delta files or snapshots</h3>
<p>To clone a virtual machine disk using the ESX/ESXi host terminal:</p>
<ol>
<li>Log into the terminal of the ESX/ESXi host.
</li>
<li>Navigate to the virtual machine&#8217;s directory using the cd command. It is located at:
<p><span style="font-family: Courier New;">/vmfs/volumes/<i>source_datastore</i>/<i>virtual_machine</i>/</span></p>
</li>
<li>Confirm the destination directory where the clone will be copied to. Create this directory, if required.
<p>For example, if this destination directory does not exist:</p>
<p><span style="font-family: Courier New;">/vmfs/volumes/destination_datastore/virtual_machine/</span></p>
<p>Create the directory using this command:</p>
<p><span style="font-family: Courier New;">mkdir /vmfs/volumes/destination_datastore/virtual_machine/</span><br /><span style="font-family: Courier New;"></span><span style="font-family: Courier New;"><br /></span></li>
<li>Clone the virtual hard disk using the <span style="font-family: Courier New;">vmkfstools -i</span> command after shutting down the virtual machine:<br /><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># vmkfstools -i /vmfs/volumes/Storage1/examplevm/examplevm.vmdk /vmfs/volumes/Storage2/examplevm_clone.vmdk</span><br />The output appears similar to:
<p><span style="font-family: Courier New;">Destination disk format: VMFS thick<br />Cloning disk &#8216;/vmfs/volumes/Storage1 (3)/examplevm/examplevm.vmdk&#8217;&#8230;<br />Clone: 100% done.</span></p>
<p><span style="font-weight: bold;">Notes</span>: </p>
<ul>
<li>Encapsulate objects with quotes where appropriate to ensure spaces and other special characters are interpreted correctly.</li>
<li>By default, the <span style="font-family: Courier New;">vmkfstools -i </span>command will create a destination thick provisioned disk. If you would like the destination disk to be thin provisioned, add <span style="font-family: Courier New;">-d thin</span> to the end of the above command.
<p>Example:</p>
<p><span style="font-family: 'Courier New'; font-size: x-small;"># vmkfstools -i /vmfs/volumes/Storage1/examplevm/examplevm.vmdk /vmfs/volumes/Storage2/examplevm_clone.vmdk -d thin</span></li>
</ul>
</li>
</ol>
<h3>Cloning a virtual machine disk with delta files or snapshots</h3>
<p>To clone a virtual machine disk using the ESX/ESXi host terminal:</p>
<ol>
<li>Log into the ESX/ESXi host&#8217;s terminal.
</li>
<li>Navigate to the virtual machine&#8217;s directory using the cd command. It is located at:
<p><span style="font-family: Courier New;">/vmfs/volumes/<i>source_datastore</i>/<i>virtual_machine</i>/</span></p>
</li>
<li>Confirm the destination directory where the clone will be copied to. Create this directory, if required.<span style="font-family: Courier New;"><br /></span>For example, if this destination directory does not exist:
<p><span style="font-family: Courier New;">/vmfs/volumes/destination_datastore/virtual_machine/</span>Create the directory using this command:</p>
<p><span style="font-family: Courier New;">mkdir /vmfs/volumes/destination_datastore/virtual_machine/</span><br /><span style="font-family: Courier New;"></span><span style="font-family: Courier New;"><br /></span></li>
<li>Clone the virtual hard disk from its current snapshot delta point using the <span style="font-family: Courier New;">vmkfstools -i</span> command.<br /><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># vmkfstools -i /vmfs/volumes/Storage1/examplevm/examplevm-000003.vmdk /vmfs/volumes/Storage2/examplevm_clone.vmdk</span>
<p>The output appears similar to:</p>
<p><span style="font-family: Courier New;">Destination disk format: VMFS thick<br />Cloning disk &#8216;/vmfs/volumes/Storage1 (3)/examplevm/examplevm-000003.vmdk&#8217;&#8230;<br />Clone: 100% done.</span></p>
<p><span style="font-weight: bold;">Note</span>: If the process fails, try selecting the next snapshot delta point in the snapshot tree. The selected point or one of its parents may be corrupt.</li>
</ol>
</div>
</div>

