Bug 2035731
Summary: | Failed to restore vm after saving a booting vm with vtpm device | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Fangge Jin <fjin> | |
Component: | libtpms | Assignee: | Marc-Andre Lureau <marcandre.lureau> | |
Status: | CLOSED ERRATA | QA Contact: | Qinghua Cheng <qcheng> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 9.0 | CC: | coli, jinzhao, marcandre.lureau, qcheng, stefanb, virt-maint, xiaohli, yanqzhan, yfu | |
Target Milestone: | rc | Keywords: | AutomationTriaged, Triaged | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libtpms-0.9.1-2.20211126git1ff6fe1f43.el9 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2111433 (view as bug list) | Environment: | ||
Last Closed: | 2022-11-15 10:26:42 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2111433 |
Description
Fangge Jin
2021-12-27 09:48:14 UTC
We don't reproduce it with Win11 and Win2022 guests Environment: libtpms-0.9.1-0.20211126git1ff6fe1f43.el9.x86_64 swtpm-0.7.0-1.20211109gitb79fd91.el9.x86_64 qemu-kvm-6.2.0-1.el9.x86_64 libvirt-7.10.0-1.el9.x86_64 edk2-ovmf-20210527gite1999b264f1f-7.el9.noarch The fix for this is in a PR here now: https://github.com/stefanberger/libtpms/pull/287 Hi there, We i test migration with Win11 + tpm device, if src and dst vm use same tpm daemon by mistake, can hit the same error info: 18:23:27 INFO | [qemu output] qemu-kvm: tpm-emulator: Setting the stateblob (type 2) failed with a TPM error 0x84 18:23:27 INFO | [qemu output] qemu-kvm: error while loading state for instance 0x0 of device 'tpm-emulator' 18:23:27 INFO | [qemu output] qemu-kvm: load of migration failed: Input/output error 18:23:27 INFO | [qemu output] (Process terminated with status 1) Just for a reference, thanks! (In reply to Yanan Fu from comment #5) > Hi there, > > We i test migration with Win11 + tpm device, if src and dst vm use same tpm > daemon by mistake, can hit the same error info: What is 'same tpm daemon by mistake'? > > 18:23:27 INFO | [qemu output] qemu-kvm: tpm-emulator: Setting the stateblob > (type 2) failed with a TPM error 0x84 > 18:23:27 INFO | [qemu output] qemu-kvm: error while loading state for > instance 0x0 of device 'tpm-emulator' > 18:23:27 INFO | [qemu output] qemu-kvm: load of migration failed: > Input/output error > 18:23:27 INFO | [qemu output] (Process terminated with status 1) > > > Just for a reference, thanks! Is this with the fix applied to libptms on both machines or without? (In reply to Stefan Berger from comment #6) > (In reply to Yanan Fu from comment #5) > > Hi there, > > > > We i test migration with Win11 + tpm device, if src and dst vm use same tpm > > daemon by mistake, can hit the same error info: > > What is 'same tpm daemon by mistake'? It is for local migration test: 1. src vm, qemu cli: -chardev socket,id=char_vtpm_tpm0,path=/tmp/avocado_5l5j2ys4/avocado-vt-vm1_tpm0_swtpm.sock \ <--- here -tpmdev emulator,chardev=char_vtpm_tpm0,id=emulator_vtpm_tpm0 \ -device tpm-crb,id=tpm-crb_vtpm_tpm0,tpmdev=emulator_vtpm_tpm0 \ 2. dst vm qemu cli: -chardev socket,id=char_vtpm_tpm0,path=/tmp/avocado_5l5j2ys4/avocado-vt-vm1_tpm0_swtpm.sock \ <--- here -tpmdev emulator,chardev=char_vtpm_tpm0,id=emulator_vtpm_tpm0 \ -device tpm-crb,id=tpm-crb_vtpm_tpm0,tpmdev=emulator_vtpm_tpm0 \ I hit the same error when use same 'path' for both src and dst vm. This is incorrect usage, so i say 'by mistake'. The correct usage is using unique path for each one, in this way, it works normally. > > > > > 18:23:27 INFO | [qemu output] qemu-kvm: tpm-emulator: Setting the stateblob > > (type 2) failed with a TPM error 0x84 > > 18:23:27 INFO | [qemu output] qemu-kvm: error while loading state for > > instance 0x0 of device 'tpm-emulator' > > 18:23:27 INFO | [qemu output] qemu-kvm: load of migration failed: > > Input/output error > > 18:23:27 INFO | [qemu output] (Process terminated with status 1) > > > > > > Just for a reference, thanks! > > Is this with the fix applied to libptms on both machines or without? Without any fix. Anyway, thanks for finding the bug! QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass. Verified for on rhel 9.1 kernel: 5.14.0-114.el9.x86_64 qemu: qemu-kvm-7.0.0-6.el9.x86_64 libtpms-0.9.1-2.20211126git1ff6fe1f43.el9.x86_64 swtpm-0.7.0-3.20211109gitb79fd91.el9.x86_64 edk2-ovmf-20220526git16779ede2d36-1.el9.noarch guest: win11 Looped the actions virsh start <vm> (save it immediately) virsh managedsave <vm> virsh start <vm> 40 times, guest vm works normally. Set bug status to verified. 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 (libtpms bug fix and enhancement update), 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-2022:8141 |