blob: 907a3b1fea236b070d27f7a342ada2517de39ed8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
postcopy migration fails in hirsute (solved)
FYI: this is an intended change, can be overwritten via config and this bug is mostly to have something puzzled users can find via search engines to explain and solve their issue.
postcopy migration can in some cases be very useful
=> https://wiki.qemu.org/Features/PostCopyLiveMigration
But with Hirsute kernel being 5.11 that now contains the following upstream change
=> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0d4730ac2
Due to that postcopy migration will fail like:
+ lxc exec testkvm-focal-from -- virsh migrate --unsafe --live --postcopy --postcopy-after-precopy kvmguest-focal-postcopy qemu+ssh://10.85.93.248/system
error: internal error: unable to execute QEMU command 'migrate-set-capabilities': Postcopy is not supported
This will also apply to e.g. a Focal-HWE kernel once on v5.11 or to Focal userspaces in a container under a Hirsute kernel (that is the example above).
This was done for security reasons, if you want/need to re-enable un-limited userfault handling to be able to use postcopy again you'd want/need to set the control knob to one like:
$ sudo sysctl -w "vm.unprivileged_userfaultfd=1"
Also documented in https://askubuntu.com/questions/1334249/qemu-kvm-postcopy-migration-fails-in-hirsute-v5-11-kernels-solved/1334250
Also added as known issue in https://discourse.ubuntu.com/t/hirsute-hippo-release-notes/19221
I hope that this will help the case to be found by affected users.
juju config live-migration-permit-post-copy on the nova-compute charm, could auto enable vm.unprivileged_userfaultfd=1, or at least state this requirement on it's description.
I'm assigning this to won't fix based on it being a hirsute issue. Hirsuite is EOL as of January 20, 2022. However, if this is affecting newer releases of Ubuntu then please re-open. thanks.
Hi @ajkavanagh, this affects focal-hwe, jammy and will affect any new releases unless this sysctl is set to 1.
Based on @felipe's comment in #4, I'm triaging to medium. A possible fix is to enable the sysctl to be executed if the config option " enable-live-migration" is set to True in the charm. This is relatively easy to do. It should also be documented in the charm-guide if the fix is done.
|