当前位置: 首页 >> 原创·技术 >> 如何替换vCenter和ESXi证书 >> 正文

如何替换vCenter和ESXi证书

6年前 (2018-09-07)     作者:iMoke     分类:原创·技术     阅读次数:5510     评论(0)    
一、替换ESXi证书开启服务器的SSH服务。证书文件在/etc/vmware/ssl,文件名为rui.crt和rui.key。替换这两个文件重启服务器。参考连接:http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.security.doc_50%2FGUID-A261E6D8-03E4-48ED-ADB6-473C2DAAB7AD.html 二、替换vCenter证书、   

一、替换ESXi证书

  1. 开启服务器的SSH服务。

  2. 证书文件在/etc/vmware/ssl,文件名为rui.crt和rui.key。

  3. 替换这两个文件

  4. 重启服务器。


参考连接:http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.security.doc_50%2FGUID-A261E6D8-03E4-48ED-ADB6-473C2DAAB7AD.html


二、替换vCenter证书、

    1.创建或购买5个证书:machine/vsphere-webclient/vpxd/vpxd-extension/根证书,不能使用同一个。

    2.连接到vCenter服务器(Windows)

    3.开始,运行,cmd,回车

    4."C:\Program Files\VMware\vCenter Server\vmcad\certificate-manager"(注意加引号)

    5.

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|                                                                     |
|      *** Welcome to the vSphere 6.0 Certificate Manager  ***        |
|                                                                     |
|                   -- Select Operation --                            |
|                                                                     |
|      1. Replace Machine SSL certificate with Custom Certificate     |
|                                                                     |
|      2. Replace VMCA Root certificate with Custom Signing           |
|         Certificate and replace all Certificates                    |
|                                                                     |
|      3. Replace Machine SSL certificate with VMCA Certificate       |
|                                                                     |
|      4. Regenerate a new VMCA Root Certificate and                  |
|         replace all certificates                                    |
|                                                                     |
|      5. Replace Solution user certificates with                     |
|         Custom Certificate                                          |
|                                                                     |
|      6. Replace Solution user certificates with VMCA certificates   |
|                                                                     |
|      7. Revert last performed operation by re-publishing old        |
|         certificates                                                |
|                                                                     |
|      8. Reset all Certificates                                      |
|                                                                     |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
Note : Use Ctrl-Z and hit Enter to exit.
Option[1 to 8]: 5

Please provide valid SSO and VC priviledged user credential to perform certificate operations.
Enter username [Administrator@vsphere.local]:administrator@in.reachauto.com
Enter password:
         1. Generate Certificate Signing Request(s) and Key(s) for Solution User Certificates

         2. Import custom certificate(s) and key(s) to replace existing Solution User Certificates

Option [1 or 2]: 2

Please provide valid custom certificate for solution user store : machine
File : U:\vcmachine.in.reachauto.com.crt

Please provide valid custom key for solution user store : machine
File : U:\vcmachine.in.reachauto.com.key

Please provide valid custom certificate for solution user store : vsphere-webcli
ent
File : U:\vc.in.reachauto.com.crt

Please provide valid custom key for solution user store : vsphere-webclient
File : U:\vc.in.reachauto.com.key

Please provide valid custom certificate for solution user store : vpxd
File : U:\vcvpxd.in.reachauto.com.crt

Please provide valid custom key for solution user store : vpxd
File : U:\vcvpxd.in.reachauto.com.key

Please provide valid custom certificate for solution user store : vpxd-extension

File : U:\vcvpxd-extension.in.reachauto.com.crt

Please provide valid custom key for solution user store : vpxd-extension
File : U:\vcvpxd-extension.in.reachauto.com.key

Please provide the signing certificate of the Solution User Certificates
File : U:\iMoke_Root_CA.crt
Command Output: U:\vcmachine.in.reachauto.com.crt: OK

Command Output: U:\vc.in.reachauto.com.crt: OK

Command Output: U:\vcvpxd.in.reachauto.com.crt: OK

Command Output: U:\vcvpxd-extension.in.reachauto.com.crt: OK


You are going to replace all Solution User Certificates using custom cert
Continue operation : Option[Y/N] ? : y
Status : 70% Completed [stopping services...]
Status : 85% Completed [starting services...]
Status : 100% Completed [All tasks completed successfully]

    6.等待大约5分钟,等他自己停止服务,再启动服务。


    7.进入目录

cd "C:\Program Files\VMware\vCenter Server\bin"

    8.重启服务

service-control --stop EsxAgentManager
service-control --start EsxAgentManager
C:\Program Files\VMware\vCenter Server\bin>service-control --stop EsxAgentManager
INFO:root:Service: EsxAgentManager, Action: stop
Service: EsxAgentManager, Action: stop
2018-09-07T02:46:35.548Z   State for service EsxAgentManager: RUNNING
2018-09-07T02:46:35.550Z   State for service EsxAgentManager: RUNNING
2018-09-07T02:46:45.550Z   State for service EsxAgentManager: STOPPED
2018-09-07T02:46:45.550Z   Successfully stopped service EsxAgentManager

C:\Program Files\VMware\vCenter Server\bin>service-control --start EsxAgentManager
INFO:root:Service: EsxAgentManager, Action: start
Service: EsxAgentManager, Action: start
2018-09-07T02:47:03.186Z   State for service EsxAgentManager: STOPPED
2018-09-07T02:47:13.292Z   Successfully started service EsxAgentManager

C:\Program Files\VMware\vCenter Server\bin>


参考资料:http://blog.51cto.com/yueque/1841800(从第10步开始)

参考资料:https://kb.vmware.com/s/article/2097936?lang=zh_CN


除非注明,发表在“傲孤漠客”的文章『如何替换vCenter和ESXi证书』版权归iMoke所有。 转载请注明出处为“本文转载于『傲孤漠客』原地址https://www.imoke.org/post/20180907617.html

评论

发表评论   

昵称*

E-mail*(建议输入,以便收到博主回复的提示邮件)

网站