libvirt-guests: Sync time for autostarted guests

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>
This commit is contained in:
Orion Poplawski 2020-10-28 14:59:35 +01:00 committed by Jiri Denemark
parent 040de3fe46
commit a501fa7cae

View 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