> I run OpenBSD (7.8 now) on a APU4C4 board.
> 
> I use vmd to run a small VM to host a DNS server, also
> running on OpenBSD 7.8.
>
> My natural reflex was to setup ntp to keep the clock in sync.
> This seemed to do the trick and I forgot about it.

NTP is what you want.  What works for me is to only configure 
ntpd to use the time sensor through vmmci and no other peers.
This will sync the time with the time on the host.
This can be as simple as:

sensor *

in the ntpd.conf file.  I'm a little more specific in mine with:

sensor vmmci0 refid LOCL stratum 8 trusted

Nothing special about the stratum, but reminds me not to use the VM
as a time source for others (my host offers the time to my network).
This is the only non-commented line in my ntpd.conf file.

In any case give ntpd a few minutes to stablize (seems like it needs
to read the time eight times before it trusts it).

You can check on the time sync by using:

ntpctl -s all

Reply via email to