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?
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 wordexit
as the first line or change theNTPSERVERS
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.
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.
I have a ubuntu/trusty64 virtual machine I built with vagrant. I had to turn off the time sync in the virtualbox guest addition on the virtual machine. To do this I added VBOX_OPTS to /etc/init.d/virtualbox-guest-utils like so:
edit /etc/init.d/virtualbox-guest-utils insert these lines:
modify this line:
Now stop and start the service like so
Now I can set the date to what I need and it stays that way until I reboot the machine.
man update-rc.d
or put an exit inside:/etc/default/ntp