From c0e3f00154be7f12c8f0f5a817d5f6382098edb0 Mon Sep 17 00:00:00 2001 From: Vasil Atanasov <141020316+vasilsatanasov@users.noreply.github.com> Date: Tue, 23 Jan 2024 03:50:04 +0200 Subject: [PATCH] fix: set `sync_time_with_host` to default to `true` (#2120) Changed the value for `sync_time_with_host` to default to `true` for`r/vsphere_virtual_machine` in compliance with the default value provided by the UI. Signed-off-by: Vasil Atanasov --- vsphere/virtual_machine_config_structure.go | 11 ++++++----- website/docs/r/virtual_machine.html.markdown | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/vsphere/virtual_machine_config_structure.go b/vsphere/virtual_machine_config_structure.go index 623d7ce8f..b4028e314 100644 --- a/vsphere/virtual_machine_config_structure.go +++ b/vsphere/virtual_machine_config_structure.go @@ -151,8 +151,14 @@ func schemaVirtualMachineConfigSpec() map[string]*schema.Schema { "sync_time_with_host": { Type: schema.TypeBool, Optional: true, + Default: true, Description: "Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.", }, + "sync_time_with_host_periodically": { + Type: schema.TypeBool, + Optional: true, + Description: "Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting `sync_time_with_host` is enough for periodic synchronization. Requires VMware Tools to be installed.", + }, "tools_upgrade_policy": { Type: schema.TypeString, Optional: true, @@ -160,11 +166,6 @@ func schemaVirtualMachineConfigSpec() map[string]*schema.Schema { Description: "Set the upgrade policy for VMware Tools. Can be one of `manual` or `upgradeAtPowerCycle`.", ValidateFunc: validation.StringInSlice(virtualMachineUpgradePolicyAllowedValues, false), }, - "sync_time_with_host_periodically": { - Type: schema.TypeBool, - Optional: true, - Description: "Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting `sync_time_with_host` is enough for periodic synchronization. Requires VMware Tools to be installed.", - }, "run_tools_scripts_after_power_on": { Type: schema.TypeBool, Optional: true, diff --git a/website/docs/r/virtual_machine.html.markdown b/website/docs/r/virtual_machine.html.markdown index e5b386644..00fec612e 100644 --- a/website/docs/r/virtual_machine.html.markdown +++ b/website/docs/r/virtual_machine.html.markdown @@ -749,7 +749,7 @@ The following options control VMware Tools settings on the virtual machine: * `run_tools_scripts_before_guest_standby` - (Optional) Enable pre-standby scripts to run when VMware Tools is installed. Default: `true`. -* `sync_time_with_host` - (Optional) Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default: `false`. +* `sync_time_with_host` - (Optional) Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default: `true`. * `sync_time_with_host_periodically` - (Optional) Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting `sync_time_with_host` is will enable periodic synchronization. Requires VMware Tools to be installed. Default: `false`.