Stop Ubuntu From Automatically Updating the Time












4















I just need to set the date temporarily. I run this



date 051918002010.00


and it sticks for just 5 seconds or so. Then it syncs with the time server. I have tried:



ps aux | grep ntp


but there is nothing there.



I need a correct answer now, more than a more detailed answer later :)



Edit: As answerers quickly discovered, my Ubuntu is running in a VirtualBox, which turned out to be relevant for some versions of the answer. Thanks to everybody.










share|improve this question

























  • Why you are trying to do this, what is the purpose?

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:40






  • 1





    development, simulating situations.

    – Dan Rosenstark
    Dec 15 '09 at 21:54
















4















I just need to set the date temporarily. I run this



date 051918002010.00


and it sticks for just 5 seconds or so. Then it syncs with the time server. I have tried:



ps aux | grep ntp


but there is nothing there.



I need a correct answer now, more than a more detailed answer later :)



Edit: As answerers quickly discovered, my Ubuntu is running in a VirtualBox, which turned out to be relevant for some versions of the answer. Thanks to everybody.










share|improve this question

























  • Why you are trying to do this, what is the purpose?

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:40






  • 1





    development, simulating situations.

    – Dan Rosenstark
    Dec 15 '09 at 21:54














4












4








4


1






I just need to set the date temporarily. I run this



date 051918002010.00


and it sticks for just 5 seconds or so. Then it syncs with the time server. I have tried:



ps aux | grep ntp


but there is nothing there.



I need a correct answer now, more than a more detailed answer later :)



Edit: As answerers quickly discovered, my Ubuntu is running in a VirtualBox, which turned out to be relevant for some versions of the answer. Thanks to everybody.










share|improve this question
















I just need to set the date temporarily. I run this



date 051918002010.00


and it sticks for just 5 seconds or so. Then it syncs with the time server. I have tried:



ps aux | grep ntp


but there is nothing there.



I need a correct answer now, more than a more detailed answer later :)



Edit: As answerers quickly discovered, my Ubuntu is running in a VirtualBox, which turned out to be relevant for some versions of the answer. Thanks to everybody.







ubuntu virtualbox sync time






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 6 '10 at 12:56









quack quixote

35.2k1087119




35.2k1087119










asked Dec 15 '09 at 21:36









Dan RosenstarkDan Rosenstark

3,658114884




3,658114884













  • Why you are trying to do this, what is the purpose?

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:40






  • 1





    development, simulating situations.

    – Dan Rosenstark
    Dec 15 '09 at 21:54



















  • Why you are trying to do this, what is the purpose?

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:40






  • 1





    development, simulating situations.

    – Dan Rosenstark
    Dec 15 '09 at 21:54

















Why you are trying to do this, what is the purpose?

– Jeffrey Vandenborne
Dec 15 '09 at 21:40





Why you are trying to do this, what is the purpose?

– Jeffrey Vandenborne
Dec 15 '09 at 21:40




1




1





development, simulating situations.

– Dan Rosenstark
Dec 15 '09 at 21:54





development, simulating situations.

– Dan Rosenstark
Dec 15 '09 at 21:54










5 Answers
5






active

oldest

votes


















7














It sounds like you're really looking for a way to run a program so that the program thinks it's running under a different date and time.



An earlier question was asked about this: Linux RunAsDate analogue? Below is the answer I gave there. Note you seem to be attempting Option 3.



The ntpdate package isn't a daemon and should not be updating your system time automatically (it should run once at boot and no more). I'm not overly familiar with VirtualBox, but I'd guess you've either got ntpd installed or the VirtualBox Guest Additions are syncing the time directly from the host OS, in which case you'll need to disable them, or use one of the wrapper libraries mentioned below in Option 2.



Update: It looks like the VirtualBox Guest Additions install /usr/sbin/vboxadd-timesync -- I'd guess this is the executable that syncs the guest clock with that of the host. Check to see if it's installed a startup script (possibly /etc/init.d/vboxadd-timesync); if so, you can stop the sync with sudo /etc/init.d/vboxadd-timesync stop. If no startup script, you can probably just kill the process.





What RunAsDate does is the following:




RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify.




Under Linux you have some options to accomplish the same thing:




  1. If you can get a Windows version of the program, you might be able to run RunAsDate under Wine (but watch out for a recent bug).


  2. Find a wrapper library to do this, or write your own. Some options are given below.


  3. Use a Virtual Machine. This is overkill, but since an OS in guest VM is completely separate from the underlying host, you can set it's system time to something completely different. It may be quicker to setup than the other options.





