Page 1 of 2
time drift NT guest
Posted: 2. Feb 2012, 20:31
by theghetto
I'm using Virtualbox to upgrade an organization's NT domain to active directory. I've got the PDC and BDC running as NT4 guests on Server 2003 host.
After a few days of running them in the live network, I was shocked to see the time was off on the guests by several HOURS from the host machine.
After researching I found this is a common phenomenon and installing the guest additions will keep them synchronized.
So I did that and sure enough the guests immediately synced with the host and all was well.
This morning I came in to find one guest off by 9 minutes and the other off by 6 minutes. After logging in to the guests, I watched them slowly re-sync without doing anything, now they are within a minute of the host machine.
Why did the time sync only start working when I actively engaged the guests? There is a third guest running on the host machine that runs Win2k3 server. It stays synchronized without any funny business.
Has anyone else noticed this activity?
UPDATE: While I was writing this post, the host machine went to screen saver. I wiggle the mouse and the guests leaped to 15 minutes behind host time.
Re: time drift NT guest
Posted: 2. Feb 2012, 20:54
by Perryg
First I would suggest that you not run a screen saver on the guest or any power management.
You can affect the time sync though to be updated more frequently by running the following:
On guest to test
Code: Select all
VBoxService --timesync-set-threshold 1000
Or run this on the host to make permanent
Code: Select all
VBoxManage guestproperty set Ubuntu-10.04 "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 1000
Re: time drift NT guest
Posted: 2. Feb 2012, 21:17
by theghetto
Forcing the intervals to a shorter duration seems to be helping quite a bit now.
Re: time drift NT guest
Posted: 2. Feb 2012, 21:24
by michaln
NT guests shouldn't just drift like that. Was the host running all the time? Were the guests running all the time? No pausing, power saving, etc.?
A VBox.log for the drifting guest(s) wouldn't hurt either.
Re: time drift NT guest
Posted: 2. Feb 2012, 21:52
by theghetto
Yes the host is on 24/7. I did pause them yesterday morning and reboot the server, but there has been no pausing or anything since I installed the guest additions.
I adjusted the timesync-set-threshold as well as --timesync-interval on the host for both guests.
Right now, one of the guests is keeping good time, though you can see it fall behind and then double-time to catch up, but the other guest is 10 minutes behind, also currently in double-time. There is no screen saver or power savings option enabled on either guests or host now. Perhaps I made a typo when setting the one that is behind.
Re: time drift NT guest
Posted: 2. Feb 2012, 21:55
by michaln
I was asking about pausing etc. the guests because that will stop the guest's time. In the absence of guest additions or some other time synchronization method (NTP etc.), the guest's time will be offset until the VM is restarted.
Re: time drift NT guest
Posted: 2. Feb 2012, 22:08
by theghetto
That's good info.
I can definitely see them fall behind in real time though.
I uploaded the log from the guest that is 10 minutes behind. At the end I see a lot of "giving up catch-up attempt" events.
Re: time drift NT guest
Posted: 2. Feb 2012, 23:30
by michaln
OK, the "Giving up catch-up attempt" messages indicate that the guest is losing time so to speak, but do not explain why.
What kind of load is the guest running, and how loaded is the host? Are there any time periods where the host's CPU is 100% utilized? Your host has a modern CPU which really shouldn't have this kind of problem, so I'm wondering what's going on there. Overloaded host is one possibility -- just a possibility, mind you.
Re: time drift NT guest
Posted: 2. Feb 2012, 23:59
by theghetto
The guests are running clean install NT 4 with sp6a and do nothing but basic roles as PDC and BDC. The host machine has dual quad core xeons w/ hyperthreading so Windows shows 16 processors. It also has 12 GB of RAM I've alotted a single "processor" to each NT VM and 1 GB RAM.
The average processor usage on the two VM's is between 0 and 2 %
The host machine averages only around 4% processor usage and 6GB RAM in use. It's current primary role is a remote desktop server, but also runs the two VM's and a third VM with Win2k3 as the guest.
Even at peak usage, the host machine rarely spikes past 10%.
Since applying the --timesync options and my last post, the NT guests have maintained decent time. When they catch up to the host, they quickly fall behind and go into double-time about 30 seconds to a minute after falling behind. I haven't seen it jump backwards again yet.
Re: time drift NT guest
Posted: 3. Feb 2012, 00:20
by Perryg
Are you also running NTP sync on the guests? IIRC having both will sometimes cause this issue of jump ahead - fall back. I have NT-4 advanced server and NT4 client running and use the GAs to provide the TM without issues, but I didn't define a NTP in the guest.
Re: time drift NT guest
Posted: 3. Feb 2012, 00:49
by theghetto
Honestly I don't even know how to configure an NTP server in NT server. Is there one built-in ? There is an NTP server running on the gateway which is what all the other machines use to synch. There is a logon script that sets the NT server time to one of the other synched machines, but of course that only helps at logon time. Or perhaps this is where I am mistaken. Does running "net time \\ntpserver /set /y" at logon maintain a constant synch or is that a one time shot?
Once this domain is upgraded there shouldn't be any more time problems hopefully. The win2k3 guest running on the same host is synchronized within one second using the default Guest addition settings. As long as these systems stay up to synch for the duration of this upgrade I think I should be ok. Still haven't seen that big jump happen again like earlier today.
Re: time drift NT guest
Posted: 3. Feb 2012, 00:58
by Perryg
I know the settings do help as I have had to use them on occasion. There will be a slight overhead but truthfully I could not see it. Maybe a little more chatter in the logs but I figured if it worked why cares.
If Michael can tell us anything else to look out for I will put that in my little black book as well. I know time drift used to happen a bit with NT but XP was even worse at times. Anyway keep an eye on it and tell us if it seems to satisfy your needs or should it be back to the drawing board.
As a side note: My NT guests works great in VirtualBox and usually never exceeds 50% utilisation even under heavy load (with a single processor).
Re: time drift NT guest
Posted: 3. Feb 2012, 01:05
by michaln
To be honest, I've only run NT 4 guests as desktops, without particular regard for time keeping. I have run Windows 2003 Server guests (both 32-bit and 64-bit) as servers and found them to keep time very well even without guest additions.
The problems with XP guests were often caused by multimedia timers (1 kHz or so) but that isn't the case with your NT 4 guests... they're running a 100 Hz timer which should not cause trouble. Basically I see no reason why the guests should be losing time, but they clearly are.
Re: time drift NT guest
Posted: 3. Feb 2012, 01:27
by michaln
Sorry, didn't mean to lock this.
Re: time drift NT guest
Posted: 3. Feb 2012, 02:49
by theghetto
Well, the machines were doing well all day. I just turned around and the PDC guest is 12 minutes behind the host. The BDC guest is 2 minutes behind. And the Win2k3 guest is in perfect sync. I wonder if I should just disable the Guest addition time sync and schedule a batch script to sync with a domain member every minute or something.