Incus VMs use UTC time instead of local, breaking Windows VMs
Description
Problem/Justification
None
Impact
None
Activity
Show:
Foxtrot 2 days ago
Relevant upstream Incus issue: https://github.com/lxc/incus/issues/1752
Bug Clerk 2 days ago
Thank you for submitting this TrueNAS Bug Report! So that we can quickly investigate your issue, please attach a Debug file and any other information related to this issue through our secure and private upload service below. Debug files can be generated in the UI by navigating to System -> Advanced -> Save Debug.
https://ixsystems.atlassian.net/servicedesk/customer/portal/15/group/37/create/153
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Muhammad Rehan
Muhammad RehanReporter
Julian
JulianLabels
Components
Fix versions
Affects versions
Priority
More fields
Time tracking
More fields
Time trackingKatalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Katalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Created 2 days ago
Updated 2 days ago
The new Incus-based VM implementation always uses UTC time for the “real time clock” exposed to VMs.
By default, this breaks time in Windows VMs, as it will be off by one hour (or more). This did not happen in 24.10 or earlier, as there was an option to either set the time to
LOCAL
orUTC
. The default wasLOCAL
. For Linux VMs, you want to useLOCAL
though. So, an option is needed (again), maybe with a small explanation when to use which option.If a “localtime” option is enabled, middleware would just need to add
-rtc base=localtime
to theraw.qemu
config. I tested manually editing the Incus config and it works, but that config part (obviously) gets wiped by middleware if the the instance is updated/edited using the TrueNAS UI.The incorrect time causes issues with Windows domains (Kerberos requires 5 min accuracy).
And it’ll be wrong on every startup, until Windows eventually sync time (IIRC happens via a task on Sunday for normal installs and every ~10 hours when using the Win time service).
A workaround in Windows is to create and set the
RealTimeIsUniversal
to1
(search the web for more info), but this would need to be modified on all existing and new Windows VMs, which really isn’t feasible.