dpassante opened a new pull request, #6833: URL: https://github.com/apache/cloudstack/pull/6833
Live migrate unattached volumes without going through secondary storage. ### Description This PR includes: * A XenAPI Plugin for live migrating unattached disks across storage pools * An optional change on how detached volumes are migrated across xcp-ng/xenserver storage pools When attaching a volume to a virtual machine belonging to a remote storage pool or when moving volumes from one storage pool to another, the VDI is first copied to the secondary storage and then from secondary storage to the destination storage pool, which can be very long when migrating large volumes. With this PR, volumes can be live migrated (StorageXenMotion) by attaching them to a temporary transport VM. A small transport vm (without OS) is created and the volume is attached to it. Thus, the volume can be moved by live migrating the transport vm to the destination cluster. A new global setting`xen.live.migrate.unattached.volumes` has been added to indicate whether to activate the plugin or not. The module itself can be used standalone as below: ~~~ xe host-call-plugin host-uuid=931581a4-a73f-4842-a29c-ddd3d33344c3 plugin=migrate-unattached-disk fn=migrate_vdi args:local_vdi_uuid=0cfe7d80-1486-419d-8142-51e0e57eba9a args:remote_host=host01.mydomain.net args:remote_username=root args:remote_password=s3cur3d args:remote_sr_uuid=1c5fb76 4-6e70-e6f1-0be4-024a352e3a57 args:network_uuid=0dd16d73-df9d-0452-15b3-80be6f150042 args:dest_host_uuid=693ca0ee-517b-4710-9a7e-ce70df3a11d7 args:protocol='https' ~~~ <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. --> <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [X] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [X] Minor ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> <!-- see how your change affects other areas of the code, etc. --> The feature has been running for several months on Cloudstack 4.13.1/4.16.1 + XenServer 7.1 in production. The module, which relied on the xenserver-transfer-vm package which was removed from xcp 8.2.1, has just been rewritten to work on xcp/xenserver 8.2.1. It was manually tested on Cloudstack 4.16.1 / xcp-ng 8.2.1. I currently don't have an environment available to test with the main branch. cc @ArthurHlt -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
