VMware Workstation

 View Only
  • 1.  VMCLI - add encryption for enabling TPM

    Posted Jul 02, 2025 07:03 AM

    Hi all

    My automation for building VM's with VMCLI is slowly going in the right direction, but I'm having trouble with figureing out how to add encryption to the .vmx, in order to allow a TPM module in the VM.

    How would I add encryption with code?



  • 2.  RE: VMCLI - add encryption for enabling TPM

    Posted 21 days ago
    Edited by Stickybit2000 21 days ago

    Any method at all - for enabling encryption / TPM with some kind of command line tool? 

    These are the settings that needs to be automated, in case anyone was wondering what I'm blabbering about:

    vmx.encryptionType = "partial"
    vtpm.ekCSR = "MIIDbjCCAlYCAQAwSDEWMBQGBWeBBQIBDAtpZ...."
    vtpm.ekCRT = "MIIEPjCCAyagAwIBAgIBATANBgkqhkiG9w0BAQsFA...."
    vtpm.present = "TRUE"
    encryption.keySafe = "vmware:key/list/(pair/(phrase/K2C1BPve6M0%3d/pass2key%3dPBKDF2%2dHM....))"
    encryption.data = "pCaGF7K85+RPw7cYI9LTCOTQHHwi9lDebF...."







  • 3.  RE: VMCLI - add encryption for enabling TPM

    Posted 14 days ago

    Been testing this script, but with no success: VMwareVMX

    The script was able to encrypt and decrypt the .wmx file, but VMware didn't seem to be able to read the file (the password could not be validated).

    All this means that it's currently not possible to create a functional Windows11 guest using scripting, as a TPM module (hence encryption) is required.

    -------------------------------------------



  • 4.  RE: VMCLI - add encryption for enabling TPM

    Broadcom Employee
    Posted 13 days ago

    Thank you for trying this out, but Currently `vmcli` doesn't support creating VMs-disks with encryption or add VTPM device. 

    -------------------------------------------



  • 5.  RE: VMCLI - add encryption for enabling TPM

    Posted 13 days ago

    Thanks for the update Gaurav. Would it be possible to reveal some thoughts about the future for vmcli? - as the need for full automation is a requirement for us, for a potential move from Virtualbox.

    -------------------------------------------