From ee3950a3aa47f4697b2a790d71e7468f329c921b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 22 Feb 2016 20:59:46 +0100 Subject: [PATCH] pm-utils: use `qvm-sync-clock --force` instead of manual qvm-run After suspend VMs clocks are desynchronized in most cases (because VMs were paused). Since directly after suspent there may be no network access, normal `qvm-sync-clock` call isn't good (it aborts if NTP call fails). But with new `qvm-sync-clock --force` switch, it sync VMs even if NTP is unreachable. QubesOS/qubes-issues#1728 --- pm-utils/01qubes-sync-vms-clock | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pm-utils/01qubes-sync-vms-clock b/pm-utils/01qubes-sync-vms-clock index 5bb8516..a126dda 100755 --- a/pm-utils/01qubes-sync-vms-clock +++ b/pm-utils/01qubes-sync-vms-clock @@ -2,13 +2,8 @@ sync_qubes_vms_wallclock() { - # Sync all VMs based on dom0 clock - DATE=$(date) - echo - echo "Syncing VMs clock to: $DATE" - qvm-run --all -u root --localcmd="date -u -Iseconds" "qubes.SetDateTime dom0" - # Then try to sync from the network - /usr/bin/qvm-sync-clock & + # Sync all VMs (based on dom0 clock if network time sync fails) + /usr/bin/qvm-sync-clock --force & } case "$1" in