diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in index 1b17bbe42a103ed312758b62d3520fe0c3522177..9aa06fa2b3da25c724b86e94256c416a13a34e13 100644 --- a/tools/libvirt-guests.sh.in +++ b/tools/libvirt-guests.sh.in @@ -171,7 +171,9 @@ start() { isfirst=true bypass= + sync_time=false test "x$BYPASS_CACHE" = x0 || bypass=--bypass-cache + test "x$SYNC_TIME" = x0 || sync_time=true while read uri list; do configured=false set -f @@ -206,6 +208,9 @@ start() { retval run_virsh "$uri" start $bypass "$name" \ >/dev/null && \ gettext "done"; echo + if "$sync_time"; then + run_virsh "$uri" domtime --sync "$name" >/dev/null + fi fi fi done diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf index d1f20510c009eb0a33425d7d7cc79beea2194a84..277005677b3118a607a90a85894f642fa137113f 100644 --- a/tools/libvirt-guests.sysconf +++ b/tools/libvirt-guests.sysconf @@ -39,3 +39,10 @@ # restoring guests, even though this may give slower operation for # some file systems. #BYPASS_CACHE=0 + +# If non-zero, try to sync guest time on domain resume. Be aware, that +# this requires guest agent with support for time synchronization +# running in the guest. For instance, qemu-ga doesn't support guest time +# synchronization on Windows guests, but Linux ones. By default, this +# functionality is turned off. +#SYNC_TIME=1