For a VM with TPM enabled, you can use the file upload OpenAPI provided by SCP or HCI to restore the TPM file. Whether restoring to a newly created VM or an existing one, the restoration process is the same: Upload and restore the TPM file to the target VM. When using the file upload OpenAPI to restore the TPM file, please note the following:
When uploading the TPM file, the VM ID (SCP: server_id, HCI: vmID) must be specified. The target VM must exist before the operation.
The upload API uses the POST method and requires the file to be uploaded in form-data format (Content-Type: multipart/form-data). Additional parameters should be passed as query parameters.