Setting different time on Windows VM

Discussions related to using VirtualBox on Windows hosts.
Post Reply
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Setting different time on Windows VM

Post by markanderson »

I am doing some analysis of GPS data, and as I cannot program, I am investigating the possibility of using a VM machine to help me out.

The tests I am running are dependent on time and date, so I what I would like to be able to do is reset the date of the VM machine every time it starts, to 00H: 00m: 01s on 01 January 2019, for example.
Also, is there anyway of speeding up the clock on the VM so that it runs faster eg., 2x, 10x, 100x than the host machine? (Would this still be accurate?)

Is any of the above possible? If so, could someone point me in the right direction as to how I go about setting it up?

Thanks
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Setting different time on Windows VM

Post by markanderson »

Well, I did try this:
9.13.4. Disabling the Guest Additions Time Synchronization

Once installed and started, the Oracle VM VirtualBox Guest Additions will try to synchronize the guest time with the host time. This can be prevented by forbidding the guest service from reading the host clock:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
I seemed to be able to run the command successfully,however, it didn't seem to make any difference. The clock on the VM machine still synchronises with the host. Any suggestions.....??
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Setting different time on Windows VM

Post by socratis »

I had a reply written and ready for you yesterday, but then my primary computer had a malfunction... :(

The setting that you changed has an effect only when using the Guest Additions (GAs) in a guest. Unfortunately, there's more to the time synchronization than the real-time synchronization when the VM is up and running...

When a VM starts, it always takes the time from the host, no matter if the guest synchronizes later or not. Resetting to a specific day and time might be best if you change the time each time from within the guest, and you disable internet time synchronization (if you have your guest hooked up to the internet).

There's also another option called the "biossystemtimeoffset", but that means that you'd have to modify the "recipe" of the VM every time before launching it. You could write a script, but I find that it's more tedious than simply changing the time from within the guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Setting different time on Windows VM

Post by markanderson »

Thanks for feedback. It seems to be a bit more complicated than I anticipated. I think I will have to come up with another plan for analysing the GPS data! Thanks anyway.
Post Reply