[qubes-users] Time and date of appVM

I have noticed than when my computer wakes up from sleep the dom0 date and time updates as soon as my computer gets net connectivity, but my appVMs can take a loooooong time before their date and time also update. Is there any explanation for this and maybe a way to fix it?

1 Like

Qubes wrote:
I have noticed than when my computer wakes up from sleep the dom0 date and time updates as soon as my computer gets net connectivity, but my appVMs can take a loooooong time before their date and time also update. Is there any explanation for this and maybe a way to fix it?

Ok I can sync it manually in the appVM using `sudo qvm-sync-clock`. So the question is how can I set it to run more frequently in the appVM?

1 Like

Qubes wrote:

Qubes wrote:
I have noticed than when my computer wakes up from sleep the dom0 date and time updates as soon as my computer gets net connectivity, but my appVMs can take a loooooong time before their date and time also update. Is there any explanation for this and maybe a way to fix it?

Ok I can sync it manually in the appVM using `sudo qvm-sync-clock`. So the question is how can I set it to run more frequently in the appVM?

Update: When my computer wakes from sleep the appVMs never update their time. The only way is to manually run `sudo-qvm-sync-clock` or reboot the VM. Why do I see this behavior? I am sure date and time should sync everywhere automatically. Without the need, which looks to be the only solution currently, to create a small script that is executed at VM startup and it goes into a loop and runs `sudo-qvm-sync-clock` every 30 seconds.

Qubes wrote:

Qubes wrote:

Qubes wrote:
I have noticed than when my computer wakes up from sleep the dom0 date and time updates as soon as my computer gets net connectivity, but my appVMs can take a loooooong time before their date and time also update. Is there any explanation for this and maybe a way to fix it?

Ok I can sync it manually in the appVM using `sudo qvm-sync-clock`. So the question is how can I set it to run more frequently in the appVM?

Update: When my computer wakes from sleep the appVMs never update their time. The only way is to manually run `sudo-qvm-sync-clock` or reboot the VM. Why do I see this behavior? I am sure date and time should sync everywhere automatically. Without the need, which looks to be the only solution currently, to create a small script that is executed at VM startup and it goes into a loop and runs `sudo-qvm-sync-clock` every 30 seconds.

  This is a serious problem, VMs don't sync their time on 4.2. Can anybody provide meaningful input?

Qubes wrote:

Qubes wrote:

Qubes wrote:

Qubes wrote:
I have noticed than when my computer wakes up from sleep the dom0 date and time updates as soon as my computer gets net connectivity, but my appVMs can take a loooooong time before their date and time also update. Is there any explanation for this and maybe a way to fix it?

Ok I can sync it manually in the appVM using `sudo qvm-sync-clock`. So the question is how can I set it to run more frequently in the appVM?

Update: When my computer wakes from sleep the appVMs never update their time. The only way is to manually run `sudo-qvm-sync-clock` or reboot the VM. Why do I see this behavior? I am sure date and time should sync everywhere automatically. Without the need, which looks to be the only solution currently, to create a small script that is executed at VM startup and it goes into a loop and runs `sudo-qvm-sync-clock` every 30 seconds.

This is a serious problem, VMs don't sync their time on 4.2. Can anybody provide meaningful input?

Is there nothing I can do here?

Is it just me and my system or are you also seeing this?

Qubes wrote:

Qubes wrote:

Qubes wrote:

Qubes wrote:

Qubes wrote:
I have noticed than when my computer wakes up from sleep the dom0 date and time updates as soon as my computer gets net connectivity, but my appVMs can take a loooooong time before their date and time also update. Is there any explanation for this and maybe a way to fix it?

Ok I can sync it manually in the appVM using `sudo qvm-sync-clock`. So the question is how can I set it to run more frequently in the appVM?

Update: When my computer wakes from sleep the appVMs never update their time. The only way is to manually run `sudo-qvm-sync-clock` or reboot the VM. Why do I see this behavior? I am sure date and time should sync everywhere automatically. Without the need, which looks to be the only solution currently, to create a small script that is executed at VM startup and it goes into a loop and runs `sudo-qvm-sync-clock` every 30 seconds.

This is a serious problem, VMs don't sync their time on 4.2. Can anybody provide meaningful input?

Is there nothing I can do here?

Is it just me and my system or are you also seeing this?

I have resolved the issue of my VMs not syncing their time. It is actually quite interesting, because although VMs are set to automatically sync their time every 6 hours as is explained [here][1] a certain set of conditions caused the clocks on my VMs to 'never' sync. Other users can quite easily experience the same situation without realizing it.

I have filed [bug report 8217](https://github.com/QubesOS/qubes-issues/issues/8217) for this.

To fix my issue I defined a custom clock sync definition in

`sudo vim /etc/systemd/system/qubes-sync-time.timer`

and added

[Timer]
OnUnitActiveSec=10s

[1]: Contents/docs/system/clock-time.md at master · Qubes-Community/Contents · GitHub