I have a virtual machine(VirtualBox) running Ubuntu server. When i issue date -s 2011-01-01 it changes the date, but after a few seconds, the date resets itself to the real time.
I do not have any ntp service running (althrough i'm not sure how to check, but i dont see any ntp proceeses starting in this interval)

2 Answers
2

If you don't have ntp running than it appears that Guest Additions is resetting the date to that found in the VM virtual bios. Have a look at this discussion for some more information and some scripts to change the vbios date/time.

I would suggest checking the time against hwclock to see what the VM hardware clock thinks the time is. Note you should never ever run ntp under a VM, as it is not basing its drift on a real physical clock, so can royally mess up in all sorts of nasty ways. As long as the physical host runs NTP well then the clocks within the VM's are going to be just as accurate.