Fix: set RTC to localtime only for Windows/ReactOS/DOS and UTC for all others (#1429)
* Set RTC to localtime only for Windows/ReactOS/DOS and UTC for all other OS 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. * Removed RTC driftfix option for non-Windows/ReactOS/DOS guests 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.
This commit is contained in:
parent
bb103295ea
commit
070514d449
9
quickemu
9
quickemu
|
@ -1191,9 +1191,16 @@ function vm_boot() {
|
|||
args+=(-machine ${MACHINE_TYPE},smm=${SMM},vmport=off,accel=${QEMU_ACCEL} ${GUEST_TWEAKS}
|
||||
${CPU} ${SMP}
|
||||
-m ${RAM_VM} ${BALLOON}
|
||||
-rtc base=localtime,clock=host,driftfix=slew
|
||||
-pidfile "${VMDIR}/${VMNAME}.pid")
|
||||
|
||||
if [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ] || [ "${guest_os}" == "reactos" ] || [ "${guest_os}" == "freedos" ]; then
|
||||
# shellcheck disable=SC2054
|
||||
args+=(-rtc base=localtime,clock=host,driftfix=slew)
|
||||
else
|
||||
# shellcheck disable=SC2054
|
||||
args+=(-rtc base=utc,clock=host)
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2206
|
||||
args+=(${VIDEO} -display ${DISPLAY_RENDER})
|
||||
# Only enable SPICE is using SPICE display
|
||||
|
|
Loading…
Reference in New Issue