LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 04-27-2016, 12:07 PM   #1
cojafoji
LQ Newbie
 
Registered: Jan 2015
Posts: 11

Rep: Reputation: Disabled
Unhappy Time drift on centos 7 vm


Hey all, running into a bit of funkiness on a VM I've popped up. There's an increasing time drift between the date and hwclock. hwclock is always right, but date keeps falling farther and farther behind. I tried setting up a cron job to run ntpdate every half hour, but because it's so slow, a few hours go by, and it's so far out of sync that it fails. Short of having it query the ntppool servers every minute (that'd go well, I'm sure), I'm wondering if I'm missing something else. I also tried nuking adjtime and recreating it, but no dice. This is the second time this has happened with this VM, the first iteration I took down because of this problem thinking it was a configuration error on my part.

The machine that the VM is running on is up to date, the time is correct, and virtualbox is also up to date.

Any ideas or suggestions?

Edit: Installed and configured chrony since ntp and ntpdate were deprecated, but it still seems to be falling behind.

Last edited by cojafoji; 04-27-2016 at 03:02 PM.
 
Old 04-27-2016, 03:55 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
ntpdate is deprecated but not ntp. The functionality of ntpdate was added to ntp.

Did you install guest additions? It improves time sync between the guest and host.

https://www.virtualbox.org/manual/ch...changetimesync
 
Old 04-28-2016, 03:10 PM   #3
cojafoji
LQ Newbie
 
Registered: Jan 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
Yeah, installing guest additions worked. Thanks amigo.

In case anyone else needs a fast guide for Centos 7:

Use the following procedure to resolve the issues.
Quote:
sudo yum install epel-release -y
sudo yum install dkms -y
sudo yum install kernel-devel-2.6.32-573.el6.x86_64 -y
Mount the VBoxGuestAdditions_5.0.16.iso for the VM.

Quote:
sudo mkdir /media/cdrom/
sudo mount /dev/cdrom /media/cdrom/
cd /media/cdrom/
sudo ./VBoxLinuxAdditions.run
 
Old 04-28-2016, 03:14 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Good.

You can mark the thread as solved using the thread tools pull down menu at the top of the page.
 
  


Reply

Tags
centos, date, hwclock



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Time sync errors : and drift on Linux Servers at Perticular time jsm1985 Linux - Server 1 01-18-2015 08:24 AM
Time drift Vmware dreamlemon Debian 7 11-25-2009 02:25 PM
Linux Time Drift Samgari Linux - Server 2 08-19-2009 07:59 PM
[SOLVED] Time Sync Issues - Clock Drift Way Off - CentOS 5.2, VMware 1.0.8, Plesk CP 8.6.0 bskrakes Linux - Server 13 03-02-2009 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration