<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How do you clone a VM to another host?]]></title><description><![CDATA[<p dir="auto">I have 2 physical servers (2 hosts)<br />
I want to migrate the VM to the second server as a copy and keep the original one.<br />
I do not have enough space on the disk to copy it, then migrate it.</p>
<p dir="auto">Is there any way to migrate-clone a VM?</p>
<p dir="auto">thanks <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=566b705aef6" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/topic/7265/how-do-you-clone-a-vm-to-another-host</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 18:35:40 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/7265.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 May 2023 20:45:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do you clone a VM to another host? on Thu, 13 Nov 2025 22:17:05 GMT]]></title><description><![CDATA[<p dir="auto">To anyone still having this issue or finding this thread when searching online: "How to clone a VM between hosts in Xen Orchestra" or similar...</p>
<p dir="auto">The key piece of information missing from all these answers is that you must first connect both hosts (XCP-ng) servers to the same Xen Orchestra instance before you can clone (copy (export/import)) a VM from one host to another while using the Xen Orchestra GUI. Note that as mentioned in the first reply that this is only one solution, given both hosts can see each other over the network. You can also manually export and import the VM as an image file to your local PC's storage if needed.</p>
<p dir="auto">To do this, first navigate to "Settings-&gt;Servers" and configure/connect the destination host alongside the existing host so you end up with two hosts connected to the same Xen Orchestra. Note that Xen Orchestra can display information and manage multiple hosts if required (does not have to be tied to a single XCP-ng instance).</p>
<p dir="auto">Then navigate back to "Home-&gt;VMs" and you should now see all VMs listed for both hosts in the same list. From here you can select the VM to clone and from the copy dialog menu when you select a "SR" you should now be able to select between both host's disks (Local Storage or Pools) to copy the VM onto. Note that this command will spin up two separate tasks: an export and import task simultaneously on each host to complete the copy (sort of streaming it at the same time). Also don't forget to first shutdown the VM first before you copy it so you do not risk losing/corrupting any live data while it is cloning.</p>
<p dir="auto">Hope this helps everyone.</p>
]]></description><link>https://xcp-ng.org/forum/post/99584</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/99584</guid><dc:creator><![CDATA[Thomas Miller]]></dc:creator><pubDate>Thu, 13 Nov 2025 22:17:05 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Tue, 07 Jan 2025 12:48:39 GMT]]></title><description><![CDATA[<p dir="auto">The simple answer here is to use the Continuous Replication backup type. It'll copy the VM to another host on whatever schedule you set.</p>
<p dir="auto">It couldn't be simpler.</p>
]]></description><link>https://xcp-ng.org/forum/post/87789</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87789</guid><dc:creator><![CDATA[DustinB]]></dc:creator><pubDate>Tue, 07 Jan 2025 12:48:39 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Tue, 07 Jan 2025 10:59:25 GMT]]></title><description><![CDATA[<p dir="auto">There is no implementation in XAPI to "copy" VM to remote host (maybe XO has it own implementaion I'm not sure).<br />
Copy works only localy.<br />
You can only migrate it to remote host.</p>
<p dir="auto">Disclaimer.<br />
Everything you do on your own risk.</p>
<p dir="auto">But you can do it manually by export/copy VDI from one host to another.<br />
If you do not need "live" copy while VM is running, just stop VM, get all VBDs <code>xe vbd-list vm-name-lable={VM-name}</code>.<br />
You will see all VBDs and VDIs of VM.<br />
Go to certain SR <code>cd /var/run/sr-mount/{SR-UUID}</code> and copy VDI to new host's SR (you can use <code>scp</code>).<br />
On destination host:</p>
<ol>
<li>Get new VDI UUID <code>vhd-util read -p -n {VDI-UUID}.vhd</code></li>
<li>Rename file using this UUID<br />
<img src="/forum/assets/uploads/files/1736246116022-91acf2f8-fbdd-4a6e-b85a-3520c00ddec9-image.png" alt="91acf2f8-fbdd-4a6e-b85a-3520c00ddec9-image.png" class="img-markdown  img-fluid" /></li>
<li>Rescan SR on destination host.</li>
<li>Create VM, attach VDI.</li>
</ol>
<p dir="auto">If VDI stored on "shared" SR (iSCSI, NFS, ceph rbd and etc...), firts you have to export VDI by command <code>xe vdi-export uuid={VDI-UUID} filename={VM-Name_xvda}.vhd format=vhd --progress</code><br />
After success export, copy to destination host, read, rename and etc....</p>
<p dir="auto">If you need "live" migration you can do it with minimal down time via snapshot.</p>
<ol>
<li>Make snapshot with <strong>uniq name</strong>.</li>
<li>List VBDs <code>xe vbd-list vm-name-lable={VM-name}</code>.</li>
<li>Export all VDIs <code>xe vdi-export uuid={VDI-UUID} filename={VM-Name_xvda}.vhd format=vhd --progress</code> (repeat for all VDIs).</li>
<li>Copy to destination host</li>
<li>Use vhd-util to get new UUID and rename VDI <code>vhd-util read -p -n {VDI-UUID}.vhd</code></li>
<li>Shutdown VM. <strong>Do not delete VM before it will not start successfully on "new" host!</strong></li>
<li>Get snapshot list <code>xe snapshot-list</code></li>
<li>Get disks in snapshot <code>xe snapshot-disk-list uuid={snapshot_UUID}</code></li>
<li>Export <strong>diff</strong> <code>xe vdi-export uuid={main_VDI_UUID_from_step_3} filename=2920_delta_xvda.vhd format=vhd base={snapshot_VDI_UUID_from_step_8)} --progress</code></li>
<li>Copy diff to destination host</li>
<li>Import diff <code>xe vdi-import uuid=VDI_UUID_from_step_5  filename=2920_delta_xvda.vhd format=vhd --progress</code></li>
</ol>
]]></description><link>https://xcp-ng.org/forum/post/87787</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87787</guid><dc:creator><![CDATA[splastunov]]></dc:creator><pubDate>Tue, 07 Jan 2025 10:59:25 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Thu, 19 Dec 2024 21:39:32 GMT]]></title><description><![CDATA[<p dir="auto">I'm having same issue, is there any update to this? I can migrate between hosts but when I hit copy it doesn't allow me to copy between hosts and only shows the host on which it's on.</p>
<p dir="auto">I have an XENServer host (primary) and XCP-ng (new server). I Can migrate from xenserver to xcp-ng but can't copy for some reason?</p>
]]></description><link>https://xcp-ng.org/forum/post/87177</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87177</guid><dc:creator><![CDATA[pctechsolution]]></dc:creator><pubDate>Thu, 19 Dec 2024 21:39:32 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Sat, 06 May 2023 22:04:34 GMT]]></title><description><![CDATA[<p dir="auto">XO should list all existing SR (as long as the pool is connected in XO obviously), regardless the pool.</p>
]]></description><link>https://xcp-ng.org/forum/post/61897</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61897</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 06 May 2023 22:04:34 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Sat, 06 May 2023 16:10:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> Hi, thanks for the comment.<br />
As mentioned, it does not give me the option to copy to the other host. When I select copy, it only shows the disks of the current host as targets.<br />
The only way that I see to see the other host as a target is with migrate.<br />
Is there a setting or something to be able to see others hosts when copying?<br />
thanks</p>
]]></description><link>https://xcp-ng.org/forum/post/61891</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61891</guid><dc:creator><![CDATA[rk9268vc]]></dc:creator><pubDate>Sat, 06 May 2023 16:10:23 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Sat, 06 May 2023 10:24:38 GMT]]></title><description><![CDATA[<p dir="auto">There's a copy button in Xen Orchestra (cf the previous screenshot, in the same bar, the last icon on the right). Copy is a XO feature that will stream the VM to the destination, and in the end make a copy. I suggest you spend some time exploring all XO capabilities, there's many chances it's already covered by existing features <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=566b705aef6" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/post/61887</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61887</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 06 May 2023 10:24:38 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Sat, 06 May 2023 01:58:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/splastunov" aria-label="Profile: splastunov">@<bdi>splastunov</bdi></a> Hi. The VM doesnt have to be live migrated, shutdown is fine.<br />
The problem is migrate moves the VM. I want to simply copy the VM to the new machine and keep the instance on the current one.<br />
If I migrate, it will be gone from the current machine.<br />
I do not have the storage space to clone the VM first, then migrate on either host.</p>
<p dir="auto">what i want to do is clone, but to another host, not to the same host - if that makes sense</p>
]]></description><link>https://xcp-ng.org/forum/post/61882</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61882</guid><dc:creator><![CDATA[rk9268vc]]></dc:creator><pubDate>Sat, 06 May 2023 01:58:34 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Tue, 02 May 2023 06:57:38 GMT]]></title><description><![CDATA[<p dir="auto">Live migration is not possible in this case, because of lack of free space.</p>
<p dir="auto">You have to shutdown VM, then click this button and chose another host</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1683010569727-aa215cc3-784e-4211-95a2-e8a24e006644-image-resized.png" alt="aa215cc3-784e-4211-95a2-e8a24e006644-image.png" class="img-markdown  img-fluid" /></p>
]]></description><link>https://xcp-ng.org/forum/post/61648</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61648</guid><dc:creator><![CDATA[splastunov]]></dc:creator><pubDate>Tue, 02 May 2023 06:57:38 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Mon, 01 May 2023 22:03:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/andrew" aria-label="Profile: Andrew">@<bdi>Andrew</bdi></a> when i select "copy" it does not give me the option to select the other host, only different disks of the same host.<br />
The other host does show up as a separate pool so i wonder if that is the issue?</p>
<p dir="auto">The VM is around 480 GB and i am moving from a 500GB raid to a 512GB raid so i dont have a lot of wiggle room,</p>
]]></description><link>https://xcp-ng.org/forum/post/61647</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61647</guid><dc:creator><![CDATA[rk9268vc]]></dc:creator><pubDate>Mon, 01 May 2023 22:03:36 GMT</pubDate></item><item><title><![CDATA[Reply to How do you clone a VM to another host? on Mon, 01 May 2023 21:44:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/rk9268vc" aria-label="Profile: rk9268vc">@<bdi>rk9268vc</bdi></a> You can <code>Copy</code> it to the new host and then start it there. It does not migrate the VM but creates a copy ready to boot while the old one is still running (the copy will be out of date if the VM is still running).</p>
<p dir="auto">You can <code>Warm migrate</code> (under the <em>Advanced</em> tab) which gives you the option to Delete (or not) the old VM and Start (or not) the new VM. This option will take a while to complete as it copies the VM and then updates the new VM with the changes during the copy.</p>
<p dir="auto">You can also <code>Export</code> the VM and then <code>Import</code> it on the new host.</p>
<p dir="auto">If you can shut down the original VM during the copy/migrate process then it will happen a lot faster.</p>
]]></description><link>https://xcp-ng.org/forum/post/61646</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/61646</guid><dc:creator><![CDATA[Andrew]]></dc:creator><pubDate>Mon, 01 May 2023 21:44:31 GMT</pubDate></item></channel></rss>