Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MichalMarchewka opened this issue Feb 7, 2022 · 3 comments
Open

Comments

@MichalMarchewka
Copy link

MichalMarchewka commented Feb 7, 2022

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):

  • OS: Windows 11
  • Terraform Version: 1.1.2
  • Ovftool Version: 4.4.3 (build-18663434)
  • This Plugin Version 1.10.2

Additional context

  • VM firmware is BIOS
  • answer file disk config is set for BIOS (two partitions), not UEFI (four partitions)
  • the same Windows iso works normally when the VM is created manually via GUI
@MichalMarchewka
Copy link
Author

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

@MichalMarchewka
Copy link
Author

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
Copy link
Owner

josenk commented Feb 15, 2022

Ref: #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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants