设置esxi主机时间

一、设置esxi主机时间

esxi主机是不能用date命令来设置时间的,需要使用esxcli命令

更改esxi系统时间:

esxcli system time set -d 08 -H 16 -m 01 -M 03 -y 2016

如果同步系统时间到主板上,使用下面命令:

esxcli system time get

更改esxi主机主板上的时间:

esxcli hardware clock set -d 10 -H 10 -m 18 -M 04 -y 2016

如果同步主板到esxi系统上,使用下面命令:

esxcli system time get

二、配置ESXI NTP设置

(此步在vsphere clinet或web client中设置,此处略)

三、配置文件修改

1、vi /etc/ntp.conf 加入tos maxdist 30 保存。
在这里插入图片描述

esxi设置时间和NTP的方法

2、vi /etc/likewise/lsassd.conf 找sync一行,修改为sync-system-time = yes 保存退出。

esxi设置时间和NTP的方法
在这里插入图片描述
在这里插入图片描述

esxi设置时间和NTP的方法

3、重启服务

/etc/init.d/ntpd restart

/etc/init.d/lsassd restart 如果报错如下:
在这里插入图片描述

esxi设置时间和NTP的方法

再重启两个服务:

/etc/init.d/hostd restart

/etc/init.d/vpxa restart 重启完vpxa服务后,esxi端时间可立即更新。

转载于:https://blog.51cto.com/hujizhou/1963108侵删

Guess you like

Origin blog.csdn.net/m0_50970375/article/details/128317689