Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#61970 - [qemu][linux] Default nested=Y in kvm-intel of linux 5.0 breaks libvirt VM migration/save/restore

Attached to Project: Arch Linux
Opened by Stephan Eisvogel (bsdice) - Monday, 11 March 2019, 04:00 GMT
Last edited by David Runge (dvzrv) - Friday, 17 January 2020, 11:06 GMT
Task Type Bug Report
Category Packages: Testing
Status Assigned
Assigned To Tobias Powalowski (tpowa)
Jan Alexander Steffens (heftig)
Anatol Pomozov (anatolik)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 4
Private No

Details

Description:

Commit 1e58e5e59148916fa43444a406335a990783fb78 on 17 Oct 2018 by bonzini set
nested = 1 as default in arch/x86/kvm/vmx.c to enable support of nested VMs
by default.

This breaks live migration and libvirt-guests.sh (save/restore VMs on host
reboot without shutting them down) on kernel 5.0.0 because most recent
QEMU 3.1 has no support for VMs with nested = 1 yet.

See https://wiki.qemu.org/ChangeLog/3.1, quote: "x86 machines cannot be
live-migrated if nested Intel virtualization is enabled. The next version of
QEMU will be able to do live migration when nested virtualization is enabled,
if supported by the kernel."

libvirt will log:
internal error: unable to execute QEMU command 'migrate': Nested VMX
virtualization does not support live migration yet

Workaround:

echo "options kvm-intel nested=N" >> /etc/modprobe.d/kvm.conf
This task depends upon

Comment by Stephan Eisvogel (bsdice) - Wednesday, 24 April 2019, 10:36 GMT
Not fixed as of QEMU 4.0.0 released today. Compare https://github.com/qemu/qemu/blob/master/target/i386/kvm.c#L1275
Comment by loqs (loqs) - Friday, 16 August 2019, 01:18 GMT Comment by Stephan Eisvogel (bsdice) - Wednesday, 28 August 2019, 15:01 GMT
Can't tell yet.

Did an -Syu update on Aug 21st which included qemu 4.1. After a couple of days, a windows 7 vm suffered disk corruption which was so bad, it would not even boot anymore. I blamed my linux 5.2 custom kernel with some patches so I moved back to 4.9.x-lts. More corruptions. Then I blamed a possibly faulty ext4 code path since I moved to rootflags=data=journal,nodelalloc in the recent past. More corruptions. Finally I downgraded to qemu 4.0 and the corruptions stopped. After a while I figured out it happens when a qemu <= 4.0 qcow2 image is using compression and you decide to use the image on qemu 4.1. After a qemu-img convert without compression it looked like the image worked with 4.1 as well. Miffed, I decided to stay with qemu 4.0 for the time being. Libvirt live snapshots, a pretty deep Borg backup history and Bareos saved the day.

Loading...