当前位置:首页 > 技术分享 > 正文内容

如何在 ESXI 8中开启CIM(存储监控)服务

admin2年前 (2023-12-26)技术分享1504

To be able to monitor the underlying hardware of an ESXi server, the most common method is to use the integrated CIM Server. The CIM Server reads the current operational or health status of each hardware element and represents this in the output.

But since ESXi version 6.5 the CIM Server is stopped and disabled by default. This article shows how to correctly enable and start the CIM Server (aka WBEM service) in ESXi 8.

The official documentation lacks information

The official documentation from VMware is Knowledge Base Article #1025757. According to this KB article, it's enough to start the CIM Server service in the vSphere UI. 

However when trying to start the sfcbd-watchdog (CIM Server) service, the status switches back to "Stopped" after a few seconds.

sfcbd-watchdog (CIM Server) service stopped

The reason for this is that the service itself is administratively disabled (and unable to be started) by default. This his now shown in the UI though and can only be enabled using the esxcli command, directly on the ESXi server.

Enabling CIM Server on the command line using esxcli

To be able to execute commands directly on the ESXi server(s), we first need to be able to connect to the ESXi server using SSH. 

Logged in on the vSphere User Interface (using the browser and the IP address of the ESXi server), click on "Manage" (under the Host entry) in the left-side navigation. On the right side, click on the tab "Services". Scroll down the list of services until you find the "TSM-SSH" service - which is by default stopped.

TSM-SSH service in ESXi 8 is stopped by default

Select the TSM-SSH service and click on Start above. 

