Q:

How to synchronize the time in Debian6 server? We have 30 min delay in our VMs

I can't have the correct time in our servers. We get always the same delay in the three of them (they are VM on the same server).
We use ntp to have our date always synchronized·
The main server which is virtualized has OS Linux Proxmox.
What I have probe in the main server:
Reconfigure tzdata (real time 12:14 pm CEST):
root@ns226161:~# dpkg-reconfigure tzdata

Current default time zone: 'Europe/Madrid'
Local time is now:      Wed May 13 11:55:01 CEST 2015.
Universal Time is now:  Wed May 13 09:55:01 UTC 2015.

Try to access hardware clock (time is okay here!!):
root@ns226161:~# hwclock -r
Wed 13 May 2015 14:01:57 CEST  -0.327412 seconds

Restart NTP:
root@ns226161:~# /etc/init.d/ntp restart
[ ok ] Stopping NTP server: ntpd.
[....] Starting NTP server: ntpd/etc/init.d/ntp: line 40: 11709 Terminated              lockfile-touch $LOCKFILE
. ok 

So, how can I update the time from the hardware clock which is okay?

A:

I found the solution thanks to this wiki: http://docs.slackware.com/howtos:hardware:syncing_hardware_clock_and_system_local_time
Sopping NTP, update time from their servers, restart ntp and synchronize HW clock
root@ns226161:~# /etc/init.d/ntp stop
Stopping NTP server: ntpd.
root@ns226161:~# ntpdate pool.ntp.org
13 May 14:06:12 ntpdate[16434]: step time server 37.187.2.84 offset 1117.077034 sec
root@ns226161:~# /etc/init.d/ntp start
Starting NTP server: ntpd.
root@ns226161:~# date
Wed May 13 14:06:30 CEST 2015
root@ns226161:~# hwclock --systohc --localtime
root@ns226161:~#

