Sure! Here is a new blog post based on the information provided:
When deploying a new Windows Server Core VM using Terraform, you may encounter an issue with Guest Customizations timed out due to the VM Template being configured with EFI Firmware. This error occurs because Terraform deploys the new VM with BIOS Firmware, resulting in the disk not able to boot.
To resolve this issue, you can set the firmware type on deployment using the Terraform vSphere Provider. In the instance declaration file, you can set the firmware as shown below:
“`
resource “vsphere_virtual_machine” “example” {
// other properties…
firmware = “bios”
}
“`
Alternatively, you can set the default firmware type in your variables.tf file and reference it in your instance declaration file like this:
“`
variable “firmware_type” {
default = “bios”
}
resource “vsphere_virtual_machine” “example” {
// other properties…
firmware = var.firmware_type
}
“`
By setting the firmware type using one of these methods, you can ensure that your new VM boots correctly and Guest Customizations are applied successfully.
This issue is related to the default configuration of vSphere 6.7 VMs, which use EFI Firmware by default. When cloning a VM with Terraform, it deploys the new VM with BIOS Firmware, resulting in the disk not able to boot.
The solution is to set the firmware type on deployment using the Terraform vSphere Provider. This can be done in the instance declaration file or in your variables.tf file as described above.
Terraform Version: 0.11.7
Resources:
*
*
*
Note: The issue is related to the default configuration of vSphere 6.7 VMs, which use EFI Firmware by default. When cloning a VM with Terraform, it deploys the new VM with BIOS Firmware, resulting in the disk not able to boot.