Disable Time Sync for VirtualBox Virtual Machines

Reading Time: < 1 minute

This is probably my last post about Oracle VirtualBox as we are slowly moving towards using Docker on our projects but still wanted to share this gem.

I was working on a web portal for one of our clients and had a user story to implement showing times based on Daylight Saving / Summer time zone. For this scenario, I had to change date of my VM to the past one. When I did that, in couple of seconds, it reverted back to current date.

I was digging on various forums trying to solve this problem with various solutions but none helped. Then I found out that the issue is with one of the OOTB settings of Oracle VirtualBox. This setting is getting / syncing the time from host so eventually reverting back to your laptop time/date.

To disable this setting, just follow below steps while VM is shutdown.

  1. Open Command Prompt and navigate to folder where you have installed Oracle Virtual Box. For me it was “C:\Program Files\Oracle\VirtualBox”
  2. Run this command: VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
  3. “VM name” is the VM name in Oracle VM VirtualBox Manager
  4. Now run your VM and profit 😉

Happy virtualization and let’s move to Docker!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.