live migration fails because of missing cpu features vmx-*
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
libvirt (Ubuntu) | Status tracked in Oracular | |||||
Noble |
Fix Released
|
Critical
|
Sergio Durigan Junior | |||
Oracular |
Fix Released
|
Critical
|
Sergio Durigan Junior |
Bug Description
[ Impact ]
libvirt users who attempt to migrate a VM to a Noble host will experience failures due to missing CPU features, which ultimately prevents the migration from concluding successfully. This is related to bug #2051754.
[ Test Plan ]
The reporter has a setup ready to reproduce the problem. In theory, all that is needed to trigger the error is:
1) Create LXD VMs.
2) Install libvirt inside each one, create a VM inside one, and then try to migrate it to the other.
There is also an extensive testsuite covering many migration scenarios that is used whenever a new libvirt/QEMU is prepared to be uploaded. I will be running the testsuite against the new libvirt to make sure it passes all tests.
[ Where problems could occur ]
Fortunately the fix is somewhat simple and contained: it's just one patch (that's already been accepted upstream), which changes a very specific code path in the virCPUx86UpdateLive function (inside src/cpu/cpu_x86.c). The problem happens in a very specific scenario where you're trying to migrate a VM between hosts using a similar libvirt version; in this case, the first libvirt (where the VM is created) correctly detects that there are some CPU features missing, but the second libvirt (where the VM will be migrated to) will fail when it notices that those same CPU features are not present.
Patches modifying code in this area have the possibility of messing up some (obscure?) migration path. We hope to prevent such a regression from happening by running our migration testsuite (as described in the Test Plan); it has already caught failures affecting corner cases in the past. If this proves insufficient, we can revert the changes temporarily while working with upstream (who has been responsive about this issue) to improve the existing solution.
[ Original Description ]
Trying to live migrate between two libvirt daemons 24.04 hosted on fresh LXD VMs is failing
virsh migrate --verbose --live demo-server-$host --copy-storage-all qemu+ssh:
error: operation failed: guest CPU doesn't match specification: missing features: vmx-apicv-
Libvirt VMs were created with the following commands:
virt-install -n demo-server-$host --virt-type=kvm --arch=x86_64 --machine=q35 --description "demo-server migration" --os-variant=
lsb_release -rd
Description: Ubuntu 24.04 LTS
Release: 24.04
apt-cache policy libvirt-daemon
libvirt-daemon:
Installed: 10.0.0-2ubuntu8.2
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: libvirt-daemon 10.0.0-2ubuntu8.2
ProcVersionSign
Uname: Linux 6.8.0-36-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckR
CloudArchitecture: x86_64
CloudBuildName: server
CloudID: lxd
CloudName: lxd
CloudPlatform: lxd
CloudSerial: 20240702
CloudSubPlatform: LXD socket API v. 1.0 (/dev/lxd/sock)
Date: Wed Jul 3 18:43:50 2024
ProcEnviron:
LANG=C.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
XDG_RUNTIME_
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 147 lines (+125/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-2071848-fix-migration-with-disabled-vmx-features.patch (+117/-0)
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 147 lines (+125/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-2071848-fix-migration-with-disabled-vmx-features.patch (+117/-0)
Changed in libvirt (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Critical |
assignee: | nobody → Sergio Durigan Junior (sergiodj) |
Changed in libvirt (Ubuntu Noble): | |
status: | New → Triaged |
importance: | Undecided → Critical |
assignee: | nobody → Sergio Durigan Junior (sergiodj) |
tags: | added: server-todo |
description: | updated |
This bug was fixed in the package libvirt - 10.0.0-2ubuntu9
---------------
libvirt (10.0.0-2ubuntu9) oracular; urgency=medium
* d/p/u/lp- 2071848- fix-migration- with-disabled- vmx-features. patch:
Fix migration issues with disabled vmx-* CPU features. (LP: #2071848)
-- Sergio Durigan Junior <email address hidden> Thu, 04 Jul 2024 16:06:28 -0400