Skip to content

Commit

Permalink
Merge pull request #105 from lemberg/issue/time-out-of-sync
Browse files Browse the repository at this point in the history
Tune the guest additions time synchronization parameters
  • Loading branch information
T2L committed Oct 18, 2019
2 parents cce738c + 34b7431 commit 3620d42
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: xenial
sudo: required

language: python
Expand Down Expand Up @@ -28,7 +29,7 @@ before_install:
- wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
- wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
# Add Oracle VirtualBox repository
- sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian trusty contrib"
- sudo add-apt-repository "deb https://download.virtualbox.org/virtualbox/debian xenial contrib"
# Update apt-get
- sudo apt-get update -qq
# Install Linux headers
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Draft Environment 3.x.x

- [CH-102](https://github.com/lemberg/draft-environment/issues/102) - Tune the guest additions time synchronization parameters (force virtual machine to sync time with host)
- [GH-98](https://github.com/lemberg/draft-environment/issues/98) - Follow-up: lock Travis to Ansible 2.6.6

## Draft Environment 3.0.0-beta4, 2019-05-13
Expand Down
14 changes: 14 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# ubuntu-xenial-16.04-cloudimg-console.log after the start. Get rid of it.
# Thanks to https://betacloud.io/get-rid-of-ubuntu-xenial-16-04-cloudimg-console-log/
v.customize ["modifyvm", :id, "--uartmode1", "disconnected"]

# Tune the guest additions time synchronization parameters.
# See https://www.virtualbox.org/manual/ch09.html#changetimesync
#
# Sync time every 10 seconds.
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-interval", 10000]
# Adjustments if drift > 100 ms.
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-min-adjust", 100]
# Sync time on restore.
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", 1]
# Sync time on start.
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start", 1]
# At 1 second drift, the time will be set and not "smoothly" adjusted.
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000]
end

# Synced Folders
Expand Down

0 comments on commit 3620d42

Please sign in to comment.