Use Time Zone for RTC

brb8two

Member
Dec 17, 2019
21
1
23
41
Hi All,

I wish for ProxMox to be updated to change "Use Local Timefor RTC" to "Use time zone for RTC".

How it currently works;
ProxMox only supports the System Clock (Typically UTC) and the System Local Time (TimeZone) parameter.​
When configuring a VM if the OS Type is "Windows", the "Use local time for RTC" parameter is ignored (since it always uses it).​
Selecting any other OS Type, you can enable this parameter or not which only defines to use the hosts Time Zone parameter. This is very limited and could be problematic.​

Problematic you may ask?
If you run a cluster and in the cluster for one reason or another the ProxMox Nodes Time Zone is different, migrating machines with this parameter set can cause their time to be wrong due to the fact that the host has changed when it is started. Hence this parameter has is a host specific configuration dependancy.​
If this is such a problem, how has all our users getting along without this support?
They could be using a work around that may be causing lower performance due to running Windows Guest VMs as OS Type "Linux" or "Other" and Modifying the Windows registry to create the DWORD-Key "RealTimeIsUniversal" at "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" = "1​

How to Fix this?
Instead of the Parameter "Use local time for RTC", I suggest to modify it to "Use time zone for RTC".​
For backward/upgrade compatibility, where this was enabled, define the parameter as the ProxMox TimeZone it is hosted on.​
Otherwise allow a selection of timezones as per normally used to select the ProxMox TimeZone.​
How do we transfer these parameters to run the Guest Machine?​
This is already possible with QEMU as you can see with the RTC Parameter options​
  • -rtc [base=utc|localtime|[B]datetime[/B]][,clock=host|rt|vm][,driftfix=none|slew]
Hence what would need to be done at the start of the VM is to check the "RTC start date" if configured as "now" and then convert the current time to the specified time zone and pass it to the -rtc parameter as datetime format.​
Has this sort of thing been done before?
Yes, another project LibVirt also supports starting from a timezone parameter as specified on their documentation; https://libvirt.org/formatdomain.html#elementsTime
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!