I regenerated the SSL Certs for an instance of VirtualCenter using MS Enterprise CA. Now all clients from where VC client is launched trrust VC, everybody's happy. The question for the forum is: if I regenerate the certificate on every single ESX host, using the same Microsoft CA, the host is not happy, gets disconnected and when trying to reconnect I receive the error: bad username or password. Has anybody implemented a comprehensive certificate strategy where both VC and the single hosts use certificates issued by the same CA?
I tried to put together a step-by-step process on regenerating the VirtualCenter certificate. It applies to an environment with a Microsoft CA, but it can be adapted to any root CA. Please let me know of any errors.
1. Install openSSL on the VC Server.
2. Generate an RSA private key and a certificate-signing request
BACK UP THE EXISTING RUI.CRT, RUI.KEY and RUI.PFX TO A SECURE LOCATION.
They are located in c:\docs and settings\all users\app data\vmware VMware VirtualCenter\SSL
From the VC Server, navigate at the command prompt to the openSSL\bin directory
Issue the following commands:
openssl genrsa 1024 > rui.key
openssl req -new -key rui.key > rui.csr
Fill in the appropriate information.
3. Request a Certificate
Go to your CA webpage.
Click on Request a Certificate
Open the file that you saved above with notepad and copy all of the the contents including the "---BEGIN CERTIFICATE REQUEST-" and "-END CERTIFICATE REQUEST---" lines
Click on Submit a certificate request by using a base-64-encoded CMC or PKCS #10 file, or submit a renewal request by using a base-64-encoded PKCS #7 file.
Be sure that the Certificate Template is set to Web Server. There is no need to enter anything into the Additional Attributes field.
You will receive an email with certificate information in it that you can delete.
Paste the notepad contents of the certificate request file from above into the Saved Request field and click on the Submit button.
Select Base 64 Encoded and click Download Certificate and save the certificate to C:\...\openSSL\bin
4. Create a .pfx (personal individual exchange) file for rui.crt
At the Command Prompt on the VC server navigate to C:\...\openSSL\bin and issue:
openssl pkcs12 -export -in rui.crt -inkey rui.key -name VirtualCenterServerFQDN -out rui.pfx
5. Move rui.key, rui.crt and rui.pfx to
c:\docs and settings\all users\app data\vmware VMware VirtualCenter\SSL
6. Power off all VMs on the hosts in the VC. This needs to be done because after the VC loads the new certs it
will not be possible to gracefully shutdown the VMs from the VC Client, though it can still be done through RDP or Service Console.
8. Restart the VC server. From CMD, navigate to
C:\Program files\VMware\ Infrastructure\ VirtualCenter Server and issue:
Vpxd -p (it re-encrypts the DB password). When prompted. type the pw used for the VC database.
9. Restart all ESX hosts.
10. Reconnect all ESX hosts, and power on the VMs.
11. IMPORTANT: connect to the VC Infrastructure by using the Virtual Center FQDN.