Disable Time Synchronization on Ubuntu
I am setting up a development environment with Ubuntu in a virtual machine. The date in the VM must be in 2009 due to some silly timebombing issues, so I want to disable any automatic time synchronization (e.g. ntpdate).
$ sudo apt-get remove ntpdate
...
The following packages will be REMOVED:
ntpdate ubuntu-minimal
Obviously, I don't want to remove ubuntu-minimal. Unfortunately, the machine keeps resetting the time forwards every couple of seconds. How do I disable this or stub out this feature?
Solution 1:
Are you sure ntpdate is your problem? It does not run as a service and usually only gets run when an interfaces is brought up on recent ubuntu systems.
To disable ntpdate on an Ubuntu system without removing it you could simply update /etc/default/ntpdate
and add the word exit
as the first line or change the NTPSERVERS
variable to be empty.
Are you sure the issue isn't related to your VM tools package? Are you sure you haven't actually installed a full ntp daemon?
Intentionally keeping time out of sync in a single VM can be somewhat difficult. The system clock is one of the resources that don't really get virtualized very well.
Solution 2:
ubuntu-minimal is the package which provides many other packages in the Ubuntu minimal install. Removing that package does not cause any problems. Later on if you want to get all the packages in a minimal installation then just reinstall ubuntu-minimal.