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
When the keyboard and mouse input is captured in the virtual machine, you cannot move the pointer out of the virtual machine window and all keystrokes and button clicks go to the virtual machine. To release the keyboard and mouse back to the primary OS, press Ctrl+Alt.
As briefly mentioned in Section 1.18, “Alternative Front-Ends”, VBoxManage is the command-line interface to Oracle VM VirtualBox. With it, you can completely control Oracle VM VirtualBox from the command line of your host operating system.
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.
See also https://www.winklerweb.net/index.php/blog/11-tools/25-disabling-time-synchronization-in-virtualbox-ubuntu-16-04
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With