VirtualBox: Disable time sync between host and client

If you run VirtualBox you may eventually run into problems with the time or time sync within your VM guest. You can run this command on the host to disable time sync:

vboxmanage setextradata <vmname> “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1”

Just replace <vmname> with the name of your guest. On Windows hosts, you’ll need to change the command to “VBoxManage”.

You will most likely want to set the client to sync with a time server after this. On Windows clients, just double click on the time and go to the Internet Time tab. Check the box and choose time.nist.gov (better reliability).

I needed to solve this because QuickBooks Pro 2000 complains about the system time being changed continuously while in multi-user mode.

I found this simple VirtualBox time sync tip in a post titled Synchronize a Virtualized Domain Controller with External Time Servers.

Comments

  1. Tadanori Furuya says:

    Using Guest Additions for Windows,
    this GetHostTimeDisabled option is ignored.
    Isn’t it ?

    VirtualBox Ver.3.0.8 r53138
    Host WindowsXP pro SP3 / Inbox is Windows XP SP2, no network-adapter

    • ricog says:

      Tadanori: Not sure about a Windows host, but I’m on 3.0.8 r53138 in Ubuntu with WinXP as the guest. I haven’t had any problems with the setting, and my QuickBooks is still running without any time sync messages. It’s running Guest Additions.

  2. Maarten Ureel says:

    Really helpful, thanks!

  3. […] A way to disable the timesync was posted by Rick Guyer: VirtualBox: Disable time sync between host and client. […]

  4. Chaminda says:

    Thanks was very helpful

  5. VBox User says:

    Hi,
    on Debian the Command is: VBoxManage

    I also had to Reboot the Windows Guest, after that the Timesync was disabled.

    Thanks

  6. cboese says:

    I had to edit the entry in the machines xml file manually, because the command line approach seems to lead to special character corruption. Also do not copy/paste the line above, as most browsers will give you the wrong quotation marks and most shells are very strict.

  7. Wayne says:

    Can someone tell me how to turn on the time sync feature… I turned it off successfully with this command

    vboxmanage setextradata “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″

    … now I’d like to turn it back on.

    Thanks

    • ricog says:

      Wayne, I haven’t confirmed, but I think if you set the 1 to a 0 (zero) on that command it will disable it.

      • Uélison Jean says:

        Well I found one solution to do this.
        Go to
        C:\Documents and Settings\\.VirtualBox\Machines\
        and edit the xml file.
        –>Create a backup of this file<–
        Delete this line:

        Note: the script vboxmanage setextradata “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″ will create one line in this xml, so if you run more then once time you’ll see more lines. Delete these also.

  8. […] problema apresentado, independente do host ser em Windows ou GNU/Linux (para guest Windows). [1] http://rickguyer.com/virtualbox-disa…st-and-client/ Saudações, Trober Citar + Responder ao Tópico […]

  9. Lesroy says:

    This command is not helping me can some please give specific instructions on how to use this commands please and not just simply post a command on a blog

    • starznitez says:

      VBoxManage setextradata vnName “VBoxInternal/TM/WarpDrivePercentage” 200

      VBoxManage is actually an .EXE script
      where you can modify the advanced configuration of VBOX.

      1) GO to Installation directory of your VirtualBox
      2) Open Command Prompt from there
      3) Type the command : VBoxManage setextradata “VBoxInternal/TM/WarpDrivePercentage”

      Ignore the braces,

      Example of actual command :
      VBoxManage setextradata WindowsXP “VBoxInternal/TM/WarpDrivePercentage” 200

      4) Hit enter

      Do read this manual :
      http://www.virtualbox.org/manual/ch08.html#idp6516336
      and this
      http://www.virtualbox.org/manual/ch09.html#idp13754496

      Do correct me if i’m wrong

  10. Mauricio says:

    Hi Rick

    Is there a way to completely freeze the time of a vm?

    Thanks

  11. Peter Guhl says:

    It apparently does not work anymore with Virtualbox 4.1.2. Host Windows 7 64Bit, Guest Windows XP.

  12. polocanada says:

    I couldn’t find way of doing it on Mac. Can’t find VboxManage application in the program directory.

  13. polocanada says:

    Actually I found it under /usr/bin .. but the command doesn’t work. Apparently new new Virtualbox it’s being set through Vboxservice on Windows. There is also Vboxsvc on Mac.

  14. polocanada says:

    Sorry for multiple posts. I was trying to “reply” to my post it doesn’t work. I misunderstood the instructions on this page.. it needs to be done within the guest and it works on WinXP guest at least (don’t forget to disable the time sync in Time settings / Conrol panel…. https://forums.virtualbox.org/viewtopic.php?t=24057

  15. Guy says:

    Very handy. If anyone else has trouble finding the correct folder to run VBoxManage then on my Win Vista host it was:

    C:\Program Files\Oracle\VirtualBox

    For some reason the useless Windows file search didn’t find it.

  16. damwal says:

    Try this one below(found at https://forums.virtualbox.org/viewtopic.php?t=24057)


    Disable GA time-sync by editing the parameters passed to the VirtualBox Guest Additions Service (on Windows guests):

    Open Registry Editor (Start menu>Run…>Type ‘regedit’ into the ‘Open:’ field>Click the OK button)
    WARNING: Incorrect editing of the registry can damage your system.
    Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxService
    Double-click on ‘ImagePath’
    Change the ‘Value data:’ field, by adding ‘–disable-timesync’ at the end. It should look like:

    Code: Select all Expand view
    system32\VBoxService.exe –disable-timesync

    Click OK
    Either reboot the VM, or stop and then restart the ‘VirtualBox Guest Additions Service’

    After these steps, timesync will be disabled.
    To reenable timesync, repeat the steps but remove the –disable-timesync parameter.

    MarkCranness
    Volunteer

    Posts: 860
    Joined: 10. Oct 2009, 06:27
    Primary OS: MS Windows 7
    VBox Version: PUEL
    Guest OSses: Windows 2000 Server; Windows XP; Windows Server 2008 R2

  17. […] muss der Eintrag “GetHostTimeDisabled” in der XML gesetzt werden. Laut diesem Blog-Eintrag kann das auch über den VBOXManager über die Kommandozeile […]

  18. Karoly says:

    I does not work on 4.1.12 with Host Windows 7 64, Guest Windows Server 2008 R2 64.

  19. Fadi says:

    Thank you-thank-you-thank-you! it was just what I needed.

    The command prompt approach wasn’t working for me. For some reason it could find my machine. I did it by manually editing my VirtualBox.xml file, which was just as well as people were saying that vboxmanage caused there VirtualBox.xml corruption.

    I went to my home folder (/home/YOURUSERNAME or c:\Documents and Settings\YOURUSERNAME in WinXP or c:\Users\YOURUSERNAME in Win7) and going to the .VirtualBox folder.

    From there, you edit the VirtualBox.xml file (make copies first!!!) and just stick

    right after line 11

    ie. after the part that says:

    …..

    **paste right here!****
    ………

    Don’t edit while the vbox is running.

  20. Hello!
    Thanks for the tip, but it seems to reenables itself after a reboot of the host.
    How to make it stick once and forever??

  21. Saeed says:

    Every One Who Has Problem,Must Type The Command Rather Than Copy/Paste

  22. I discovered by accident that the property GetHostTimeDisabled is case sensitive. I accidentally set a property named GetHosttimeDisabled (notice “time” is not capitalized). When I did so, the VM failed to start! To fix it, I executed the following command to remove the erroneous GetHosttimeDisabled property:
    vboxmanage setextradata “VBoxInternal/Devices/VMMDev/0/Config/GetHosttimeDisabled”

    Notice that a fifth argument (i.e. the “1”) is not present. When left off, it deletes the property instead of setting a new value.

    Then I executed the command with the proper case for the property, and it worked as intended in VirtualBox 4.2.16 on a Windows 7 x64 VM running on a Windows 7 x64 host.

  23. ilDepa says:

    Works flawlessy on Linux guest (running on a Linux host).

    Time synchronization will be triggered only during the first (VM) boot.

Submit a Comment