KVM/QEMU live migration fails with Ubuntu wily kernel 4.2.0-30.35
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Mar 3 07:45:58 UTC 2016
Hi Kamal,
On 02.03.2016 22:36, Kamal Mostafa wrote:
> On Tue, 2016-03-01 at 08:49 +0100, Thomas Lamprecht wrote:
>> Hi all!
>>
>> First of all, most of the information I'm posting here is available
>> at:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1540532
>> But as it seems this "bug report" won't get much attention anymore
>> I'm
>> posting it here again, in the hope that I do not step on any feet and
>> that it gets resolved
>
> Hi Thomas-
>
> Thanks for your work on this -- your detailed analysis is very much
> appreciated! I'll start the process of getting your backport applied
> and deployed.
>
Great, thanks.
> We'll need a *new* Launchpad bug report to track the issue. Can I ask
> you to file one please? (Attach your backport to the new bug, and send
> me the bug number).
>
Here it is: 1552592
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1552592
cheers,
Thomas
> -Kamal
>
>
>> The Ubuntu-4.2.0-30.35 introduced a regression regarding live
>> migration.
>> When migrating live the VM will start on the target host but is
>> completely frozen.
>> This affects all types of VMs, I after receiving a bug report with a
>> WIndows VM I tested it with various distros, like: Alpine Linux,
>> Linux
>> Mint, Ubuntu Desktop 15.10, Windows 7.
>> I always get the same result, the VM is completely frozen and in no
>> way
>> responsive or reachable. In some cases the VM was not frozen but
>> rather
>> reset on the target.
>>
>> A git bisect and a bit of guessing gave me the culprit, its
>> 3f11933efc9ef55ecb2ac7e6d626e8d05a99a4b1 (KVM: x86: expose
>> MSR_TSC_AUX
>> to userspace) from the ubuntu repo, or the respective kernel upstream
>> patch9dbe6cf941a6fe82933aef565e4095fb10f65023 .
>>
>> Reverting this fixes the issue (with no introduced regression, as far
>> as
>> I've seen).
>>
>> But as I tested the master and master-next branches from the Ubuntu
>> Xenial kernel repos and I knew that this patch was there and live
>> migration was working I reverse bisect (i.e. switch good and bad) the
>> 4.4 to find the fix to this issue and backported it back to the 4.2
>> Wily
>> kernel and tested it successfully.
>>
>> The fix is commit 81b1b9ca6d5ca5f3ce91c0095402def657cf5db3 (KVM: VMX:
>> Fix host initiated access to guest MSR_TSC_AUX) upstream and the
>> backport patch is attached to the Ubuntu launchpad bug link i posted
>> at
>> the beginning.
>> https://launchpadlibrarian.net/243097677/0001-KVM-VMX-Fix-host-initia
>> ted-access-to-guest-MSR_TSC_A.patch
>>
>> The backport was rather trivial, I only had to replace the new
>> guest_cpuid_has_rdtscp(vcpu) with the old check on the vmx struct.
>>
>> If any action by my side should/must be taken to land this in ubuntu
>> kernel repo, e.g. sending the patch to this list, feel free to notify
>> me.
>>
>> best regards,
>> Thomas
>>
>>
>
More information about the kernel-team
mailing list