Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1787444

Summary: Broken postcopy migration with vTPM device
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Marc-Andre Lureau <marcandre.lureau>
Component: qemu-kvmAssignee: Marc-Andre Lureau <marcandre.lureau>
qemu-kvm sub component: General QA Contact: Qinghua Cheng <qcheng>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: areis, berrange, chhu, ddepaula, dyuan, jferlan, jinzhao, juzhang, knoel, marcandre.lureau, qcheng, virt-maint, yanqzhan
Version: 8.1Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: 8.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-4.2.0-9.module+el8.2.0+5699+b5331ee5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1759753 Environment:
Last Closed: 2020-05-05 09:55:17 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marc-Andre Lureau 2020-01-02 21:09:36 UTC
+++ This bug was initially created as a clone of Bug #1759753 +++

--- Additional comment from yanqzhan on 2019-12-26 11:10:36 UTC ---

Issue also reproduces for uefi guest on latest:
qemu-kvm-4.1.0-20.module+el8.1.1+5309+6d656f05.x86_64
swtpm-0.2.0-1.20191018git9227cf4.module+el8.1.1+5309+6d656f05.x86_64
libvirt-daemon-5.6.0-10.module+el8.1.1+5309+6d656f05.x86_64

#  virsh migrate rhel8.1-ovmf --live qemu+ssh://10.66.85.249/system --verbose --postcopy --postcopy-after-precopy 
error: internal error: qemu unexpectedly closed the monitor: qemu_madvise: Invalid argument
madvise doesn't support MADV_DONTDUMP, but dump_guest_core=off specified
2019-12-26T10:22:44.714644Z qemu-kvm: ram_block_discard_range: Unaligned start address: 0x559d2afae9a0
2019-12-26T10:22:44.714892Z qemu-kvm: load of migration failed: Operation not permitted

Eventhough enable "dump_guest_core=1" in target's qemu.conf, still meet error:
#  virsh migrate rhel8.1-ovmf --live qemu+ssh://10.66.85.249/system --verbose --postcopy 
error: internal error: qemu unexpectedly closed the monitor: 2019-12-26T10:58:04.179006Z qemu-kvm: ram_block_discard_range: Unaligned start address: 0x5597964ef410
2019-12-26T10:58:04.179230Z qemu-kvm: load of migration failed: Operation not permitted

Comment 1 Marc-Andre Lureau 2020-01-02 21:12:50 UTC
Upstream fix "[PATCH 0/2] tpm: fix PPI RAM migration"

Comment 2 Ademar Reis 2020-02-05 23:11:49 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 5 Qinghua Cheng 2020-03-12 08:16:07 UTC
Verified this bug on:

RHEL 8.2
qemu-kvm: qemu-img-4.2.0-14.module+el8.2.0+5995+d02a4eeb.x86_64
kernel: 4.18.0-187.el8.x86_64

Guest with vtpm device post-copy migration succeeded. 

BTW, this bug is not reproduced with windows guests.

Comment 7 errata-xmlrpc 2020-05-05 09:55:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017