blob: 05e0a553de64b1abaaf0bc925ef517e911cd0bea [file] [log] [blame]
vexxhost-bot57490e42024-12-12 21:42:59 -05001#######################################
2Emulated Trusted Platform Module (vTPM)
3#######################################
4
5
6The vTPM feature is enabled by default, so just verify and configure the flavor with
7vTPM.
8
9Verify the configuration
10========================
11
12Verify vTPM support by inspecting the traits on the compute nodes resource provider:
13
14.. code-block:: console
15
16 $ COMPUTE_UUID=$(openstack resource provider list --name $HOST -f value -c uuid)
17 $ openstack resource provider trait list $COMPUTE_UUID | grep SECURITY_TPM
18 | COMPUTE_SECURITY_TPM_1_2 |
19 | COMPUTE_SECURITY_TPM_2_0 |
20
21$HOST represents the hostname of the compute node where you want to verify vTPM support.
22
23
24Configuring a flavor or image
25=============================
26
27A vTPM can be requested on a server via flavor extra specs or image metadata properties.
28There are two versions supported - 1.2 and 2.0 - and two models - TPM Interface
29Specification (TIS) and Command-Response Buffer (CRB). The CRB model is only supported
30with version 2.0.
31
32For example, to configure a flavor to use the TPM 2.0 with the CRB model:
33
34.. code-block:: console
35
36 $ openstack flavor create test.vtpm \
37 --ram 512 --disk 1 --vcpus 1 \
38 --property hw:tpm_version=2.0 \
39 --property hw:tpm_model=tpm-crb
40
41To configure a image to use the TPM 2.0 with CRB model:
42
43.. code-block:: console
44
45 $ openstack image set <image-name-or-uuid> \
46 --property hw:tpm_version=2.0 \
47 --property hw:tpm_model=tpm-crb
48
49
50Create an instance with vTPM
51============================
52With configuration complete, we can finally proceed to creating an instance. Simply create
53an instance using the flavor we created previously.