Now use your terminal (if you're on Linux or macOS) or a SSH client, such as PuTTY (if you're on Windows) to connect to the IP of the ESXi server. Use the "root" user with the known password (same as you've used to log in to the UI).

ck@desktop ~ $ ssh 192.168.15.115 -l root
The authenticity of host '192.168.15.115 (192.168.15.115)' can't be established.
ECDSA key fingerprint is SHA256:FVX5WJiyiTMzXO+2irzSxItA23n9f65jKnZW66V5L9M.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.15.115' (ECDSA) to the list of known hosts.
Password:
The time and date of this login have been sent to the system logs.

WARNING:
   All commands run on the ESXi shell are logged and may be included in
   support bundles. Do not provide passwords directly on the command line.
   Most tools can prompt for secrets or accept them from standard input.

VMware offers supported, powerful system administration tools.  Please
see www.vmware.com/go/sysadmintools for details.

The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.
[root@localhost:~] 

A manual start of the sfcbd-watchdog service confirms the same behaviour as in the UI:

[root@localhost:~] /etc/init.d/sfcbd-watchdog start
sfcbd-init[134838]: args ('start')
sfcbd-init[134838]: Getting Exclusive access, please wait...
sfcbd-init[134838]: Exclusive access granted.
sfcbd-init[134838]: Request to start sfcbd-watchdog, pid 134838
sfcbd-init[134838]: sfcbd not started, administratively disabled.

To definitely enable this service, we first need to enable the "wbem" service using esxcli:

[root@localhost:~] esxcli system wbem set -e true

To verify the current settings of that service we can show the details:

[root@localhost:~] esxcli system wbem get
   Enabled: true
   WS-Management Service: true
   Enable HTTPS: true
   Authorization Model: password
   Port: 5989
   HTTP Procs: 2
   HTTPS Procs: 4
   Provider Procs: 16
   Keepalive Timeout: 1
   Keepalive Max Requests: 10
   Provider Sample Interval: 30
   Provider Timeout Interval: 120
   HTTP Max Content Length: 1048576
   Max Message Length: 40000000
   Thread Stack Size: 1048576
   Provider Resource Pool Override:
   SSL Cipher List: ECDHE+AESGCM:ECDHE+AES
   Threadpool Size: 5
   Readonly: false
   Log Level: warning
   Service Location Protocol PID: 0
   WS-Management PID: 134939
   CIM Object Manager PID: 134967
   Enabled SSL Protocols:
   Enabled System SSL Protocols: tlsv1.2
   Enabled Running SSL Protocols: tlsv1.2

Enabled is now set to true.

Communication with CIM Server

Enabling the "wbem" service should also have auto-started the sfcbd-watchdog service:

[root@localhost:~] /etc/init.d/sfcbd-watchdog status
sfcbd-init[134989]: args ('status')
sfcbd-init[134989]: Getting Exclusive access, please wait...
sfcbd-init[134989]: Exclusive access granted.
sfcbd is running

If the service was not started, you can now either start the service in the vSphere UI or on the command line:

[root@localhost:~] /etc/init.d/sfcbd-watchdog start

CIM Service is started on ESXi 8

You should now be able to communicate with the CIM server using tcp/5989:

ck@desktop ~ $ telnet 192.168.15.115 5989
Trying 192.168.15.115...
Connected to 192.168.15.115.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

This now also allows the check_esxi_hardware monitoring plugin to read the hardware status from the ESXi server.

For security reasons, don't forget to disable SSH service once the CIM Server was enabled.


扫描二维码推送至手机访问。

版权声明:本文由信安苑发布,如需转载请注明出处。

本文链接:http://www.cmznet.cn/?id=34

标签: exsicimssh
分享给朋友:

“如何在 ESXI 8中开启CIM(存储监控)服务” 的相关文章

Oracle数据库的导出expdp与导入impdp命令的使用与说明

Oracle数据库的导出expdp与导入impdp命令的使用与说明

一、注意事项:EXP和IMP是客户端工具程序,它们既可以在客户端使用,也可以在服务端使用。EXPDP和IMPDP是服务端的工具程序,他们只能在ORACLE服务端使用,不能在客户端使用。IMP只适用于EXP导出的文件,不适用于EXPDP导出文件;IMPDP只适用于EXPDP导出的文件,而不适用于EXP...

Linux磁盘查看的命令lsblk/df/du不同特点及用法

Linux磁盘查看的命令lsblk/df/du不同特点及用法

一、lsblk1.功能:列出系统上的所有的磁盘列表2.命令格式lablk  [选项]  [设备文件名]3.选项-d:仅列出磁盘本身,并不会列出该磁盘的分区信息-f:同时列出该磁盘内的文件系统名称-i:使用ASCII的字符输出,不要使用使用复杂的编码(在某些环境...

Linux最常用的27个命令

Linux最常用的27个命令

1.查找文件find / -name filename.txt根据名称查找/目录下的filename.txt文件。2.查看一个程序是否运行ps –ef|grep tomcat查看所有有关tomcat的进程3.终止线程kill -9 ...

企业内的最实用的工作方法

企业内的最实用的工作方法

在职场中,判断一个人工作能力的强弱,可以从六个方面来看:1)接到任务:绝不盲目接受工作2)遇到困难:自带方案请示工作3)工作动力:自我驱动,主动干活4)工作过程:擅用工具,事半功倍5)时间分配:聪明的时间管理大师6)向上关系:擅长经营领导(1)接到任务:绝不盲目接受工作职场是一个注重效率至上的地方。...

Oracle数据库的开启、关闭以及状态说明

Oracle数据库的开启、关闭以及状态说明

概述只有具备sysdba和sysoper系统特权的用户才能启动和关闭数据库。在启动数据库之前应该启动监听程序,否则就不能利用命令方式来管理数据库,包括启动和关闭数据库。虽然数据库正常运行,但如果没有启动监听程序,客户端就不能连接到数据库。在oracle用户下: 启动监听程序: lsnrctl sta...

windows下在没有FTP的情况如何拉取Linux服务器的文件

windows下在没有FTP的情况如何拉取Linux服务器的文件

前提条件:1、windows系统安装putty2、linux系统开通了SFTP协议从windows系统拉取linux系统的备份数据。打开 CMD 命令符,在命令行里输入:c:\putty\pscp -sftp -v -r -P 端口 远程服务器用户@远程服务器地址:文件路径(绝对路径) 本地保存路径...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。