Debian – System time is wrong in Proxmox VE host, how can I fix it

debianntptimetimezonevirtualization

I'm using the latest version of Proxmox VE (which is based on Debian) and I can't fix the wrong time problem:

$ pveversion -v
pve-manager: 1.7-11 (pve-manager/1.7/5470)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.7-30
pve-kernel-2.6.32-4-pve: 2.6.32-30
qemu-server: 1.1-28
pve-firmware: 1.0-10
libpve-storage-perl: 1.0-16
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-10
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.13.0-3
ksm-control-daemon: 1.0-4

The host system's time is:

$ date
Fri Feb 25 12:39:12 CET 2011

but this is wrong because the correct time should be

Fri Feb 25 11:39:12 CET 2011

Because that's the local time in Belgium (where that server is located).

The timezone of the proxmox host is:

$ cat /etc/timezone 
Europe/Brussels

And there was no timezone setting in the server's BIOS settings. The server's BIOS screen shows the time correctly. I also receive the following warning from the system:

warning: `ntpd' uses 32-bit capabilities (legacy support in use)

According to /etc/default/rcS:

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=no
VERBOSE=no
FSCKFIX=no
RAMRUN=no
RAMLOCK=no

(Previously it was UTC=yes and I changed it into UTC=no and rebooted the server, hoping it would help but nothing changed.)

The ntp daemon is running and I did not make any changes to any ntp configuration file, they are at proxmox defaults.

How can I fix this wrong time issue?

Best Answer

What does

/usr/sbin/ntpq -p

show?

Try doing

sntp -P no -r pool.ntp.org

to set the time right and do afterwards a

hwclock --systohc

to write the time to the hardware clock.