Bug 2152915

Summary: Not able to install windows 11 OS with vTPM in spec (disable FIPS) [rhel-9.0.0.z]
Product: Red Hat Enterprise Linux 9 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: swtpmAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED ERRATA QA Contact: Qinghua Cheng <qcheng>
Severity: high Docs Contact:
Priority: high    
Version: 9.1CC: ailan, berrange, coli, fdeutsch, jinzhao, jlejosne, juzhang, lmen, marcandre.lureau, mdean, mkedzier, mtessun, mzamazal, ncist2011, qizhu, ssorce, stefanb, yalzhang, yanqzhan, ycui, ymankad
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.7.0-2.20211109gitb79fd91 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2090219 Environment:
Last Closed: 2023-01-30 15:34:32 UTC Type: ---
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: 2090219    
Bug Blocks:    

Comment 4 Yanqiu Zhang 2023-01-03 10:16:45 UTC
Test for linux guest PASS:
swtpm-0.7.0-3.20211109gitb79fd91.el9_0.x86_64
libtpms-0.9.1-0.20211126git1ff6fe1f43.el9.x86_64
libvirt-8.0.0-8.4.el9_0.x86_64
qemu-kvm-6.2.0-11.el9_0.6.x86_64

# virsh dumpxml avocado-vt-vm1 |grep /tpm -B7
    <tpm model='tpm-crb'>
      <backend type='emulator' version='2.0'>
        <encryption secret='679e1051-ce72-4756-9ad6-ce2c51240f29'/>
        <active_pcr_banks>
          <sha256/>
        </active_pcr_banks>
      </backend>
    </tpm>

# virsh start avocado-vt-vm1 
Domain 'avocado-vt-vm1' started

# cat /var/log/swtpm/libvirt/qemu/avocado-vt-vm1-swtpm.log 
  The TPM's state will be encrypted using a key derived from a passphrase (fd).
Starting vTPM reconfiguration as tss:tss @ Tue 03 Jan 2023 05:12:28 AM EST
Warning: Disabled OpenSSL FIPS mode
Successfully activated PCR banks sha256 among sha1,sha256,sha384,sha512.
Successfully authored TPM state.
Ending vTPM manufacturing @ Tue 03 Jan 2023 05:12:28 AM EST
Warning: Disabled OpenSSL FIPS mode

# virsh console avocado-vt-vm1 
Connected to domain 'avocado-vt-vm1'
Escape character is ^] (Ctrl + ])

localhost login: root
Password: 
Last login: Tue Jan  3 17:42:25 on ttyS0
[root@localhost ~]#  ls /dev|grep tpm
tpm0
tpmrm0
[root@localhost ~]# # tpm2_getrandom --hex 16
[root@localhost ~]#  tpm2_getrandom --hex 16
4e52842d1bf59aacb378a845d23ade2e

Comment 5 Qinghua Cheng 2023-01-05 03:20:16 UTC
Verified on rhel 9.0.0 with windows guest:

kernel: 5.14.0-70.36.1.el9_0.x86_64
qemu-kvm: qemu-kvm-6.2.0-11.el9_0.6.x86_64
libtpms-0.9.1-0.20211126git1ff6fe1f43.el9.x86_64
swtpm-libs-0.7.0-3.20211109gitb79fd91.el9_0.x86_64
swtpm-0.7.0-3.20211109gitb79fd91.el9_0.x86_6

# fips-mode-setup --check
FIPS mode is enabled.

Win11 guest installed successfully

Get message in swtpm log file:

Warning: Disabled OpenSSL FIPS mode

Comment 10 errata-xmlrpc 2023-01-30 15:34:32 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 (swtpm 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-2023:0516