How do you clone a VM to another host?
I have 2 physical servers (2 hosts)
I want to migrate the VM to the second server as a copy and keep the original one.
I do not have enough space on the disk to copy it, then migrate it.
Is there any way to migrate-clone a VM?
@rk9268vc You can
Copyit 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).
Warm migrate(under the Advanced 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.
You can also
Exportthe VM and then
Importit on the new host.
If you can shut down the original VM during the copy/migrate process then it will happen a lot faster.
@Andrew when i select "copy" it does not give me the option to select the other host, only different disks of the same host.
The other host does show up as a separate pool so i wonder if that is the issue?
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,
Live migration is not possible in this case, because of lack of free space.
You have to shutdown VM, then click this button and chose another host
@splastunov Hi. The VM doesnt have to be live migrated, shutdown is fine.
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.
If I migrate, it will be gone from the current machine.
I do not have the storage space to clone the VM first, then migrate on either host.
what i want to do is clone, but to another host, not to the same host - if that makes sense
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
@olivierlambert Hi, thanks for the comment.
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.
The only way that I see to see the other host as a target is with migrate.
Is there a setting or something to be able to see others hosts when copying?
XO should list all existing SR (as long as the pool is connected in XO obviously), regardless the pool.