Researching Virtual Machine (kubevirt) migration with crane
This issue is a means of documenting the effort of migrating Virtual Machine's using crane.
The changes were made to the following projects as part of this effort:
- crane - https://github.com/djzager/crane/tree/cnv-playground
- cane-lib - https://github.com/djzager/crane-lib/tree/cnv-playground
- cane-plugin-openshift - https://github.com/djzager/crane-plugin-openshift/tree/cnv-playground
- crane-runner - https://github.com/djzager/crane-runner/tree/cnv-playground
Container Image: docker pull quay.io/djzager/crane-runner:cnv-playground .. this provides an image with all of the changes contained inside.
Issues that I've found
This section isn't complete until the issues listed are linked to actual GH Issues.
- Crane's
transfer-pvcneeds to support specifying pod mutations. - Konveyor needs a solution for migrating PVCs with
volumeMode: block - Konveyor needs a story for dealing with
VirtualMachineSnapshots, and necessarily,VolumeSnapshots. - Crane export fails when you specify
KUBECONFIG=/some/kubeconfig:/another/kubeconfig - We need a net new
craneplugin...crane-plugin-kubevirtthat can handle the mutations necessary for VirtualMachines. Further conversation needed on all the ways to handle this.
Environment Details
- Using mig-agnosticd to provide two openshift 4.10 clusters (source cluster and destination cluster). The only thing that must be changed is the
worker_instance_typemust bem5.metal(related: OpenShift Virtualization on AWS). - Manually (via Console UI) installed the OpenShift Virtualization Operator and the HyperConverged CR in both source and destination clusters.
- Mostly because writing Tekton Pipeline's is so much easier than having to write a shell script and just as portable (a file with
.yamlor.sh), I also installed OpenShift Pipelines in the destination cluster.
Demonstration: https://youtu.be/tvDYvfoHNxg
PRs:
- https://github.com/konveyor/crane-lib/pull/103 - updates crane-lib to drop default rbac and cabundles one would see in kube clusters, also cleans up
managedFieldsfrom metadata as this isn't useful during migration - https://github.com/konveyor/crane-plugin-openshift/pull/11 - does similar things for openshift clusters
@djzager I think we need to split this one into tractable issues in GH as features to get them onto the priority roadmap and potentially turn this into an epic. I'll hold off on triaging this into Jira until we have a conversation about how that should be done.
/priority normal /kind feature