Option 2 can be accomplished by different methods, depending on the what you're trying to run. DaveParillo's answer below links to a DIY approach that explains the different methods and includes code for an executable. Some other options include:




  • datefudge, available in Debian/Ubuntu repositories and other places.


  • Time-Fake perl module, also in Debian repositories as package libtime-fake-perl.


  • FakeTime Preload Library (aka libfaketime, freshmeat link), a library that can intercept system calls in dynamically-linked binaries. Available in Debian repositories for Squeeze and Sid.







share|improve this answer


























  • sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

    – Dan Rosenstark
    Dec 16 '09 at 20:15











  • Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

    – Dan Rosenstark
    Dec 16 '09 at 20:22






  • 2





    Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

    – Dan Rosenstark
    Dec 16 '09 at 20:24











  • The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

    – Radu Maris
    Nov 19 '13 at 18:24



















5














Since your comment response to Dan McG seems to indicate that you're running Ubuntu as a VirtualBox guest, if you've installed the VirtualBox guest additions, then they will automatically sync the guest's time with the host's.



ps -ef | grep VBoxService


should show the VirtualBox guest additions service running.



You could then try:



sudo /etc/init.d/vboxadd-service stop


to stop it until reboot.






share|improve this answer


























  • I'll try cutting the network connection on the guest then.

    – Dan Rosenstark
    Dec 15 '09 at 21:53











  • Smart thinking there, everything is so clear now, cheers!

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:55











  • @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

    – Nick Meyer
    Dec 15 '09 at 21:56











  • @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

    – Jeffrey Vandenborne
    Dec 15 '09 at 22:01











  • this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

    – Dan Rosenstark
    Dec 15 '09 at 22:03



















3














Quick Answer: Disconnect your network connection :)






share|improve this answer
























  • I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

    – Dan Rosenstark
    Dec 15 '09 at 21:41











  • If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:45











  • Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

    – Dan Rosenstark
    Dec 15 '09 at 21:48











  • sudo apt-get remove ntpdate

    – Jeffrey Vandenborne
    Dec 15 '09 at 21:52



















3














You could also look at 'libfaketime', which is packaged in Ubuntu/Debian.



It allows you to fake system time for a program without having to change the system-wide time (by intercepting the system calls by using LD_PRELOAD)






