hashicorp / packer-plugin-vmware

Packer plugin for VMware Builder
https://www.packer.io/docs/builders/vmware
Mozilla Public License 2.0
49 stars 42 forks source link

Add support for vTPM #110

Open JM2K69 opened 1 year ago

JM2K69 commented 1 year ago

With VMware Workstation it would be great to support Windows 11 a guest and support to add vTPM with vmware-iso plugins. II can add in my hcl file

 vmx_data = {
// add this things works great
 **"firmware" = "efi",**
 **"managedVM.autoAddVTPM" = "software",**
 ** "uefi.secureBoot.enabled" = "TRUE",**
 **"vhv.enable" = "TRUE",**
    "sharedFolder0.present" = "FALSE",
  "hgfs.mapRootShare" = "FALSE",
  "isolation.tools.hgfs.disable" = "TRUE",
  "hgfs.linkrootshare" = "FALSE",
  "usb.present" = "TRUE"
  "ehci.present" = "TRUE"
  "usb_xhci.present" = "TRUE"
  "usb.pciSlotNumber" = "32"
  "usb_xhci.pciSlotNumber" = "192"
  "usb_xhci:4.present "= "TRUE"
  "usb_xhci:4.deviceType" = "hid"
  "usb_xhci:4.port" = "4"
  "usb_xhci:4.parent" = "-1"
  "unity.wasCapable" = "TRUE"
  }

but with there isn't default option and when the VM boot up ton VMware workstation there is no option to send key to the VM for Windows 11 VM for Exemple because the Iso required to press on keys to boot.

tenthirtyam commented 4 months ago

Dependent on #58 and #212.

tenthirtyam commented 4 months ago

If supported, this should be only added to Workstation and Fusion. (For ESXi, use packer-plugin-vsphere.)

In addition, there would need to be settings for:

firmware = "efi" <--- secure boot is not required.
vmx.encryptionType = "partial" <--- would not be able to do full.
vtpm.ekCSR = "..." <--- would need to generate
vtpm.ekCRT = "..." <--- would need to generate
vtpm.present = "TRUE" <--- must be true
encryption.keySafe = "..." <--- would need to generate
encryption.data = "..." <--- would need to generate

Ryan