]> xenbits.xensource.com Git - libvirt.git/commitdiff
libvirt-guests: Sync time for autostarted guests
authorOrion Poplawski <orion@nwra.com>
Wed, 28 Oct 2020 13:59:35 +0000 (14:59 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 4 Nov 2020 11:18:05 +0000 (12:18 +0100)
Setting SYNC_TIME=1 does not work on autostarted guests.

See https://bugzilla.redhat.com/show_bug.cgi?id=1555398.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tools/libvirt-guests.sh.in

index d69df908d2238d67f12f3d9c219adf1b718f9a66..87f96af14daadd05f7e6134f824bd2110e767f1d 100644 (file)
@@ -206,9 +206,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
+                if "$sync_time"; then
+                    run_virsh "$uri" domtime --sync "$name" >/dev/null
                 fi
             fi
         done