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:
parent
f8d8368b10
commit
ee3950a3aa
@ -2,13 +2,8 @@
|
|||||||
|
|
||||||
sync_qubes_vms_wallclock()
|
sync_qubes_vms_wallclock()
|
||||||
{
|
{
|
||||||
# Sync all VMs based on dom0 clock
|
# Sync all VMs (based on dom0 clock if network time sync fails)
|
||||||
DATE=$(date)
|
/usr/bin/qvm-sync-clock --force &
|
||||||
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 &
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
Loading…
Reference in New Issue
Block a user