wrong time at Ubuntu 16.04.1 LTS












2














I have VM with Ubuntu 16.04.1 LTS, and time is wrong. The difference is about 15 hours. I synchronize it via sudo ntpdate 1.ro.pool.ntp.orgevery day and then it becomes right, but next day I have this problem again.










share|improve this question









New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • This situation is particularly well known by people using VmWare....
    – Rui F Ribeiro
    yesterday
















2














I have VM with Ubuntu 16.04.1 LTS, and time is wrong. The difference is about 15 hours. I synchronize it via sudo ntpdate 1.ro.pool.ntp.orgevery day and then it becomes right, but next day I have this problem again.










share|improve this question









New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • This situation is particularly well known by people using VmWare....
    – Rui F Ribeiro
    yesterday














2












2








2







I have VM with Ubuntu 16.04.1 LTS, and time is wrong. The difference is about 15 hours. I synchronize it via sudo ntpdate 1.ro.pool.ntp.orgevery day and then it becomes right, but next day I have this problem again.










share|improve this question









New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have VM with Ubuntu 16.04.1 LTS, and time is wrong. The difference is about 15 hours. I synchronize it via sudo ntpdate 1.ro.pool.ntp.orgevery day and then it becomes right, but next day I have this problem again.







linux vmware ntp clock






share|improve this question









New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Jeff Schaller

39k1053125




39k1053125






New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Dev

1112




1112




New contributor




Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • This situation is particularly well known by people using VmWare....
    – Rui F Ribeiro
    yesterday


















  • This situation is particularly well known by people using VmWare....
    – Rui F Ribeiro
    yesterday
















This situation is particularly well known by people using VmWare....
– Rui F Ribeiro
yesterday




This situation is particularly well known by people using VmWare....
– Rui F Ribeiro
yesterday










1 Answer
1






active

oldest

votes


















3














The VM is following the virtualization host time that is wrong. Whist you set it up to the current time with occasional ntpdate commands, it will diverge rather quickly to the host time again, as you are witnessing.



To fix the time, you can either:




  1. fix the host/hypervisor time and setup NTP properly on the hypervisor (it is recommended to do it nonetheless to keep all the infra-structure/logs on the same time);


  2. tell the VM to not follow the host time without running a time synchronization daemon (nonetheless there is the phenomenon of time compression, and time will slowly diverge from the official time after the ntpdate);


  3. tell the VM to not follow the host time and run an NTP synchronization daemon



Option 2 is not a desired setup, but I included it to illustrate a point. I have followed option 1 once in a while with very light VM setups, however Option 3 is the course of action recommended by VMWare white papers.



Assuming a VMware host, For disabling the syncronization with the vmware host, you have to have (open) vmtools installed, and run upon boot, as root or with sudo:



vmware-toolbox-cmd timesync disable


And then to install a NTP daemon, you can either install ntpd, or the chrony daemon.



Nevertheless, I would also stress again, that from an operational point of view, it is also advisable that the virtualization host machine has the time/NTP configuration fixed.



See also this post from our sister site ServerFault Do I need to run a NTP server in every VM?




It should be noted that time not only "can" drift away, but will drift
away due to the fact that intervals between timer interrupts (which
timekeeping on OS is often based on) are stretched and compressed as
the hypervisor would see fit.







