You can manually export a virtual machine with vTPM device from Workstation Pro to Open Virtualization Format (OVF) using the command line of OVF Tool 4.5 or later. The OVF Tool is bundled with Workstation Pro. You can export to both .ovf and .ova files.
A virtual machine with vTPM is always encrypted. You cannot directly convert a virtual machine with vTPM device in Workstation Pro from VMware runtime (.vmx) format to OVF format because the OVF Tool does not support export of an encrypted virtual machine. Before you proceed with the manual export, you must manually remove the vTPM device and decrypt the virtual machine. After you decrypt the virtual machine, export the virtual machine to OVF with a vTPM placeholder.
The following steps guide you through the process of manually removing the vTPM, decrypting the virtual machine, and then exporting to OVF using command line.
Procedure
- To remove the vTPM, perform the following steps:
- Select the required virtual machine, and then go to .
- On the Hardware tab, select Trusted Platform Module.
- Click Remove.
Workstation Pro removes the vTPM successfully.
- To remove the virtual machine encryption, perform the following steps:
- Select the required virtual machine, and then go to .
- On the Options tab, select Access Control.
- On the right panel, click Remove Encryption....
- Enter the encryption password of the virtual machine, and then click Remove Encryption.
Workstation Pro removes the encryption successfully.
- To export the virtual machine to OVF with an added vTPM placeholder, use the following command in the OVF Tool bundled with Workstation Pro:
main % "C:\Program Files (x86)\VMware\VMware Workstation\OVFTool\ovftool.exe" --X:logLevel=verbose --exportFlags=extraconfig --allowExtraConfig --addDevice:vtpm '<path of the virtual machine vmx file with the file name>' '<path to export the ovf file with the file name>'
The following is an example command to export a virtual machine named
vm:
main % "C:\Program Files (x86)\VMware\VMware Workstation\OVFTool\ovftool.exe" --X:logLevel=verbose --exportFlags=extraconfig --allowExtraConfig --addDevice:vtpm "C:\Users\abc\Documents\Virtual Machines\vm\vm.vmx" "C:\Users\abc\Documents\Virtual Machines\vm\vm.vmx"
Note:
Workstation Pro does not provide a graphical user interface to export a virtual machine with a vTPM placeholder. A user must use the command line to export a virtual machine with a vTPM placeholder.
After you export the virtual machine, the OVF file shows the added vTPM placeholder in the following format:
<Item ovf:required="false">
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:ElementName>Virtual TPM</rasd:ElementName>
<rasd:InstanceID>14</rasd:InstanceID>
<rasd:ResourceSubType>vmware.vtpm</rasd:ResourceSubType>
<rasd:ResourceType>1</rasd:ResourceType>
</Item>