vm-img: fix clock sync issues in vmware template

Message ID 20220714082814.3545-1-henning.schild@siemens.com
State Accepted, archived
Headers show
Series vm-img: fix clock sync issues in vmware template | expand

Commit Message

Henning Schild July 14, 2022, 12:28 a.m. UTC
The time inside a default Isar VM is UTC but the RTC provided by vmware
could be non UTC so one would see a multi-hour clock offset between
guest and host. The offset would depend on the timezone used on the
host, and also on where that host keeps its timezone.

This patch fixes the issue, both for Windows hosts (timezone in RTC) and
for Linux (no timezone in RTC) hosts.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/vm-img/vm-img-vmware.ovf.tmpl | 1 +
 1 file changed, 1 insertion(+)

Comments

Anton Mikanovich July 21, 2022, 4:25 a.m. UTC | #1
14.07.2022 11:28, Henning Schild wrote:
> The time inside a default Isar VM is UTC but the RTC provided by vmware
> could be non UTC so one would see a multi-hour clock offset between
> guest and host. The offset would depend on the timezone used on the
> host, and also on where that host keeps its timezone.
>
> This patch fixes the issue, both for Windows hosts (timezone in RTC) and
> for Linux (no timezone in RTC) hosts.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>

Applied to next, thanks.

Patch

diff --git a/meta/classes/vm-img/vm-img-vmware.ovf.tmpl b/meta/classes/vm-img/vm-img-vmware.ovf.tmpl
index 2883ce063f90..79d9cb0e24d4 100644
--- a/meta/classes/vm-img/vm-img-vmware.ovf.tmpl
+++ b/meta/classes/vm-img/vm-img-vmware.ovf.tmpl
@@ -115,6 +115,7 @@ 
       <vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge7.pciSlotNumber" vmw:value="24"/>
       <vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge7.present" vmw:value="TRUE"/>
       <vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge7.virtualDev" vmw:value="pcieRootPort"/>
+      <vmw:ExtraConfig ovf:required="false" vmw:key="rtc.diffFromUTC" vmw:value="0"/>
       <vmw:ExtraConfig ovf:required="false" vmw:key="softPowerOff" vmw:value="FALSE"/>
       <vmw:ExtraConfig ovf:required="false" vmw:key="svga.guestBackedPrimaryAware" vmw:value="TRUE"/>
       <vmw:ExtraConfig ovf:required="false" vmw:key="virtualHW.productCompatibility" vmw:value="hosted"/>