Actions
The ungleich virtualisation handbook » History » Revision 4
« Previous |
Revision 4/6
(diff)
| Next »
Nico Schottelius, 11/06/2018 12:09 PM
The ungleich virtualisation handbook¶
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
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>)
- Locate the disk in ceph
- Locate the correct ceph pool: ceph osd lspools ("SOURCE-POOL")
- rbd list -p <SOURCE-POOL> | grep <SOURCE-VMID>
- This gives you the SOURCE-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)
- 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> - | ssh <ANY 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>
- The name of this disk is NEW-DISK-ID
- Delete the disk of the new VM
- rbd rm <TARGET-POOL>/<NEW-DISK-ID>
- Move the imported image to replace the disk we deleted
- rbd mv <TARGET-POOL>/<TARGET-IMAGE-NAME> <TARGET-POOL>/<NEW-DISK-ID>
- Start the VM
- Checkout the network configuration, update the customer with the new network details
See Also¶
- For storage see The ungleich ceph handbook
Updated by Nico Schottelius about 6 years ago · 4 revisions