On 9/19/18 9:22 AM, Gaijin wrote:
> On 2018-09-19 05:22, Ivan Mitev wrote:
>> On 9/19/18 5:17 AM, Gaijin wrote:
>>> Running Qubes R3.2
>>>
>>> I have some software that I run in an AppVM that needs to be accurate to
>>> within a second or two of NTP server time in order to work. I have
>>> finally figured out how to get my ClockVM to sync to an NTP server and
>>> for timesyncd.service to run when sys-net boots.
>>>
>>> My problem is that my AppVM slowly loses several seconds after some
>>> time, and I can't figure out a way to manually or automatically force it
>>> to resync itself.
>>
>> I don't have a R3.2 to test, but if it's like R4 your VM has a systemd
>> timer that updates the time every 6 hours [1]. In that case you could:
>> - change the definition of the timer so that it's run more frequently
>> - disable the timer and run a ntp client ; that'll be the best solution
>> if your software is very time sensitive, but it increases the attack
>> surface because of the ntp client.
>>
>>
>> [1]
>> https://github.com/Qubes-Community/Contents/blob/master/docs/system/clock-time.md
> 
> How might I adjust the schedule of qubes-sync-time.timer in the AppVM if
> that is available in R3.2? That looks like a safer way to proceed if
> possible.

Provided that R3.2 time sync mechanism is the same as R4, you could
paste the following text into /etc/systemd/system/qubes-sync-time.timer:

[Timer]
OnUnitActiveSec=10min


Doing so allows you to override stuff from
/usr/lib/systemd/system/qubes-sync-time.timer and preverve your changes
in case the original unit file is updated.

Then reload the definitions with `sudo systemctl daemon-reload`

You can see the timer's status with `systemctl list-timers`

If you want those changes to stick after a reboot, apply them in the
TemplateVM you're using for your AppVM; alternatively you could add the
new file to your AppVM's /rw/config and issue commands in the rc.local
script there (copy the file + reload systemd).




-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/49c3cd57-e802-7998-bba5-3c6bc2b8ec9a%40maa.bz.
For more options, visit https://groups.google.com/d/optout.

Reply via email to