[RESOLVED]timesync not working properly on ubuntu guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
fro1269
Posts: 12
Joined: 4. Feb 2011, 01:55
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Ubuntu, Fedora, CentOS

[RESOLVED]timesync not working properly on ubuntu guest

Post by fro1269 »

VirtualBox 3.2.8
Host OS: WIndows XP SP3 x86
Guest: Ubuntu Server 10.04.2 x86

I am trying to get timesync on restore from a saved state working properly on my Windows Xp system. I was successfully able to do this on a Windows Server 2003 x64(HOST)/Ubuntu Server 10.04.2 (GUEST) earlier today, but on my current setup is not working.

Here is what I have done so far.

On my guest I installed dkms , build-essential and kernel headers

Code: Select all

$sudo apt-get install dkms build-essential linux-headers-$(uname -r) 
I then mounted the guest additions ISO and then ran the install of the guest additions package

Code: Select all

sudo bash  mnt/VBoxLinuxAdditions-x86.run
Then on my Windows Host I ran this command from the command prompt

Code: Select all

VBoxManage guestproperty set "VM_NAME" --timesync-set-on-restore 1
Now what happens is I save the virtual machine state for about 5 minutes, then I restore and the time is not syncing as it has for me on other deployments. I can get it to work by manually doing a

Code: Select all

sudo VBoxService --timesync-set-start
How can I get it to automatically sync time on a restore? This is really perplexing me. I have looked at the virtualbox log file, but dont see anything that stands out to be as to why this isnt working as it should.
Last edited by fro1269 on 5. Mar 2011, 04:35, edited 1 time in total.
fro1269
Posts: 12
Joined: 4. Feb 2011, 01:55
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Ubuntu, Fedora, CentOS

Re: timesync not working properly on ubuntu guest

Post by fro1269 »

I figured out what was causing the problem I was using an older build of Virtualbox (3.2.8). I upgraded to 3.2.12 and then installed the 3.2.12 guest additions and now its all working properly
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: [RESOLVED]timesync not working properly on ubuntu guest

Post by Perryg »

The problem is caused from using paused or saved state and the wait period of less than 20 minutes. The VBox code uses the 20 minute boundary to determine if the long reset or short reset is to be used. You can use the first to test and see if it works like you need and adjust the milliseconds to what ever you need and to make it permanent you add the second line by using VBoxManage on the host. It really depends on tuning to make sure that time sensitive programs don't get too upset and that you can keep the time as accurate as you need.

sudo 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 "<guest name>" "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 1000
Post Reply