A ClockVM based on the Kicksecure Template is functional out of the box.
The only requirement is that the ClockVM uses Kicksecure as its Template. For example, if using Qubes’ default settings, where ClockVM is set to sys-net by default and sys-net has been configured by the user to use the kicksecure-18 Template, then ClockVM will be functional out of the box and use sdwdate for clock synchronization.
My sys-net and sys-firewall VM are both Kicksecure-based. sys-net is my ClockVM. My time is always off though.
I just took the time to dig into that and noticed that sdwdate isn’t even running in sys-net.
The condition requires the VM to have a NetVM as the name suggests, which is not true for sys-net in a normal default setup, so I think the documentation is not correct.
How is it supposed to work? What’s the officially recommended way, make sys-firewall the ClockVM? Thanks
I believe you can change the clock VM by going to the application menu → settings gear → Qubes Global Config → General tab → Clock qube drop-down.
That sounds like a bug. Most likely we were trying to keep sdwdate from running on a qube with no Internet connection. sys-net has a connection but no NetVM, so that check isn’t quite right.
if qubesdb-read /qubes-gateway >/dev/null 2>&1; then # first instance
exit 0
fi
## Qubes sys-net does not have '/qubes-gateway'.
if qubesdb-read /qubes-netvm-gateway /qubes-gateway >/dev/null 2>&1; then
exit 0
fi
if qubesdb-read /qubes-gateway >/dev/null 2>&1; then # second instance, probably don't need it
exit 0
fi