josenk / terraform-provider-esxi

Terraform-provider-esxi plugin
GNU General Public License v3.0
545 stars 154 forks source link

Windows guest with answer file- "Windows could not apply (...)" #168

Open MichalMarchewka opened 2 years ago

MichalMarchewka commented 2 years ago

Describe the bug After the creating a guest VM, attaching Windows iso image with autounattend.xml (via GUI), and starting the VM, during the Windows installation "Windows could not apply the unattend answer file's setting" error appears.

To Reproduce Steps to reproduce the behavior:

  1. Create a guest VM in TF
  2. Attach Windows iso image with autounattend.xml via GUI
  3. Power on VM

Expected behavior Windows installation completes successfully

Terraform files main.tf esxi_maintf guest.tf esxi_guesttf VM created manually esxi_w10_manual VM created via TF esxi_w10_tf

Desktop (please complete the following information):

Additional context

MichalMarchewka commented 2 years ago

vSphere provider from Hashicorp has the very same issue. I am checking this myself and I will try to figure it out.

MichalMarchewka commented 2 years ago

The issue is that scsi_type must be set to lsilogic-sas, by default is pvscsi. vSphere provider has implemented possibility to change it: https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/virtual_machine#scsi_type

josenk commented 2 years ago

Ref: https://github.com/josenk/terraform-provider-esxi/issues/24 I'll try to make this a priority. In the mean time, there are ways to use pvscsi (which performs better anyways...). I have not tried it, but you can google it to see how it can be done...