Incorrect time when rebooting & clock drifting

Occassionally you may notice that your system clock is off by a few hours after rebooting, or that your clock is drifting enough that NTP can't keep up. These issues are caused as a result of running FreeBSD in a fully virtualized environment, and there are some steps you can take to correct the problem.

Ensure you have kern.hz="100" in your /boot/loader.conf

Check your kern.timecounter.hardware setting. Some users have reported that setting this to 'i8254' provides a large improvement on Xen virtualized systems.

Run NTPd at boot by adding the following lines to /etc/rc.conf
-> ntpd_enable="YES"
-> ntpd_sync_on_start="YES"

It's also important to have your CMOS clock setting configured for UTC. You can perform this step at boot, or by running the 'tzsetup' utility.

Instantly deploy a BSD cloud VPS with RootBSD

deploy instantly

  • Fast SSD hosting
  • Full root access
  • IPv6 and IPv4 enabled hosting
  • Over 25 data center locations worldwide
  • Friendly and knowledgeable support
  • Build with current FreeBSD, OpenBSD, NetBSD, Linux releases