Issue creating VM from template using terraform

Hello,

I need help with some issues i am facing when trying to clone a VM from a template i created using packer in VMware. Below is the error i get when i try to initiate the build from terraform

vsphere_virtual_machine.vm: Creating…

│ Error: error reconfiguring virtual machine: error reconfiguring virtual machine: Invalid operation for device ‘0’.

│ with vsphere_virtual_machine.vm,
│ on template-windows.tf line 35, in resource “vsphere_virtual_machine” “vm”:
│ 35: resource “vsphere_virtual_machine” “vm” {

I am using the below version for terraform and packer:

VMware is on prem. Terraform we are initiating from our local pc. We are using VMware esxi 7.0 and Vcenter 8.0

Terraform version being used is 1.4.6

The image template was built using Packer 1.9.0

Any help will be really appreciated.

NOTE: I am able to build VM from the template in vsphere manually from Vcenter but not from terraform.

Can someone please provide some guidance on this?

same issue here… did you managed to solve it? thanks…