Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
tpm12 is no longer supported, when run swtpm socket with default tpm1.2 version,
the error output is not clear.
Version-Release number of selected component (if applicable):
swtpm-0.7.0-1.20211109gitb79fd91.el9.x86_64
libtpms-0.9.0-0.20211004gitdc4e3f6313.el9.x86_64
libvirt-7.9.0-1.el9.x86_64
qemu-kvm-6.1.0-6.el9.x86_64
edk2-ovmf-20210527gite1999b264f1f-7.el9.noarch
kernel-5.14.0-15.el9.x86_64
How reproducible:
100%
Steps to Reproduce:
1. mkdir /tmp/mytpm
# swtpm_setup --tpmstate /tmp/mytpm --create-ek-cert --create-platform-cert --overwrite
swtpm at /usr/bin/swtpm does not support TPM 1.2
2. # /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/tmp/guest-swtpm.sock,mode=0600 --tpmstate dir=/tmp/mytpm,mode=0600
swtpm: Error: Could not choose TPM version.
Actual results:
Unclear error in step2.
Expected results:
The error message could be improved to state which version was requested and unsupported, similar to step1.
Additional info:
Looks like upstream swtpm commit 6d1a7abbfc3fdbfd4ddf683416318b2fb8d109b2 (after 0.7.0) could resolve this.
Comment 2Marc-Andre Lureau
2022-01-24 18:37:32 UTC
The swtpm commands are not supposed to be run by the user manually.
If you configure a libvirt VM with (unsupported on RHEL) TPM 1.2, you'll get the error "swtpm at /usr/bin/swtpm does not support TPM 1.2".
(I thought libvirt was checking the capabilities earlier, but it's not yet the case. The swtpm capabilities features "tpm-1.2" and "tpm-2.0" have been added recently - libvirt will probably handle that at some point)
Based on the above, I think it's not worth to backport the swtpm fix, it will eventually get fixed in a future rebase. Closing, thanks