Created
August 23, 2016 14:55
-
-
Save aboutte/f4adcbfc33cc7309791e0d21102c3d38 to your computer and use it in GitHub Desktop.
Vagrantfile to set some time synchronization configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.provider :virtualbox do |virtualbox| | |
# set timesync parameters to keep the clocks better in sync | |
# sync time every 10 seconds | |
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-interval", 10000 ] | |
# adjustments if drift > 100 ms | |
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-min-adjust", 100 ] | |
# sync time on restore | |
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", 1 ] | |
# sync time on start | |
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start", 1 ] | |
# at 1 second drift, the time will be set and not "smoothly" adjusted | |
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment