Whenever my computer sleeps, the time in the Homestead environment goes out of sync. The time doesn't update when it wakes up, it just keeps on going from when the computer started to sleep. This forces me to destroy and then up Vagrant.
Versions:
I have added this to the Vagrantfile:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider 'virtualbox' do |vb|
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000 ]
end
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
// More code...
How do I make the Homestead environment sync the time?
I came across this solution when going out of sync with s3.
edit the ntp.conf
sudo vim /etc/ntp.conf
change the servers to:
server 0.amazon.pool.ntp.org iburst
server 1.amazon.pool.ntp.org iburst
server 2.amazon.pool.ntp.org iburst
server 3.amazon.pool.ntp.org iburst
restart the ntp service
sudo service ntp restart
and you're done.
restart the ntp service
$sudo service ntp restart
Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in current use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With