quickemu-project / quickemu

Quickly create and run optimised Windows, macOS and Linux virtual machines
MIT License
10.93k stars 479 forks source link

Fix: set RTC to localtime only for Windows/ReactOS/DOS and UTC for all others #1429

Closed chasecovello closed 3 months ago

chasecovello commented 3 months ago

Description

Windows/ReactOS/DOS conventionally set the system RTC to local time, but Linux/UNIX/macOS use UTC. Guest systems that expect UTC and have the time zone set to local time will have the wrong system clock time at startup until they set the clock with NTP. This is especially an issue for disk images imported from or shared with another VM configuration that uses UTC for non-Windows guests.

Further, according to the QEMU man page:

Enable driftfix (i386 targets only) if you experience time drift problems, specifically with Windows' ACPI HAL. This option will try to figure out how many timer interrupts were not processed by the Windows guest and will re-inject them.

This option thus seems unnecessary for other systems and may cause performance or timekeeping issues, so enable only for Windows/ReactOS/DOS.

Type of change

Checklist: