Terraform Error: timeout waiting for customization to complete

Hi Team

We are using terraform to create Virtual machines in vSphere vCenter, sometime we are getting below error/warnings and it’s intermittent.

Could you please suggest what is causing the issue.

Terraform version: v0.12.25
vSphere provider version: 1.18.0

##################

2020/07/14 09:04:13 [WARN] Provider “registry.terraform.io/-/vsphere” produced an invalid plan for module.test-3-noto.module.app10082-server.vsphere_virtual_machine.vm[“hostname_of_server”], but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .run_tools_scripts_before_guest_standby: planned value cty.True does not match config value cty.NullVal(cty.Bool)
- .shutdown_wait_timeout: planned value cty.NumberIntVal(3) does not match config value cty.NullVal(cty.Number)
- .memory_share_level: planned value cty.StringVal(“normal”) does not match config value cty.NullVal(cty.String)
- .run_tools_scripts_after_power_on: planned value cty.True does not match config value cty.NullVal(cty.Bool)
- .ept_rvi_mode: planned value cty.StringVal(“automatic”) does not match config value cty.NullVal(cty.String)
- .migrate_wait_timeout: planned value cty.NumberIntVal(30) does not match config value cty.NullVal(cty.Number)
- .scsi_controller_count: planned value cty.NumberIntVal(1) does not match config value cty.NullVal(cty.Number)
- .cpu_share_level: planned value cty.StringVal(“normal”) does not match config value cty.NullVal(cty.String)
- .firmware: planned value cty.StringVal(“bios”) does not match config value cty.NullVal(cty.String)
- .latency_sensitivity: planned value cty.StringVal(“normal”) does not match config value cty.NullVal(cty.String)
- .swap_placement_policy: planned value cty.StringVal(“inherit”) does not match config value cty.NullVal(cty.String)
- .run_tools_scripts_before_guest_shutdown: planned value cty.True does not match config value cty.NullVal(cty.Bool)
- .boot_retry_delay: planned value cty.NumberIntVal(10000) does not match config value cty.NullVal(cty.Number)
- .force_power_off: planned value cty.True does not match config value cty.NullVal(cty.Bool)
s not match config value cty.NullVal(cty.Bool)
- .num_cores_per_socket: planned value cty.NumberIntVal(1) does not match config value cty.NullVal(cty.Number)
- .run_tools_scripts_after_resume: planned value cty.True does not match config value cty.NullVal(cty.Bool)
- .scsi_bus_sharing: planned value cty.StringVal(“noSharing”) does not match config value cty.NullVal(cty.String)
- .hv_mode: planned value cty.StringVal(“hvAuto”) does not match config value cty.NullVal(cty.String)
- .poweron_timeout: planned value cty.NumberIntVal(300) does not match config value cty.NullVal(cty.Number)
- .memory_limit: planned value cty.NumberIntVal(-1) does not match config value cty.NullVal(cty.Number)
- .cpu_limit: planned value cty.NumberIntVal(-1) does not match config value cty.NullVal(cty.Number)
- .scsi_type: planned value cty.StringVal(“pvscsi”) does not match config value cty.NullVal(cty.String)
- .clone[0].timeout: planned value cty.NumberIntVal(30) does not match config value cty.NullVal(cty.Number)
- .clone[0].customize[0].timeout: planned value cty.NumberIntVal(10) does not match config value cty.NullVal(cty.Number)
- .clone[0].customize[0].linux_options[0].hw_clock_utc: planned value cty.True does not match config value cty.NullVal(cty.Bool)
- .disk[0].datastore_id: planned value cty.StringVal("") does not match config value cty.NullVal(cty.String)
- .disk[0].io_limit: planned value cty.NumberIntVal(-1) does not match config value cty.NullVal(cty.Number)
- .disk[0].io_share_level: planned value cty.StringVal(“normal”) does not match config value cty.NullVal(cty.String)
- .disk[0].disk_sharing: planned value cty.StringVal(“sharingNone”) does not match config value cty.NullVal(cty.String)
- .disk[0].io_reservation: planned value cty.NumberIntVal(0) does not match config value cty.NullVal(cty.Number)

  - .disk[0].keep_on_remove: planned value cty.False does not match config value cty.NullVal(cty.Bool)
  - .disk[0].write_through: planned value cty.False does not match config value cty.NullVal(cty.Bool)
  - .disk[0].attach: planned value cty.False does not match config value cty.NullVal(cty.Bool)
  - .disk[0].disk_mode: planned value cty.StringVal("persistent") does not match config value cty.NullVal(cty.String)
  - .disk[1].io_share_level: planned value cty.StringVal("normal") does not match config value cty.NullVal(cty.String)
  - .disk[1].io_limit: planned value cty.NumberIntVal(-1) does not match config value cty.NullVal(cty.Number)
  - .disk[1].disk_sharing: planned value cty.StringVal("sharingNone") does not match config value cty.NullVal(cty.String)
  - .disk[1].io_reservation: planned value cty.NumberIntVal(0) does not match config value cty.NullVal(cty.Number)
  - .disk[1].io_share_count: planned value cty.NumberIntVal(0) does not match config value cty.NullVal(cty.Number)
  - .disk[1].keep_on_remove: planned value cty.False does not match config value cty.NullVal(cty.Bool)
  - .disk[1].write_through: planned value cty.False does not match config value cty.NullVal(cty.Bool)
  - .disk[1].disk_mode: planned value cty.StringVal("persistent") does not match config value cty.NullVal(cty.String)
  - .disk[1].attach: planned value cty.False does not match config value cty.NullVal(cty.Bool)
  - .disk[1].datastore_id: planned value cty.StringVal("<computed>") does not match config value cty.NullVal(cty.String)
  - .network_interface[0].bandwidth_limit: planned value cty.NumberIntVal(-1) does not match config value cty.NullVal(cty.Number)
  - .network_interface[0].adapter_type: planned value cty.StringVal("vmxnet3") does not match config value cty.NullVal(cty.String)
  - .network_interface[0].bandwidth_reservation: planned value cty.NumberIntVal(0) does not match config value cty.NullVal(cty.Number)

_level: planned value cty.StringVal(“normal”) does not match config value cty.NullVal(cty.String)

2020/07/14 09:14:44 [DEBUG] module.test-3-noto.module.app10082-server.vsphere_virtual_machine.vm[“hostname_of_server”]: apply errored, but we’re indicating that via the Error pointer rather than returning it:
Virtual machine customization failed on “/TestEnv/DC/Location_1 DC - Ref/vm/Location_1 App Cluster (esx_hostname_1) - Ref/test-3-noto/hostname_of_server”:

timeout waiting for customization to complete

The virtual machine has not been deleted to assist with troubleshooting. If
corrective steps are taken without modifying the “customize” block of the
resource configuration, the resource will need to be tainted before trying
again. For more information on how to do this, see the following page:


2020/07/14 09:14:44 [ERROR] module.test-3-noto.module.app10082-server: eval: *terraform.EvalApplyPost, err:
Virtual machine customization failed on “/TestEnv/DC/Location_1 DC - Ref/vm/Location_1 App Cluster (esx_hostname_1) - Ref/test-3-noto/hostname_of_server”:

timeout waiting for customization to complete

#################

Please let me know if you need any more information.

Thanks
Hasham