vexxhost-bot | 57490e4 | 2024-12-12 21:42:59 -0500 | [diff] [blame] | 1 | ####################################### |
| 2 | Emulated Trusted Platform Module (vTPM) |
| 3 | ####################################### |
| 4 | |
| 5 | |
| 6 | The vTPM feature is enabled by default, so just verify and configure the flavor with |
| 7 | vTPM. |
| 8 | |
| 9 | Verify the configuration |
| 10 | ======================== |
| 11 | |
| 12 | Verify vTPM support by inspecting the traits on the compute node’s 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 | |
| 24 | Configuring a flavor or image |
| 25 | ============================= |
| 26 | |
| 27 | A vTPM can be requested on a server via flavor extra specs or image metadata properties. |
| 28 | There are two versions supported - 1.2 and 2.0 - and two models - TPM Interface |
| 29 | Specification (TIS) and Command-Response Buffer (CRB). The CRB model is only supported |
| 30 | with version 2.0. |
| 31 | |
| 32 | For 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 | |
| 41 | To 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 | |
| 50 | Create an instance with vTPM |
| 51 | ============================ |
| 52 | With configuration complete, we can finally proceed to creating an instance. Simply create |
| 53 | an instance using the flavor we created previously. |