Fix vm_clone to clone replicated VM #220
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The VirDomain//clone payload must include snapUUID. This required extengin VM class with snapshot_uuids field (and extending many existing unit tests).
Integration test for cloning replicated VM on destination cluster was added. This required adding sc_replication_dest_cluster_name to integration_config.yml.
I noticed vm_snapshot_info could include into output also
unavailableattribute. VM snapshot cannot be used for cloning until it gets available. This could/should be done in another PR.One more thing I'm not sure about, and want to ask (@domendobnikar ?). vm_clone called on VM demo-vm with no snapshot, on same cluster - it silently creates a VM snaphost, and this snapshot is then cloned to new VM demo-vm-clone-0. What happens if VM is modified (some data is written to disk etc), and we call vm_clone again to create demo-vm-clone-1 - is new disk data included for demo-vm-clone-1? Maybe we need to ask ScaleComputing about this.