Page 1 of 1
Time sync doesn't automatically work (anymore?)
Posted: 11. Feb 2011, 22:16
by Pete S
I'm pretty sure my windows VMs would keep the same time as the host (debian).
But not anymore.
A few months ago I upgraded from 3.2.8 to 3.2.10 on the host. And installed newer guest additions on one virtual XP but not on others. No VM keeps the same time as the host.
Did some default setting change between versions? And how can I keep the guests time the same as the host?
Any advice would be most appreciated!
Thanks,
Pete
Re: Time sync doesn't automatically work (anymore?)
Posted: 11. Feb 2011, 22:38
by Perryg
Time sync is included in the guest additions so if they are not installed or out of sync that could cause your problem.
Re: Time sync doesn't automatically work (anymore?)
Posted: 12. Feb 2011, 02:44
by Pete S
Thanks Perryg,
Guest additions are installed. One VM has the same as the server 3.2.10 and the others have 3.2.8.
But right now when I look again they are in sync.
What could make the time drift in and out when the guest additions are installed?
Re: Time sync doesn't automatically work (anymore?)
Posted: 12. Feb 2011, 03:13
by Perryg
Several things. Like pause, or save state. The recoup time if the guest has been paused or saved is around 20 minutes. Anything less and it can take a long time to adjust. You can change this but until I know more I can not tell you how.
Re: Time sync doesn't automatically work (anymore?)
Posted: 14. Feb 2011, 00:12
by Pete S
I have the guests running 24/7. The host is headless and its syncs time to a stratum 1 time server so the time on the host is very precise, less than 50 microseconds or so. The host doesn't go into standby or sleep or anything like that. And I don't stop or pause the guests either.
When I don't do any actual work in the guests the clocks will lag maybe fifteen to twenty minutes. Then when I start working again the clocks will speed up exactly 50% until the right time is reached then it starts to overcompensate so the guest is ahead in time then lags behind then ahead again then lags behind. After about two hours the guest time stays within +/- 5 seconds compared to the host.
I use either the remote desktop in the OS on the XP and W2003 servers or the embedded remote desktop and I keep the windows open 24/7 on my workstation.
As I mentioned above the host time is always dead on. I don't know the inner workings of the VMs but why can't the guest just have the exact time as the host even without guest additions?
Re: Time sync doesn't automatically work (anymore?)
Posted: 14. Feb 2011, 22:41
by Perryg
The time-sync between the host and the guest are in the guest additions, so that answers that. Time shifts are normally caused by kernel timing issues.
What you can do is test a few things on the guest.
Open the guests terminal window (Linux) or command Window (Windows) and as elevated user (su/sudo, admin)
type VBoxService --help
Look at the part pertaining to time. Polling, intervals, Etc.. and you can adjust them from the guest. (lost on reboot)
When you find what you need then on the host use VBoxManage to add the command to the machine XML file so it runs on reboot.
Example: I had a issue of pausing the guest for less then 20 minutes and the time to recoup taking hours if not days to correct itself. I ran the following to find what I needed in a Linux guest.
Code: Select all
As su/sudo on guest to test
VBoxService --timesync-set-threshold 1000
Or run this on the host to make permanent
VBoxManage guestproperty set Ubuntu-10.04 "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 1000