安装完 VMware vCenter 服务器后,系统会自带一张签名证书。本文介绍了如何将 vCenter 服务器的自带证书替换为阿里云颁发的 SSL 证书。
如果您的 vCenter 服务器是使用 IP 地址进行部署的,需要先更改服务器的 FQDN。如果直接使用 IP 地址,在导入证书时将会导致以下报错。(参考链接:https://blogs.vmware.com/vsphere/2019/08/changing-your-vcenter-servers-fqdn.html)
获取 tls 时出错:Exception found (Invalid input certificate : The Subject of the provided certificate does not contain the correct CN value)
本文的测试环境为「vSphere Client 7.0」。
目录
更改 vCenter 服务器的 FQDN
1、登录 vCenter 控制台,选择「菜单」>「系统管理」>「部署」>「系统配置」,找到要配置的 vCenter 节点,点击设备管理旁边的「登录」按钮。

2、使用 root 管理员账户登录 VCSA。

3、选择「网络」>「网络设置」,点击右侧的「编辑」选项。

4、选择「NIC 0」网络适配器,点击「下一步」。

5、展开「主机名和 DNS」,修改主机名和 DNS 服务器地址。

6、验证 SSO 管理员密码。

7、勾选「我确认,我已在继续配置网络之前备份了 vCenter Server 并取消注册了扩展」,点击「完成」。

8、耐心等待服务重启。

准备签名证书
1、vCenter 服务器需要三张证书,分别是证书文件、证书链文件(这两个文件为 *.crt 扩展名)以及密钥文件(为 *.key 扩展名)。
注意:vCenter 服务器不支持上传通配符 SSL 证书。
2、以阿里云颁发的 SSL 证书为例,下载 Apache 类型的证书文件,解压后的文件夹中有 3 个文件,证书文件名称为domain_name_public.crt,证书链文件名称为domain_name_chain.crt,证书密钥文件名称为domain_name.key。

3、接下来需要下载阿里云的 SSL 根证书文件,此处根据自己的证书品牌和类型选择下载。
下载链接: https://help.aliyun.com/document_detail/179033.htm
4、用记事本打开下载好的根证书文件,将文本内容复制粘贴到 domain_name_chain.crt 证书链文件的第一行,保存退出。

替换服务器证书
1、登录 vCenter 控制台,进入「系统管理」>「证书」>「证书管理」,找到「计算机 SSL 证书」,选择「操作」>「导入并替换证书」。

2、选择「替换为外部 CA 证书(需要私钥)」。

3、上传证书文件,「计算机 SSL 证书」对应证书文件,「受信任的根证书链」对应证书链文件,「私钥」对应密钥文件。

4、完成后服务器将会自动重启。

VMware vCenter 服务器更换自定义 SSL 证书
https://blog.kobin.cn/blog/program/p1/2476.html
评论列表(2条)
所有步骤按着走 最后还是报你开始说的错
[CERTIFICATE] Replace cert Failed: å ¬ç¨å称 (CN) å段å å«éé 符ãvCenter Server è¯ä¹¦ç CN å段ä¸æ¯æéé 符ã
这是个什么玩意哦,证书和私钥都是对的,最后一步直接报错了