wrong time at Ubuntu 16.04.1 LTS
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.org
every day and then it becomes right, but next day I have this problem again.
linux vmware ntp clock
New contributor
add a comment |
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.org
every day and then it becomes right, but next day I have this problem again.
linux vmware ntp clock
New contributor
This situation is particularly well known by people using VmWare....
– Rui F Ribeiro
yesterday
add a comment |
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.org
every day and then it becomes right, but next day I have this problem again.
linux vmware ntp clock
New contributor
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.org
every day and then it becomes right, but next day I have this problem again.
linux vmware ntp clock
linux vmware ntp clock
New contributor
New contributor
edited yesterday
Jeff Schaller
39k1053125
39k1053125
New contributor
asked yesterday
Dev
1112
1112
New contributor
New contributor
This situation is particularly well known by people using VmWare....
– Rui F Ribeiro
yesterday
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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:
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);
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
);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.
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:
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);
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
);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.
add a comment |
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:
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);
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
);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.
add a comment |
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:
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);
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
);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.
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:
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);
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
);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.
edited yesterday
answered yesterday
Rui F Ribeiro
39.2k1479130
39.2k1479130
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
This situation is particularly well known by people using VmWare....
– Rui F Ribeiro
yesterday