<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Clone a VM directly from single ESXi Host in ESXi Discussions</title>
    <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649259#M254220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cloning a VM can be done only from vCenter server. Either Windows or vCenter server appliance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to install vCenter&amp;gt;&amp;gt;Connect to vCenter through web client or Desktop client&amp;gt;&amp;gt; add you hosts there&amp;gt;&amp;gt; right click VM &amp;gt;&amp;gt;click clone&amp;gt;&amp;gt; complete the clone wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you have any other questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2014 15:09:39 GMT</pubDate>
    <dc:creator>vThinkBeyondVM</dc:creator>
    <dc:date>2014-07-25T15:09:39Z</dc:date>
    <item>
      <title>Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649257#M254218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,i want to clone a VM with all of the related feathers including associated IDs (CPU ID, UUID, BIOS ID, etc) and redeploy it on another single ESXi host. could any me help me how can do that??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 19:06:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649257#M254218</guid>
      <dc:creator>amircsco</dc:creator>
      <dc:date>2014-07-24T19:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649258#M254219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what do you use to manage(connect to) the hosts?&lt;/P&gt;&lt;P&gt;Are you using vCenter Server to manage your ESXi host or are you using vCenter Client to connect directly to the hosts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 19:38:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649258#M254219</guid>
      <dc:creator>MagnetBoy</dc:creator>
      <dc:date>2014-07-24T19:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649259#M254220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cloning a VM can be done only from vCenter server. Either Windows or vCenter server appliance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to install vCenter&amp;gt;&amp;gt;Connect to vCenter through web client or Desktop client&amp;gt;&amp;gt; add you hosts there&amp;gt;&amp;gt; right click VM &amp;gt;&amp;gt;click clone&amp;gt;&amp;gt; complete the clone wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you have any other questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 15:09:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649259#M254220</guid>
      <dc:creator>vThinkBeyondVM</dc:creator>
      <dc:date>2014-07-25T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649260#M254221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without vCenter server you can accomplish this also by PowerCLI script check this useful post below:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lucd.info/2013/06/30/hl-tools-part-1-clone-a-vm-without-vcenter/" title="http://www.lucd.info/2013/06/30/hl-tools-part-1-clone-a-vm-without-vcenter/"&gt;HL Tools - Part 1 - Clone a VM without vCenter - LucD notes &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to clone just individual disks check this KB:&lt;/P&gt;&lt;P&gt;&lt;A href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1027876" title="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1027876"&gt;VMware KB: Cloning individual virtual machine disks via the ESX/ESXi host terminal &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;_________________________________________________________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;If you found this or any other answer helpful, please consider to award points. (use Helpful or Correct buttons)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;P.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 15:57:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649260#M254221</guid>
      <dc:creator>vNEX</dc:creator>
      <dc:date>2014-07-25T15:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649261#M254222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you &lt;STRONG style="font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;A href="https://communities.vmware.com/people/MagnetBoy"&gt;MagnetBoy&lt;/A&gt;&lt;/STRONG&gt;,i'm using vSphere client not vCenter server.&lt;/P&gt;&lt;P&gt;do i have to install vCenter Server for doing that??&lt;/P&gt;&lt;P&gt;is there any way for cloning a VM? via vShpere client, via vMA/vCLI or even via python/perl/java script!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 16:13:03 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649261#M254222</guid>
      <dc:creator>amircsco</dc:creator>
      <dc:date>2014-07-25T16:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649262#M254223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me clarify your doubts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Para" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;The vSphere Client is the principal interface for administering &lt;SPAN&gt;&lt;A name="PRODUCTNAME_36A67B5996CE47209B6ACC1FB2332B47" shape="rect"&gt;&lt;/A&gt;vCenter Server&lt;/SPAN&gt; and &lt;SPAN&gt;&lt;A name="PRODUCTNAME_151DEB637A324DC9B6DDD7091D718B38" shape="rect"&gt;&lt;/A&gt;ESXi&lt;/SPAN&gt;.&lt;/P&gt;&lt;P class="Para" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__P_1279449587C84B44AEF0A72CA5C9FCD5" shape="rect"&gt;&lt;/A&gt;The vSphere Client user interface is configured based on the server to which it is connected:&lt;/P&gt;&lt;P&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__UL_F215490863D9410F97C9E17AD4700BAE" shape="rect" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;/A&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" class="list" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;" summary=""&gt;&lt;TBODY&gt;&lt;TR style="border: none;"&gt;&lt;TD class="bulletsquare" colspan="1" rowspan="1" style="padding: 0 0.6em 0 0; border: none;" width="18pt"&gt;&lt;P style="border-top-style: none; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;■&lt;/P&gt;&lt;/TD&gt;&lt;TD class="bullettext" colspan="1" rowspan="1" style="padding: 0 0.6em 0 0; border-bottom-style: none; border-top-style: none;" width="100%"&gt;&lt;P class="Para" style="margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__d323t44" shape="rect"&gt;&lt;/A&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__LI_02E4DF1737214002B72131077897AEFC" shape="rect"&gt;&lt;/A&gt;When the server is a &lt;SPAN&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__PRODUCTNAME_36A67B5996CE47209B6ACC1FB2332B47" shape="rect"&gt;&lt;/A&gt;vCenter Server&lt;/SPAN&gt; system, the vSphere Client displays all the options available to the vSphere environment, according to the licensing configuration and the user permissions.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: none;"&gt;&lt;TD class="bulletsquare" colspan="1" rowspan="1" style="padding: 0 0.6em 0 0; border: none;" width="18pt"&gt;&lt;P style="border-top-style: none; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;■&lt;/P&gt;&lt;/TD&gt;&lt;TD class="bullettext" colspan="1" rowspan="1" style="padding: 0 0.6em 0 0; border-bottom-style: none; border-top-style: none;" width="100%"&gt;&lt;P class="Para" style="margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__d323t50" shape="rect"&gt;&lt;/A&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__LI_2202360DD96745B28EA30E200B98C969" shape="rect"&gt;&lt;/A&gt;When the server is an &lt;SPAN&gt;&lt;A name="GUID-DAB486D6-3E33-4939-B80A-BB17CB3B4E1E__PRODUCTNAME_151DEB637A324DC9B6DDD7091D718B38" shape="rect"&gt;&lt;/A&gt;ESXi&lt;/SPAN&gt; host, the vSphere Client displays only the options appropriate to single host management.&lt;/P&gt;&lt;P class="Para" style="margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;Hence you can use vSphere client to connect to ESXi host as well as vCenter server. In you case, you are using vSphere client to connect to individual ESXi host.&lt;/P&gt;&lt;P class="Para" style="margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;Yes, if you want to clone Virtual machine, &lt;/SPAN&gt;&lt;SPAN style="line-height: 18px;"&gt;easiest&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; way is to install vCenter server &amp;amp; connect to vCenter server using vSphere client or web client (its new user interface). However, you need to have valid vCenter license.&amp;nbsp; Note that vCenter will give you lot of features to manage your virtual environment. Ex. Features such DRS, DPM , SDRS, SIOC, HA, cloning, snapshots, templates etc.&amp;nbsp; can only be enabled from vCenter. If you have vCenter server you can manage multiple ESXi host (Either through vSphere client or web client)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="Para" style="margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0.4em !important; padding-bottom: 0.35em !important;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;Other ways (PowerCLI as well as ESXi CLI) are specified by vNEX.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 16:47:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649262#M254223</guid>
      <dc:creator>vThinkBeyondVM</dc:creator>
      <dc:date>2014-07-25T16:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649263#M254224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you guys i found that for Cloning a virtual machine on ESXi host there are two solution:&lt;/P&gt;&lt;P&gt;- Using vCenter&lt;/P&gt;&lt;P&gt;- Using Veeam&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 19:12:56 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649263#M254224</guid>
      <dc:creator>amircsco</dc:creator>
      <dc:date>2014-08-05T19:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a VM directly from single ESXi Host</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649264#M254225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although this post was answered, I think this reply will be usefull for anyone searching to clone a VM on a ESXi box, without having vCenter and not wanting to shutdown the source vm&lt;/P&gt;&lt;P&gt;I wrote a script running on the box itself. This is still in a testing phase, but here it goes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14222861910451472" jivemacro_uid="_14222861910451472"&gt;
