Description of problem: Like in the UI and other virtual products we should have in our virtctl the ability to cancel migration. Version-Release number of selected component (if applicable): CNV-4.8.0 Additional info: It can help with situation were the migration is stuck also like the bug: https://bugzilla.redhat.com/show_bug.cgi?id=1945532
Upstream patches available: https://github.com/kubevirt/kubevirt/pull/6735
Checked with: iib:219905 kubevirt-virtctl-4.11.0-525.el8.x86_64.rpm [akrgupta@fedora Downloads]$ virtctl migrate vm-rhel84-ocs VM vm-rhel84-ocs was scheduled to migrate [akrgupta@fedora Downloads]$ oc describe vm rhel8-excited-crocodile Status: Conditions: Last Probe Time: <nil> Last Transition Time: 2022-05-06T13:20:53Z Status: True Type: Ready Last Probe Time: <nil> Last Transition Time: <nil> Message: cannot migrate VMI: PVC rhel8-excited-crocodile-rootdisk-x7x0e is not shared, live migration requires that all PVCs must be shared (using ReadWriteMany access mode) Reason: DisksNotLiveMigratable Status: False Type: LiveMigratable Last Probe Time: 2022-05-06T13:21:40Z Last Transition Time: <nil> Status: True Type: AgentConnected Created: true Printable Status: Running Ready: true kubevirt-virtctl-4.11.0-580.el9.x86_64.rpm [akrgupta@fedora Downloads]$ virtctl migrate vm-rhel84-ocs VM vm-rhel84-ocs was scheduled to migrate [akrgupta@fedora Downloads]$ oc describe vm rhel8-excited-crocodile Status: Conditions: Last Probe Time: <nil> Last Transition Time: 2022-05-06T13:20:53Z Status: True Type: Ready Last Probe Time: <nil> Last Transition Time: <nil> Message: cannot migrate VMI: PVC rhel8-excited-crocodile-rootdisk-x7x0e is not shared, live migration requires that all PVCs must be shared (using ReadWriteMany access mode) Reason: DisksNotLiveMigratable Status: False Type: LiveMigratable Last Probe Time: 2022-05-06T13:21:40Z Last Transition Time: <nil> Status: True Type: AgentConnected Created: true Printable Status: Running Ready: true
Verifird with iib:219905 virtctl has the ability to cancel migration. [cnv-qe-jenkins@virt-akr-411-jpqfs-executor ~]$ virtctl migrate vm-rhel84-ocs ; sleep 5 ; virtctl migrate-cancel vm-rhel84-ocs VM vm-rhel84-ocs was scheduled to migrate VM vm-rhel84-ocs was scheduled to migrate-cancel
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Virtualization 4.11.0 Images security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:6526