I have a VirtualBox VM running Centos 6.5 with Guest Additions installed and I need to be able to disable and enable time sync from within the guest at will. By default, the guest syncs its time with the host every 10 seconds[1], this is functionality built into the Guest Additions.
There are ways to disable the time sync but they are inadequate for my needs:
Disable the time sync at VM startup:
VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
Disable the guest additions from within the VM at runtime:
sudo service vboxadd-service stop
The reasons they don't work for me are:
When I run sudo VBoxControl guestproperty enumerate
I don't see anything to do with time syncing.
So… a way to disable and enable time sync from within a VirtualBox VM without disabling the vboxadd-service
service please :)
[1] https://www.virtualbox.org/manual/ch09.html#disabletimesync - Section 9.13.4
You should be able to edit the vboxadd-service
script on the client and add the --disable-timesync
option. Then sudo service vboxadd-service restart
and time sync should be disabled.