From d56ecb5b7652b3467055ff68c9c324ebb62aa213 Mon Sep 17 00:00:00 2001 From: Joseph Callen Date: Wed, 17 Nov 2021 09:17:17 -0500 Subject: [PATCH] vSphere: Set default disktype to thick not eager In #4664 I incorrectly commented to use `eagerZeroedThick`. The correct disktype to keep the vSphere install the same as previous versions is `thick`. eagerZeroed as named will write zeros when creating the vmdk which significantly extends the time to import and clone virtual machines. --- data/data/vsphere/variables-vsphere.tf | 2 +- .../vsphereprivate/resource_vsphereprivate_import_ova.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/data/vsphere/variables-vsphere.tf b/data/data/vsphere/variables-vsphere.tf index c34414a0e49..0b760995a4d 100644 --- a/data/data/vsphere/variables-vsphere.tf +++ b/data/data/vsphere/variables-vsphere.tf @@ -83,5 +83,5 @@ variable "vsphere_control_plane_cores_per_socket" { } variable "vsphere_disk_type" { type = string - default = "eagerZeroedThick" + default = "thick" } diff --git a/pkg/terraform/exec/plugins/vsphereprivate/resource_vsphereprivate_import_ova.go b/pkg/terraform/exec/plugins/vsphereprivate/resource_vsphereprivate_import_ova.go index 31f2b712052..80f16557cd5 100644 --- a/pkg/terraform/exec/plugins/vsphereprivate/resource_vsphereprivate_import_ova.go +++ b/pkg/terraform/exec/plugins/vsphereprivate/resource_vsphereprivate_import_ova.go @@ -369,10 +369,10 @@ func resourceVSpherePrivateImportOvaCreate(d *schema.ResourceData, meta interfac if d.Get("disk_type") == "thin" { diskType = types.OvfCreateImportSpecParamsDiskProvisioningTypeThin - } else if d.Get("disk_type") == "thick" { - diskType = types.OvfCreateImportSpecParamsDiskProvisioningTypeThick - } else { + } else if d.Get("disk_type") == "eagerZeroedThick" { diskType = types.OvfCreateImportSpecParamsDiskProvisioningTypeEagerZeroedThick + } else { + diskType = types.OvfCreateImportSpecParamsDiskProvisioningTypeThick } // This is a very minimal spec for importing // an OVF.