Bug 1945593
| Summary: | Live migration should be blocked for VMs with host devices | ||
|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Fabian Deutsch <fdeutsch> |
| Component: | Virtualization | Assignee: | Barak <bmordeha> |
| Status: | CLOSED ERRATA | QA Contact: | Akriti Gupta <akrgupta> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.6.0 | CC: | cnv-qe-bugs, edwardh, kbidarka, kmajcher, nunnatsa, phoracek, sgott, vromanso |
| Target Milestone: | --- | ||
| Target Release: | 4.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-09-14 19:28:21 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Fabian Deutsch
2021-04-01 11:08:04 UTC
@phoracek @edwardh @vromanso some things have changed since I filed this bug. If I am not mistaken the live migration is permitted with SR-IOV devices, is this correct? Is it also correct that LM does currently not work with arbitrary passed through PCI devices or mediated devices? (In reply to Fabian Deutsch from comment #1) > If I am not mistaken the live migration is permitted with SR-IOV devices, is > this correct? Yes. > > Is it also correct that LM does currently not work with arbitrary passed > through PCI devices or mediated devices? For PCI based devices (like SR-IOV), libvirt will block migration, so this is correct. For MDEV based devices, I am unsure as I have never tested it. The hot-{un}plug code needs to be extracted out from the SR-IOV handling and then apply the same logic for all types that require it. Thanks Edy (In reply to Fabian Deutsch from comment #1) > @phoracek @edwardh @vromanso some things > have changed since I filed this bug. > > If I am not mistaken the live migration is permitted with SR-IOV devices, is > this correct? > > Is it also correct that LM does currently not work with arbitrary passed > through PCI devices or mediated devices? We don't block migration with host devices right now. Hopefully, we could re-use the plug/unplug mechanism we have in place for SRIOV. At the same time, we should be able to migrate with mdevs. For now, let's block live-migration (In reply to Fabian Deutsch from comment #5) > For now, let's block live-migration I think this one took care of it: https://github.com/kubevirt/kubevirt/pull/6379 @edwardh is right. This bug was fix and is is part of KV v0.49.0 I'll move it to ON_QA Verified 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
With GPU as host:
[akrgupta@fedora auth]$ virtctl migrate vm-rhel84-ocs
Error migrating VirtualMachine Internal error occurred: admission webhook "migration-create-validator.kubevirt.io" denied the request: Cannot migrate VMI, Reason: HostDeviceNotLiveMigratable, Message: VMI uses a PCI host devices
[akrgupta@fedora auth]$ oc describe vm vm-rhel84-ocs
Status:
Conditions:
Last Probe Time: <nil>
Last Transition Time: 2022-05-11T10:46:18Z
Status: True
Type: Ready
Last Probe Time: <nil>
Last Transition Time: <nil>
Message: VMI uses a PCI host devices
Reason: HostDeviceNotLiveMigratable
Status: False
Type: LiveMigratable
Last Probe Time: 2022-05-11T10:46:33Z
Last Transition Time: <nil>
Status: True
Type: AgentConnected
Created: true
Printable Status: Running
Ready: true
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 |