&lt;P&gt;#!/bin/sh&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;######################################################################################&lt;/P&gt;
&lt;P&gt;# Create a clone of a running machine on ESXi, without vCenter services available&lt;/P&gt;
&lt;P&gt;# Disable networkcards on connecting at startup&lt;/P&gt;
&lt;P&gt;# Start the cloned VM&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# Created by : Jeroen van Schelt&lt;/P&gt;
&lt;P&gt;# Creation date : jan 2015&lt;/P&gt;
&lt;P&gt;# Tested on : ESXi 5.5 build 1746018&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# To run this script on a regular basis, without user intervention, do the following :&lt;/P&gt;
&lt;P&gt;# &lt;/P&gt;
&lt;P&gt;# Copy the script to a datastore&lt;/P&gt;
&lt;P&gt;# Add the cron job to the root crontab:&lt;/P&gt;
&lt;P&gt;# Edit /var/spool/cron/crontabs/root&lt;/P&gt;
&lt;P&gt;# Add the line (all on one line)&lt;/P&gt;
&lt;P&gt;# 30&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; /vmfs/volumes/BOXSR0089_das1/scripts/hotcloneBOXPC8888vm.sh &amp;gt; /vmfs/volumes/BOXSR0089_das1/scripts/hotcloneBOXPC8888vm.log 2&amp;gt;&amp;amp;1&lt;/P&gt;
&lt;P&gt;# Run the command "kill $(cat /var/run/crond.pid)", This will kill the process crond.&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# Edit /etc/rc.local.d/local.sh, using a command such as "vi /etc/rc.local.d/local.sh".&lt;/P&gt;
&lt;P&gt;# At the end of the file, add 3 lines (using "G" then "O" in vi). The first kills crond, the second adds the new cron job to the root crontab file, ad the third restarts crond:&lt;/P&gt;
&lt;P&gt;# /bin/kill $(cat /var/run/crond.pid)&lt;/P&gt;
&lt;P&gt;# /bin/echo "30&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp; /vmfs/volumes/BOXSR0089_das1/scripts/hotcloneBOXPC8888vm.sh &amp;gt; /vmfs/volumes/BOXSR0089_das1/scripts/hotcloneBOXPC8888vm.log 2&amp;gt;&amp;amp;1" &amp;gt;&amp;gt; /var/spool/cron/crontabs/root&lt;/P&gt;
&lt;P&gt;# /usr/lib/vmware/busybox/bin/busybox crond&lt;/P&gt;
&lt;P&gt;# Save and exit the editor (Press the "Esc" key then ":wq" then press "Return" in vi)&lt;/P&gt;
&lt;P&gt;# Run the command "auto-backup.sh" so that the change to /etc/rc.local survives a reboot.&lt;/P&gt;
&lt;P&gt;# Run the command "/usr/lib/vmware/busybox/bin/busybox crond"&lt;/P&gt;
&lt;P&gt;######################################################################################&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# user variables&lt;/P&gt;
&lt;P&gt;SourceVM="NameOfSVM"&lt;/P&gt;
&lt;P&gt;SourceDS="/vmfs/volumes/NameOfDS"&lt;/P&gt;
&lt;P&gt;DestDS="/vmfs/volumes/NameOfDS"&lt;/P&gt;
&lt;P&gt;ScriptDIR="$SourceDS/scripts"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;######################################################################################&lt;/P&gt;
&lt;P&gt;# Do NOT modify anything beyond this point, unless you know what you are doing&lt;/P&gt;
&lt;P&gt;######################################################################################&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# script variables&lt;/P&gt;
&lt;P&gt;DestVM="HotClone_$SourceVM"&lt;/P&gt;
&lt;P&gt;ScriptRunTime=$(date "+%Y%m%d_%H%M")&lt;/P&gt;
&lt;P&gt;nicfile=$ScriptDIR/nic_$DestVM.txt&lt;/P&gt;
&lt;P&gt;diskfile=$ScriptDIR/disk_$DestVM.txt&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# create destination directory&lt;/P&gt;
&lt;P&gt;mkdir $DestDS/$DestVM&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# copy source vmx? files to destination&lt;/P&gt;
&lt;P&gt;cp $SourceDS/$SourceVM/$SourceVM.vmx $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;sed -i "s/$SourceVM/$DestVM/g" $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;cp $SourceDS/$SourceVM/$SourceVM.vmxf $DestDS/$DestVM/$DestVM.vmxf&lt;/P&gt;
&lt;P&gt;sed -i "s/$SourceVM/$DestVM/g" $DestDS/$DestVM/$DestVM.vmxf&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# create snapshot from source&lt;/P&gt;
&lt;P&gt;lineCount=`expr $(vim-cmd vmsvc/getallvms | wc -l) - 1`&lt;/P&gt;
&lt;P&gt;x=0&lt;/P&gt;
&lt;P&gt;while [[ $x -ne $lineCount ]]; do&lt;/P&gt;
&lt;P&gt;&amp;nbsp; x=`expr $x + 1`&lt;/P&gt;
&lt;P&gt;&amp;nbsp; VMID=$(vim-cmd vmsvc/getallvms | tail -$lineCount | awk '{ print $1 }' | sed -n -e "$x"p)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; VMNAME=$(vim-cmd vmsvc/getallvms | tail -$lineCount | awk '{ print $2 }' | sed -n -e "$x"p)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if [[ $SourceVM == $VMNAME ]]; then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SourceVMID=$VMID&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vim-cmd vmsvc/snapshot.create $SourceVMID HotClone_$ScriptRunTime HotClone_of_$SourceVM 0 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; fi&lt;/P&gt;
&lt;P&gt;done&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Search for Disks&lt;/P&gt;
&lt;P&gt;rm $diskfile &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;
&lt;P&gt;while read line ; do&lt;/P&gt;
&lt;P&gt;&amp;nbsp; grep ".vmdk" | awk '{ print $3}' | sed "s/\"//g" &amp;gt;&amp;gt; $diskfile&lt;/P&gt;
&lt;P&gt;done &amp;lt; $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# copy sourcedisk to destinationdisk (thin provisioned)&lt;/P&gt;
&lt;P&gt;while read line ; do&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vmkfstools -d thin -i $SourceDS/$SourceVM/$(echo $line | sed "s/$DestVM/$SourceVM/g") $DestDS/$DestVM/$(echo $line | sed 's/-[0-9]*//g')&lt;/P&gt;
&lt;P&gt;done &amp;lt; $diskfile&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# If Source already had a snapshot, remove snapdata on vmdk filename in vmx-file&lt;/P&gt;
&lt;P&gt;sed -i "s/\(.*\)\-.*\(.vmdk\)/\1\2/g" $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Search for nics &lt;/P&gt;
&lt;P&gt;rm $nicfile &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;
&lt;P&gt;while read line ; do&lt;/P&gt;
&lt;P&gt;&amp;nbsp; grep ethernet[0-9].virtualDev | awk '{ print $1}' | sed "s/.virtualDev//g" &amp;gt;&amp;gt; $nicfile&lt;/P&gt;
&lt;P&gt;done &amp;lt; $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# set nic disconnected at boot&lt;/P&gt;
&lt;P&gt;while read line ; do&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if [[ -n "$(grep $line.startConnected $DestDS/$DestVM/$DestVM.vmx)" ]]; then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; echo "found in $line"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sed -i "s/$line.startConnected = \"TRUE\"/$line.startConnected = \"FALSE\"/g" $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; echo "nothing on $line"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; echo $line.startConnected = \"FALSE\" &amp;gt;&amp;gt; $DestDS/$DestVM/$DestVM.vmx&lt;/P&gt;
&lt;P&gt;&amp;nbsp; fi&lt;/P&gt;
&lt;P&gt;done &amp;lt; $nicfile&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# register destination VM in inventory&lt;/P&gt;
&lt;P&gt;DestVMID=`vim-cmd solo/registervm $DestDS/$DestVM/$DestVM.vmx`&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Powering up destination virtual machine&lt;/P&gt;
&lt;P&gt;vim-cmd vmsvc/power.on $DestVMID &amp;amp;&lt;/P&gt;
&lt;P&gt;sleep 15&lt;/P&gt;
&lt;P&gt;vim-cmd vmsvc/message $DestVMID _vmx1 2&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Remove HotClone Snapshot from source&lt;/P&gt;
&lt;P&gt;SnapToRemove=`vim-cmd vmsvc/snapshot.get $SourceVMID | grep -A 1 HotClone_$ScriptRunTime | grep -e "Id" | awk '{print $4 }'`&lt;/P&gt;
&lt;P&gt;vim-cmd vmsvc/snapshot.remove $SourceVMID $SnapToRemove 0&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# EOF&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 15:33:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Clone-a-VM-directly-from-single-ESXi-Host/m-p/2649264#M254225</guid>
      <dc:creator>MarelFoodProces</dc:creator>
      <dc:date>2015-01-26T15:33:50Z</dc:date>
    </item>
  </channel>
</rss>

