The ungleich virtualisation handbook » History » Revision 3
Revision 2 (Nico Schottelius, 11/06/2018 12:02 PM) → Revision 3/6 (Nico Schottelius, 11/06/2018 12:06 PM)
h1. The ungleich virtualisation handbook h2. Introduction * A place is autonomous data center and does not share resources with another place. * The storage clusters are separated so that they don't influence each other * Networks are place local -> changing the place means changing the IP addresses h2. Migrating a VM from one place to another * Find the VM id (*onevm list* in opennebula) ("SOURCE-VMID") * Stop the VM (*onevm stop <SOURCE-VMID>*) <vimid>*) * Locate the disk in ceph ** Locate the correct ceph pool: *ceph osd lspools* ("SOURCE-POOL") ** rbd list -p <SOURCE-POOL> <CEPH POOL> | grep <SOURCE-VMID> <VMID> ** This gives you the *SOURCE-IMAGE-NAME* *image name* * Login to the *destination place* and find out the target ceph pool ** Locate the correct ceph pool: *ceph osd lspools* (this is the TARGET-POOL) TARGET POOL) * We define the TARGET-IMAGE-NAME = import-SOURCE-VMID * Transfer the disk into the other place ceph cluster ** rbd export <SOURCE-POOL>/<SOURCE-IMAGE-NAME> <CEPH POOL>/<IMAGE NAME> - | ssh <ANY SERVER IN OTHER PLACE> server-in-other-place "rbd import <TARGET-POOL>/<TARGET-IMAGE-NAME>" * Create a new VM in the target place with the same parameters as the original VM ** CPU, VCPU, RAM, disk size ** It's id is the TARGET-VMID * Stop the new VM * Locate the disk of the new VM ** rbd list -p <TARGET-POOL> | grep <TARGET-VMID> * Delete the disk of the new VM <TARGET POOL>/import-<VMID>" h2. See Also * For storage see [[The ungleich ceph handbook]]