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.