share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    });


    }
    });






    Dev is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492487%2fwrong-time-at-ubuntu-16-04-1-lts%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    The VM is following the virtualization host time that is wrong. Whist you set it up to the current time with occasional ntpdate commands, it will diverge rather quickly to the host time again, as you are witnessing.



    To fix the time, you can either:




    1. fix the host/hypervisor time and setup NTP properly on the hypervisor (it is recommended to do it nonetheless to keep all the infra-structure/logs on the same time);


    2. tell the VM to not follow the host time without running a time synchronization daemon (nonetheless there is the phenomenon of time compression, and time will slowly diverge from the official time after the ntpdate);


    3. tell the VM to not follow the host time and run an NTP synchronization daemon



    Option 2 is not a desired setup, but I included it to illustrate a point. I have followed option 1 once in a while with very light VM setups, however Option 3 is the course of action recommended by VMWare white papers.



    Assuming a VMware host, For disabling the syncronization with the vmware host, you have to have (open) vmtools installed, and run upon boot, as root or with sudo:



    vmware-toolbox-cmd timesync disable


    And then to install a NTP daemon, you can either install ntpd, or the chrony daemon.



    Nevertheless, I would also stress again, that from an operational point of view, it is also advisable that the virtualization host machine has the time/NTP configuration fixed.



    See also this post from our sister site ServerFault Do I need to run a NTP server in every VM?




    It should be noted that time not only "can" drift away, but will drift
    away due to the fact that intervals between timer interrupts (which
    timekeeping on OS is often based on) are stretched and compressed as
    the hypervisor would see fit.







    share|improve this answer




























      3














      The VM is following the virtualization host time that is wrong. Whist you set it up to the current time with occasional ntpdate commands, it will diverge rather quickly to the host time again, as you are witnessing.



      To fix the time, you can either:




      1. fix the host/hypervisor time and setup NTP properly on the hypervisor (it is recommended to do it nonetheless to keep all the infra-structure/logs on the same time);


      2. tell the VM to not follow the host time without running a time synchronization daemon (nonetheless there is the phenomenon of time compression, and time will slowly diverge from the official time after the ntpdate);


      3. tell the VM to not follow the host time and run an NTP synchronization daemon



      Option 2 is not a desired setup, but I included it to illustrate a point. I have followed option 1 once in a while with very light VM setups, however Option 3 is the course of action recommended by VMWare white papers.



      Assuming a VMware host, For disabling the syncronization with the vmware host, you have to have (open) vmtools installed, and run upon boot, as root or with sudo:



      vmware-toolbox-cmd timesync disable


      And then to install a NTP daemon, you can either install ntpd, or the chrony daemon.



      Nevertheless, I would also stress again, that from an operational point of view, it is also advisable that the virtualization host machine has the time/NTP configuration fixed.



      See also this post from our sister site ServerFault Do I need to run a NTP server in every VM?




      It should be noted that time not only "can" drift away, but will drift
      away due to the fact that intervals between timer interrupts (which
      timekeeping on OS is often based on) are stretched and compressed as
      the hypervisor would see fit.







      share|improve this answer


























        3












        3








        3






        The VM is following the virtualization host time that is wrong. Whist you set it up to the current time with occasional ntpdate commands, it will diverge rather quickly to the host time again, as you are witnessing.



        To fix the time, you can either:




        1. fix the host/hypervisor time and setup NTP properly on the hypervisor (it is recommended to do it nonetheless to keep all the infra-structure/logs on the same time);


        2. tell the VM to not follow the host time without running a time synchronization daemon (nonetheless there is the phenomenon of time compression, and time will slowly diverge from the official time after the ntpdate);


        3. tell the VM to not follow the host time and run an NTP synchronization daemon



        Option 2 is not a desired setup, but I included it to illustrate a point. I have followed option 1 once in a while with very light VM setups, however Option 3 is the course of action recommended by VMWare white papers.



        Assuming a VMware host, For disabling the syncronization with the vmware host, you have to have (open) vmtools installed, and run upon boot, as root or with sudo:



        vmware-toolbox-cmd timesync disable


        And then to install a NTP daemon, you can either install ntpd, or the chrony daemon.



        Nevertheless, I would also stress again, that from an operational point of view, it is also advisable that the virtualization host machine has the time/NTP configuration fixed.



        See also this post from our sister site ServerFault Do I need to run a NTP server in every VM?




        It should be noted that time not only "can" drift away, but will drift
        away due to the fact that intervals between timer interrupts (which
        timekeeping on OS is often based on) are stretched and compressed as
        the hypervisor would see fit.







        share|improve this answer














        The VM is following the virtualization host time that is wrong. Whist you set it up to the current time with occasional ntpdate commands, it will diverge rather quickly to the host time again, as you are witnessing.



        To fix the time, you can either:




        1. fix the host/hypervisor time and setup NTP properly on the hypervisor (it is recommended to do it nonetheless to keep all the infra-structure/logs on the same time);


        2. tell the VM to not follow the host time without running a time synchronization daemon (nonetheless there is the phenomenon of time compression, and time will slowly diverge from the official time after the ntpdate);


        3. tell the VM to not follow the host time and run an NTP synchronization daemon



        Option 2 is not a desired setup, but I included it to illustrate a point. I have followed option 1 once in a while with very light VM setups, however Option 3 is the course of action recommended by VMWare white papers.



        Assuming a VMware host, For disabling the syncronization with the vmware host, you have to have (open) vmtools installed, and run upon boot, as root or with sudo:



        vmware-toolbox-cmd timesync disable


        And then to install a NTP daemon, you can either install ntpd, or the chrony daemon.



        Nevertheless, I would also stress again, that from an operational point of view, it is also advisable that the virtualization host machine has the time/NTP configuration fixed.



        See also this post from our sister site ServerFault Do I need to run a NTP server in every VM?




        It should be noted that time not only "can" drift away, but will drift
        away due to the fact that intervals between timer interrupts (which
        timekeeping on OS is often based on) are stretched and compressed as
        the hypervisor would see fit.








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited yesterday

























        answered yesterday









        Rui F Ribeiro

        39.2k1479130




        39.2k1479130






















            Dev is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Dev is a new contributor. Be nice, and check out our Code of Conduct.













            Dev is a new contributor. Be nice, and check out our Code of Conduct.












            Dev is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2funix.stackexchange.com%2fquestions%2f492487%2fwrong-time-at-ubuntu-16-04-1-lts%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?