posted by steve | Category: Useful Items That I Forget | | 7 Comments »

Virtualbox (or its Guest Additions) have this annoying habit of automatically keeping the clock in sync with the host, regardless of the settings that one tries to implement within the guest itself.  For example, in a Windows 7 guest that I’m trying to use for consistent screenshots I need to set the clock to specific dates.  However, as soon as I set it, Virtualbox changes it back.

Here’s how to change it:

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

Tags:

7 Responses to “Disable Time Sync with Virtualbox”

  1. eric says:

    hi. I tried this, but it does not want to work for me:
    vboxmanage setextradata “C:\Users\myname\Desktop\Virtual Box\My 10 sample.vdi” “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″

    any thoughts?
    Thanks

    • steve says:

      Hmm. I think you need to specify the actual virtual machine name, not the vdi file. So if the name of the virtual machine is “Ubuntu Linux” you’d put that in place of the in my example.

      Let me know if that helps.

      Steve

  2. blabla says:

    just adding the VM-Name didnt work for me. You have to use the full path to the .vbox-file and not the .vdi-file. The .vdi file is just the virtual harddisc.

    You can open the .vbox file with an editor like notepad (or even the internet explorer). After using this command, it will add this line:

    • steve says:

      I just verified. I have a VM which shows up in the VirtualBox Manager GUI as “Windows 7 – Office”. I entered the command:

      vboxmanage setextradata “Windows 7 – Office” “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″

      Then I booted the machine, went in to change the time from 5:30pm (current local time) to 2:30pm. It stayed as 2:30 (which in Windows 7 it wouldn’t do without this change). I rebooted the VM and it’s still at 2:30. Well, 2:32 because a couple minutes elapsed now.

      But in any event, this does indeed work for me. VirtualBox 4.1.8 on a Mac.

  3. S7i0r says:

    It did not work for me… :(
    Ive even opened my “.vbox-prev” file with an XML editor, and there is an entry under the tag:

    The VM has been shut down and rebooted, but after I change the “internal” date, it still changes back to the host time within seconds. :( ((
    Ive got a VirtualBox 4.1.8 r75467, host: Win7 SP1, guest: WinXP SP3.

  4. S7i0r says:

    As the comment removes any “code” :) , here is the missing part of my previous comment:
    …under the tag: “ExtraData”…
    and the missing row was:
    ” ExtraDataItem name=”vboxinternal/devices/vmmdev/0/config/gethosttimedisabled” value=”1″ “

  5. S7i0r says:

    Dear Blog owner! Sorry, I did not want to flood, please remove my previous comments. There was only the problem that the mentioned XML tag was case sensitive (I think). Ive changed ”vboxinternal/devices/vmmdev/0/config/gethosttimedisabled” to “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” and now it is working fine!! Sorry again for my 3 comment entries, please ignore/remove them. Kind regards!

Leave a Reply