share|improve this answer































    1














    You can run VBoxManage setextradata <guest-vm-name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 on your host OS to disable automatic time sync.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f83750%2fstop-ubuntu-from-automatically-updating-the-time%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      7














      It sounds like you're really looking for a way to run a program so that the program thinks it's running under a different date and time.



      An earlier question was asked about this: Linux RunAsDate analogue? Below is the answer I gave there. Note you seem to be attempting Option 3.



      The ntpdate package isn't a daemon and should not be updating your system time automatically (it should run once at boot and no more). I'm not overly familiar with VirtualBox, but I'd guess you've either got ntpd installed or the VirtualBox Guest Additions are syncing the time directly from the host OS, in which case you'll need to disable them, or use one of the wrapper libraries mentioned below in Option 2.



      Update: It looks like the VirtualBox Guest Additions install /usr/sbin/vboxadd-timesync -- I'd guess this is the executable that syncs the guest clock with that of the host. Check to see if it's installed a startup script (possibly /etc/init.d/vboxadd-timesync); if so, you can stop the sync with sudo /etc/init.d/vboxadd-timesync stop. If no startup script, you can probably just kill the process.





      What RunAsDate does is the following:




      RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify.




      Under Linux you have some options to accomplish the same thing:




      1. If you can get a Windows version of the program, you might be able to run RunAsDate under Wine (but watch out for a recent bug).


      2. Find a wrapper library to do this, or write your own. Some options are given below.


      3. Use a Virtual Machine. This is overkill, but since an OS in guest VM is completely separate from the underlying host, you can set it's system time to something completely different. It may be quicker to setup than the other options.





      Option 2 can be accomplished by different methods, depending on the what you're trying to run. DaveParillo's answer below links to a DIY approach that explains the different methods and includes code for an executable. Some other options include:




      • datefudge, available in Debian/Ubuntu repositories and other places.


      • Time-Fake perl module, also in Debian repositories as package libtime-fake-perl.


      • FakeTime Preload Library (aka libfaketime, freshmeat link), a library that can intercept system calls in dynamically-linked binaries. Available in Debian repositories for Squeeze and Sid.







      share|improve this answer


























      • sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

        – Dan Rosenstark
        Dec 16 '09 at 20:15











      • Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

        – Dan Rosenstark
        Dec 16 '09 at 20:22






      • 2





        Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

        – Dan Rosenstark
        Dec 16 '09 at 20:24











      • The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

        – Radu Maris
        Nov 19 '13 at 18:24
















      7














      It sounds like you're really looking for a way to run a program so that the program thinks it's running under a different date and time.



      An earlier question was asked about this: Linux RunAsDate analogue? Below is the answer I gave there. Note you seem to be attempting Option 3.



      The ntpdate package isn't a daemon and should not be updating your system time automatically (it should run once at boot and no more). I'm not overly familiar with VirtualBox, but I'd guess you've either got ntpd installed or the VirtualBox Guest Additions are syncing the time directly from the host OS, in which case you'll need to disable them, or use one of the wrapper libraries mentioned below in Option 2.



      Update: It looks like the VirtualBox Guest Additions install /usr/sbin/vboxadd-timesync -- I'd guess this is the executable that syncs the guest clock with that of the host. Check to see if it's installed a startup script (possibly /etc/init.d/vboxadd-timesync); if so, you can stop the sync with sudo /etc/init.d/vboxadd-timesync stop. If no startup script, you can probably just kill the process.





      What RunAsDate does is the following:




      RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify.




      Under Linux you have some options to accomplish the same thing:




      1. If you can get a Windows version of the program, you might be able to run RunAsDate under Wine (but watch out for a recent bug).


      2. Find a wrapper library to do this, or write your own. Some options are given below.


      3. Use a Virtual Machine. This is overkill, but since an OS in guest VM is completely separate from the underlying host, you can set it's system time to something completely different. It may be quicker to setup than the other options.





      Option 2 can be accomplished by different methods, depending on the what you're trying to run. DaveParillo's answer below links to a DIY approach that explains the different methods and includes code for an executable. Some other options include:




      • datefudge, available in Debian/Ubuntu repositories and other places.


      • Time-Fake perl module, also in Debian repositories as package libtime-fake-perl.


      • FakeTime Preload Library (aka libfaketime, freshmeat link), a library that can intercept system calls in dynamically-linked binaries. Available in Debian repositories for Squeeze and Sid.







      share|improve this answer


























      • sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

        – Dan Rosenstark
        Dec 16 '09 at 20:15











      • Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

        – Dan Rosenstark
        Dec 16 '09 at 20:22






      • 2





        Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

        – Dan Rosenstark
        Dec 16 '09 at 20:24











      • The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

        – Radu Maris
        Nov 19 '13 at 18:24














      7












      7








      7







      It sounds like you're really looking for a way to run a program so that the program thinks it's running under a different date and time.



      An earlier question was asked about this: Linux RunAsDate analogue? Below is the answer I gave there. Note you seem to be attempting Option 3.



      The ntpdate package isn't a daemon and should not be updating your system time automatically (it should run once at boot and no more). I'm not overly familiar with VirtualBox, but I'd guess you've either got ntpd installed or the VirtualBox Guest Additions are syncing the time directly from the host OS, in which case you'll need to disable them, or use one of the wrapper libraries mentioned below in Option 2.



      Update: It looks like the VirtualBox Guest Additions install /usr/sbin/vboxadd-timesync -- I'd guess this is the executable that syncs the guest clock with that of the host. Check to see if it's installed a startup script (possibly /etc/init.d/vboxadd-timesync); if so, you can stop the sync with sudo /etc/init.d/vboxadd-timesync stop. If no startup script, you can probably just kill the process.





      What RunAsDate does is the following:




      RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify.




      Under Linux you have some options to accomplish the same thing:




      1. If you can get a Windows version of the program, you might be able to run RunAsDate under Wine (but watch out for a recent bug).


      2. Find a wrapper library to do this, or write your own. Some options are given below.


      3. Use a Virtual Machine. This is overkill, but since an OS in guest VM is completely separate from the underlying host, you can set it's system time to something completely different. It may be quicker to setup than the other options.





      Option 2 can be accomplished by different methods, depending on the what you're trying to run. DaveParillo's answer below links to a DIY approach that explains the different methods and includes code for an executable. Some other options include:




      • datefudge, available in Debian/Ubuntu repositories and other places.


      • Time-Fake perl module, also in Debian repositories as package libtime-fake-perl.


      • FakeTime Preload Library (aka libfaketime, freshmeat link), a library that can intercept system calls in dynamically-linked binaries. Available in Debian repositories for Squeeze and Sid.







      share|improve this answer















      It sounds like you're really looking for a way to run a program so that the program thinks it's running under a different date and time.



      An earlier question was asked about this: Linux RunAsDate analogue? Below is the answer I gave there. Note you seem to be attempting Option 3.



      The ntpdate package isn't a daemon and should not be updating your system time automatically (it should run once at boot and no more). I'm not overly familiar with VirtualBox, but I'd guess you've either got ntpd installed or the VirtualBox Guest Additions are syncing the time directly from the host OS, in which case you'll need to disable them, or use one of the wrapper libraries mentioned below in Option 2.



      Update: It looks like the VirtualBox Guest Additions install /usr/sbin/vboxadd-timesync -- I'd guess this is the executable that syncs the guest clock with that of the host. Check to see if it's installed a startup script (possibly /etc/init.d/vboxadd-timesync); if so, you can stop the sync with sudo /etc/init.d/vboxadd-timesync stop. If no startup script, you can probably just kill the process.





      What RunAsDate does is the following:




      RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify.




      Under Linux you have some options to accomplish the same thing:




      1. If you can get a Windows version of the program, you might be able to run RunAsDate under Wine (but watch out for a recent bug).


      2. Find a wrapper library to do this, or write your own. Some options are given below.


      3. Use a Virtual Machine. This is overkill, but since an OS in guest VM is completely separate from the underlying host, you can set it's system time to something completely different. It may be quicker to setup than the other options.





      Option 2 can be accomplished by different methods, depending on the what you're trying to run. DaveParillo's answer below links to a DIY approach that explains the different methods and includes code for an executable. Some other options include:




      • datefudge, available in Debian/Ubuntu repositories and other places.


      • Time-Fake perl module, also in Debian repositories as package libtime-fake-perl.


      • FakeTime Preload Library (aka libfaketime, freshmeat link), a library that can intercept system calls in dynamically-linked binaries. Available in Debian repositories for Squeeze and Sid.








      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 20 '17 at 10:17









      Community

      1




      1










      answered Dec 16 '09 at 13:13









      quack quixotequack quixote

      35.2k1087119




      35.2k1087119













      • sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

        – Dan Rosenstark
        Dec 16 '09 at 20:15











      • Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

        – Dan Rosenstark
        Dec 16 '09 at 20:22






      • 2





        Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

        – Dan Rosenstark
        Dec 16 '09 at 20:24











      • The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

        – Radu Maris
        Nov 19 '13 at 18:24



















      • sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

        – Dan Rosenstark
        Dec 16 '09 at 20:15











      • Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

        – Dan Rosenstark
        Dec 16 '09 at 20:22






      • 2





        Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

        – Dan Rosenstark
        Dec 16 '09 at 20:24











      • The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

        – Radu Maris
        Nov 19 '13 at 18:24

















      sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

      – Dan Rosenstark
      Dec 16 '09 at 20:15





      sudo /etc/init.d/vboxadd-timesync stop worked! Thanks so much ~quack

      – Dan Rosenstark
      Dec 16 '09 at 20:15













      Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

      – Dan Rosenstark
      Dec 16 '09 at 20:22





      Wow, datefudge works perfectly on Ubuntu as well. Very sweet. Thanks again!

      – Dan Rosenstark
      Dec 16 '09 at 20:22




      2




      2





      Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

      – Dan Rosenstark
      Dec 16 '09 at 20:24





      Just for my notes if you don't mind: datefudge "Wed Dec 16 15:20:28 EST 2008" ruby script/console

      – Dan Rosenstark
      Dec 16 '09 at 20:24













      The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

      – Radu Maris
      Nov 19 '13 at 18:24





      The only thing missing at the beginning of the answer is: "Don't be evil when using this info".

      – Radu Maris
      Nov 19 '13 at 18:24













      5














      Since your comment response to Dan McG seems to indicate that you're running Ubuntu as a VirtualBox guest, if you've installed the VirtualBox guest additions, then they will automatically sync the guest's time with the host's.



      ps -ef | grep VBoxService


      should show the VirtualBox guest additions service running.



      You could then try:



      sudo /etc/init.d/vboxadd-service stop


      to stop it until reboot.






      share|improve this answer


























      • I'll try cutting the network connection on the guest then.

        – Dan Rosenstark
        Dec 15 '09 at 21:53











      • Smart thinking there, everything is so clear now, cheers!

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:55











      • @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

        – Nick Meyer
        Dec 15 '09 at 21:56











      • @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

        – Jeffrey Vandenborne
        Dec 15 '09 at 22:01











      • this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

        – Dan Rosenstark
        Dec 15 '09 at 22:03
















      5














      Since your comment response to Dan McG seems to indicate that you're running Ubuntu as a VirtualBox guest, if you've installed the VirtualBox guest additions, then they will automatically sync the guest's time with the host's.



      ps -ef | grep VBoxService


      should show the VirtualBox guest additions service running.



      You could then try:



      sudo /etc/init.d/vboxadd-service stop


      to stop it until reboot.






      share|improve this answer


























      • I'll try cutting the network connection on the guest then.

        – Dan Rosenstark
        Dec 15 '09 at 21:53











      • Smart thinking there, everything is so clear now, cheers!

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:55











      • @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

        – Nick Meyer
        Dec 15 '09 at 21:56











      • @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

        – Jeffrey Vandenborne
        Dec 15 '09 at 22:01











      • this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

        – Dan Rosenstark
        Dec 15 '09 at 22:03














      5












      5








      5







      Since your comment response to Dan McG seems to indicate that you're running Ubuntu as a VirtualBox guest, if you've installed the VirtualBox guest additions, then they will automatically sync the guest's time with the host's.



      ps -ef | grep VBoxService


      should show the VirtualBox guest additions service running.



      You could then try:



      sudo /etc/init.d/vboxadd-service stop


      to stop it until reboot.






      share|improve this answer















      Since your comment response to Dan McG seems to indicate that you're running Ubuntu as a VirtualBox guest, if you've installed the VirtualBox guest additions, then they will automatically sync the guest's time with the host's.



      ps -ef | grep VBoxService


      should show the VirtualBox guest additions service running.



      You could then try:



      sudo /etc/init.d/vboxadd-service stop


      to stop it until reboot.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Dec 15 '09 at 21:59

























      answered Dec 15 '09 at 21:52









      Nick MeyerNick Meyer

      5561413




      5561413













      • I'll try cutting the network connection on the guest then.

        – Dan Rosenstark
        Dec 15 '09 at 21:53











      • Smart thinking there, everything is so clear now, cheers!

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:55











      • @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

        – Nick Meyer
        Dec 15 '09 at 21:56











      • @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

        – Jeffrey Vandenborne
        Dec 15 '09 at 22:01











      • this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

        – Dan Rosenstark
        Dec 15 '09 at 22:03



















      • I'll try cutting the network connection on the guest then.

        – Dan Rosenstark
        Dec 15 '09 at 21:53











      • Smart thinking there, everything is so clear now, cheers!

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:55











      • @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

        – Nick Meyer
        Dec 15 '09 at 21:56











      • @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

        – Jeffrey Vandenborne
        Dec 15 '09 at 22:01











      • this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

        – Dan Rosenstark
        Dec 15 '09 at 22:03

















      I'll try cutting the network connection on the guest then.

      – Dan Rosenstark
      Dec 15 '09 at 21:53





      I'll try cutting the network connection on the guest then.

      – Dan Rosenstark
      Dec 15 '09 at 21:53













      Smart thinking there, everything is so clear now, cheers!

      – Jeffrey Vandenborne
      Dec 15 '09 at 21:55





      Smart thinking there, everything is so clear now, cheers!

      – Jeffrey Vandenborne
      Dec 15 '09 at 21:55













      @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

      – Nick Meyer
      Dec 15 '09 at 21:56





      @Yar, I'm not sure it goes through the virtual network connection on the guest. It probably gets the hosts' system clock value through the VirtualBox process.

      – Nick Meyer
      Dec 15 '09 at 21:56













      @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

      – Jeffrey Vandenborne
      Dec 15 '09 at 22:01





      @Nick Isn't there a config file or configuration dialog available for the vbox guest additions? Maybe he can change the time syncing there. coming from vmware, I don't got a lot of experience with this.

      – Jeffrey Vandenborne
      Dec 15 '09 at 22:01













      this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

      – Dan Rosenstark
      Dec 15 '09 at 22:03





      this was great stuff, but: 1) While I am running as a VirtualBox guest, the VBoxService is not loaded (I never did the extensions, I guess) 2) vboxadd-service does not exist 3) even killing both network connections causes the time to be restored in a matter of seconds

      – Dan Rosenstark
      Dec 15 '09 at 22:03











      3














      Quick Answer: Disconnect your network connection :)






      share|improve this answer
























      • I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

        – Dan Rosenstark
        Dec 15 '09 at 21:41











      • If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:45











      • Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

        – Dan Rosenstark
        Dec 15 '09 at 21:48











      • sudo apt-get remove ntpdate

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:52
















      3














      Quick Answer: Disconnect your network connection :)






      share|improve this answer
























      • I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

        – Dan Rosenstark
        Dec 15 '09 at 21:41











      • If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:45











      • Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

        – Dan Rosenstark
        Dec 15 '09 at 21:48











      • sudo apt-get remove ntpdate

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:52














      3












      3








      3







      Quick Answer: Disconnect your network connection :)






      share|improve this answer













      Quick Answer: Disconnect your network connection :)







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 15 '09 at 21:37









      Dan McGrathDan McGrath

      2,8861820




      2,8861820













      • I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

        – Dan Rosenstark
        Dec 15 '09 at 21:41











      • If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:45











      • Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

        – Dan Rosenstark
        Dec 15 '09 at 21:48











      • sudo apt-get remove ntpdate

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:52



















      • I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

        – Dan Rosenstark
        Dec 15 '09 at 21:41











      • If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:45











      • Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

        – Dan Rosenstark
        Dec 15 '09 at 21:48











      • sudo apt-get remove ntpdate

        – Jeffrey Vandenborne
        Dec 15 '09 at 21:52

















      I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

      – Dan Rosenstark
      Dec 15 '09 at 21:41





      I'm not even sure how to do that, since it seems to be getting time from... the VirtualBox host? Or perhaps... not sure, but disconnecting the Internet did not help.

      – Dan Rosenstark
      Dec 15 '09 at 21:41













      If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

      – Jeffrey Vandenborne
      Dec 15 '09 at 21:45





      If you're using a wired network, check out the network icon in the top panel (I assume you didn't tweak your desktop) click it and choose disconnect.

      – Jeffrey Vandenborne
      Dec 15 '09 at 21:45













      Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

      – Dan Rosenstark
      Dec 15 '09 at 21:48





      Problem is that nntp continues, it seems, as it does gradual updates. In any case, the time sync does not stop without internet connectivity.

      – Dan Rosenstark
      Dec 15 '09 at 21:48













      sudo apt-get remove ntpdate

      – Jeffrey Vandenborne
      Dec 15 '09 at 21:52





      sudo apt-get remove ntpdate

      – Jeffrey Vandenborne
      Dec 15 '09 at 21:52











      3














      You could also look at 'libfaketime', which is packaged in Ubuntu/Debian.



      It allows you to fake system time for a program without having to change the system-wide time (by intercepting the system calls by using LD_PRELOAD)






      share|improve this answer




























        3














        You could also look at 'libfaketime', which is packaged in Ubuntu/Debian.



        It allows you to fake system time for a program without having to change the system-wide time (by intercepting the system calls by using LD_PRELOAD)






        share|improve this answer


























          3












          3








          3







          You could also look at 'libfaketime', which is packaged in Ubuntu/Debian.



          It allows you to fake system time for a program without having to change the system-wide time (by intercepting the system calls by using LD_PRELOAD)






          share|improve this answer













          You could also look at 'libfaketime', which is packaged in Ubuntu/Debian.



          It allows you to fake system time for a program without having to change the system-wide time (by intercepting the system calls by using LD_PRELOAD)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 16 '09 at 12:17









          jorjor

          55625




          55625























              1














              You can run VBoxManage setextradata <guest-vm-name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 on your host OS to disable automatic time sync.






              share|improve this answer




























                1














                You can run VBoxManage setextradata <guest-vm-name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 on your host OS to disable automatic time sync.






                share|improve this answer


























                  1












                  1








                  1







                  You can run VBoxManage setextradata <guest-vm-name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 on your host OS to disable automatic time sync.






                  share|improve this answer













                  You can run VBoxManage setextradata <guest-vm-name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 on your host OS to disable automatic time sync.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 21 at 2:40









                  Roc WhiteRoc White

                  111




                  111






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f83750%2fstop-ubuntu-from-automatically-updating-the-time%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                      is 'sed' thread safe

                      How to make a Squid Proxy server?