9
7
I am trying to use VB to set up a Windows 7 VM for use in a training course. I want the virtual machine always to start up from the same conditions, in particular:
- The VM always starts at the same date and time
- The disk remains unchanged as a result of the previous exercise
I have worked out how to configure a disk as "immutable" which should take care of (2), but I can't get the VM to start at the same time. After some looking around I found this:
Once installed and started, the 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 tried this with the VM shut down, and with it started up, but it does not seem to do anything. On the same documentation page there is also a mention of a parameter "--timesync-set-start" however I cannot see any mention of the format for setting date and time. Help would be welcome.
Windows itself might also be configured to synchronize time against an internet time server. – Thorbjørn Ravn Andersen – 2016-10-04T14:44:48.067
With "it does not seem to do anything", do you mean "the system time&date gets synchronized anyway with the host"? – Sopalajo de Arrierez – 2014-04-17T18:56:25.563
Should it be a solution for you to set time&date after Windows boot (a few seconds later, I mean)? A simple .cmd script should do that, I think. – Sopalajo de Arrierez – 2014-04-17T18:57:27.830