Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

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.

share|improve this answer
    
So you're right: ntpdate is probably not my problem, because I just tried your suggestion (editing the NTPSERVERS variable to be empty) and the date is still resetting. How can I find this thing? –  Andres Jaan Tack Jan 19 '10 at 18:52
1  
Aha! I disabled time synchronization in VMWare (set tools.timeSync = "0" in the .vmx file) and my problems are solved! Thanks for pointing me in the right direction! –  Andres Jaan Tack Jan 19 '10 at 19:03

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.

share|improve this answer

man update-rc.d

The correct way to disable services is to configure the service as stopped in all runlevels in which it is started by default. In the System V init system this means renaming the service’s symbolic links from S to K.

sudo update-rc.d ntp stop 20 2 3 4 5 .

or put an exit inside:/etc/default/ntp

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.