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
This commit is contained in:
Marek Marczykowski-Górecki 2016-02-22 20:59:46 +01:00
parent f8d8368b10
commit ee3950a3aa
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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