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 Light on the VC Server. ** Moderator note: Win32 OpenSSL Light can be downloaded from the kind folks at **
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. ** Moderator note: Your Name/Common Name is the FQDN of your VC Server ie. servername.domain.com **
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
Be sure that the Certificate Template is set to Web Server. There is no need to enter anything into the Additional Attributes field.
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.
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 ** Moderator note: Save file name as rui.crt **
During this process, you may receive an email with certificate information in it. You may safely delete the email.
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.crt, rui.key, and rui.pfx to
c:\docs and settings\all users\app data\vmware\ VMware VirtualCenter\SSL
6. Disconnect all ESX hosts managed by VirtualCenter ** Moderator note: (original step: 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.)
7. ** Moderator note: Added step 7: Stop the VMware VirtualCenter Server service **
7.5
- From CMD, navigate to the C:\Program files\VMware\Infrastructure\VirtualCenter Server\* directory, and issue the following command:
Vpxd -p (it re-encrypts the DB password). When prompted. type the pw used for the VC database.
8. Start the VMware VirtualCenter Server service ** Moderator note: Starting the VC Service should be sufficient. (oringal step: Restart the VC server.)
9. ** Moderator note: This step not necessary ** (original step: Restart all ESX hosts.)
10. Reconnect all ESX hosts, ** Moderator note: VMs should already be powered on ** (original step: and power on the VMs.)
11. IMPORTANT: connect to the VC Infrastructure by using the Virtual Center FQDN.
Now, 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?
Message was edited by: jasonboche
Added/changed some steps as noted.