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 freswa (frederik) - Friday, 04 September 2020, 21:33 GMT
Opened by Stephan Eisvogel (bsdice) - Monday, 11 March 2019, 04:00 GMT
Last edited by freswa (frederik) - Friday, 04 September 2020, 21:33 GMT
|
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
Closed by freswa (frederik)
Friday, 04 September 2020, 21:33 GMT
Reason for closing: Fixed
Additional comments about closing: qemu 4.1.0-1
Friday, 04 September 2020, 21:33 GMT
Reason for closing: Fixed
Additional comments about closing: qemu 4.1.0-1
https://github.com/qemu/qemu/commit/ebbfef2f34cfc749c045a4569dedb4f748ec024a
https://github.com/qemu/qemu/commit/12604092e26cdace44c901bc429e7e4c7c3e0cab
https://github.com/qemu/qemu/commit/79a197ab180e75838523c58973b1221ad7bf51eb
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.