Vcert Vmware

9 views
Skip to first unread message

Eunice Beady

unread,
Jul 25, 2024, 5:54:42 AM7/25/24
to ocickauris

The first thing I checked was that the time was set correctly. If the time is incorrect, it can cause several issues. Since we were able to log into vCenter Server Appliance Management Interface (VAMI), I was able to check that the NTP source was set up and that there were no issues. This can also be done in vCenter BASH Shell via SSH by using the commands ntp.get to check the configured NTP, and the command date.I also checked if the STS certificate had expired

I then checked if there was enough disk space with df -h.After confirming that the services were still getting stuck on 85% after a reboot of the vCenter, I checked the certificate manager log, which you can find here: /var/log/vmware/vmcad/certificate-manager.log.In the log, I could see that there were inconsistencies in how the Fully Qualified Domain Name (FQDN) of the vCenter was written, and there were errors pointing to problems with the Subject Alternate Name (SAN).

vcert vmware


Downloadhttps://shurll.com/2zNOYD



After all of this, I was confident that I had found the error, but it was still stuck on 85% after resetting the certificates. I then tried resetting the Security Token Service (STS) certificate and replacing all the certificates through certificate-manager, but no luck.

In conclusion, there was a lot to learn from this issue. Firstly, what might seem like red herrings, may very well be underlying problems that also needs to be solved. In the end, the final issue was fixed by VMware Support, but without all the troubleshooting steps performed before they were brought on board, the fix might not have been so straight forward.

this is really a great idea! I hope that this project will be integrated into vSphere sooner than later! Especially changing SSL certs for vCenter is really time consuming and painful as you have to copy the certs to five different directories, run some CLI commands, etc. btw: is it planned that SAN's (Subject Alternate Names) are also supported by vCert Manager (used by SRM)?

Yes SAN's are supported and the intelligence is built into vCert Manager for the CSR's to request them. Some Pre req's exist on the CA's however that'll be in the docs. Cert Templates need to support them properly. For SRM the SAN will be FQDN, ShortName and IP. Common Name will be user defined.

I can't wait for this tool! SSL configuration with VMware products is extremely, extremely, highly frustrating! It's even worse in vSphere 5.1. The tool will negate the need for some of my blog posts, but I'll gladly trade that for not pulling out my hair when trying to properly configure certificates.

The tool should also manage the SSL certificates needed for the SSO Service installer to establish a SSL connection to the back-end MS SQL server. The process of configuring the JDBC URL and keystore for trusted SSL is very tedious and not documented anywhere in VMware docs that I know of. I had to figure it out for myself.

Great idea. I am in the process of creating a plan to update 200+ host with signed certifictes. This willy time consuming. This may adjust some of the design times. Hopefully this is out sooner than later. Good work.

This is going to be one of the best solution. I don't know why vmware didn't include such kind of certificate management as default when they introduced SSO, Inventory, vCenter, Web Client in 5.1. Its really painful to manage certificates. Hope to see this tool in market soon.

This would be perfect! We just implemented a new vSphere 5.1 environment with Heartbeat and to properly replace the certificates takes hours. I hope this is available in the next 2 years before these certificates expire.

Thanks, I'll take a look for it. I was disappointed to find that after spending a few hours updating the environment with CA SSL certificates, the Heartbeat install on my vCenter Server reverted to a self-signed certificate.

Hi Andrew, Heartbeat itself doesn't use the same certificate as vCenter. So there is a separate process to change out the HeartBeat certificates. I have an article on this site with guidance around that. SSL Certificate Management is quite difficult, thats why I helped VSS Labs with technical advice to create vCert Manager. It's really the only tool that provides complete lifecycle management of SSL Certificates for vSphere environments. The GA 1.0 version allows for management of ESX/ESXi Hosts and vCenter Certificates. It doesn't manage any of the other certificates. I understand that future versions will manage other types of certificates based on customer demand and feedback. They tried to take away the vast majority of the pain which was around vCenter, SSO, and Host Certificates. Check it out and have a look at getting an evaluation version.

Hi Michael,
I want to change the bits from 2048 to 4096 but I wonder why I cannot edit the generate-certificate script because it's readonly, eventhough I have used x! to save it.
I found the workarond by copying it first to /tmp, edit, and copy back to /sbin. But I'm just curious why cannot edit in /sbin.

I recently had a customer inquiry where they were interested in automating the certificate replacement for vCenter Solution Users when using the /usr/lib/vmware-vmca/bin/certificate-manager CLI, which is found within the vCenter Server Appliance (VCSA).


Note: One important thing to understand is that with vSphere 7.0, the vCenter Solution User certificates have been deprecated and the ability to replace the internal certificates will be removed in a future release as mentioned in the referenced vSphere blog post.

VMware does not recommend replacing the internal vCenter Solution User certificates, but for users who may have an organization requirement to do so, the operation is performed interactively using the certificate-manager CLI as mentioned earlier.

While the certificate-manager CLI does not offer a non-interactive mode, it actually is a simplified wrapper on top of a number of certificate related utilities. In fact, all verbose commands that it used to perform a given certificate workflow is all logged in /var/log/vmware/vmcad/certificate-manager.log and you can view all the commands and their arguments by looking at the "Running command" entries.


While this would allow a user to automate a given certificate-manager workflow, it is certainly not trivial and does require testing and validation before you might consider rolling this out within your environment. This is why I would recommend Option 2, if it is applicable.

Alternatively, you can use this simple Python script provided in VMware KB 90561, which can be used to replace the vCenter Solution User certificates and best of all, it can be automated. Now, if you need to use your own custom signed certificates for the vCenter Solution User certificates, then you will need to go with Option 1 as Option 2 only supports the deefault VMware Certificate Authority (VMCA) self-signed certificates.


One thing you will notice is that there is no output from the script while it is running, everything that is going on is logged in fixcerts.log, which is stored in the working directory and you may want to open up a second SSH session to the VCSA and tail the log file for progress.

At the end of the day, if you need to replace the vCenter Solution User certificates, both option provides the same outcome and just depends if you are using the default VMCA managed certificates or if you are using your own custom ones.

No doubt I prefer to send vCert tool to customers over using the built in tool. I wish we could make that public. I really like the report it generates and saves so much time in troubleshooting a cert issue.

William is Senior Staff Solution Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. He focuses on Cloud Native, Automation, Integration and Operation for both VMware vSphere Foundation (VVF) & VMware Cloud Foundation (VCF) across Private, Hybrid and Public Cloud

Next, I tried to manually start the services, employing both the vSphere Appliance Management Interface (VAMI) and Secure Shell (SSH) as possible avenues for resolution. Much to my chagrin, these attempts were also met with failure, as I received errors on both fronts.

Upon inspection, the SSL certificate showed an expiration date of 9th September, which was perplexing, given that we were still within its validity period. This indicated that the problem was not as straightforward as an expired certificate. However, considering the intricate web of certificate dependencies in a vCenter environment, it was plausible that another certificate in the chain might be causing the issue.

This was the time for some heavy artillery. Enter vCert, a powerful script written by VMware. vCert is designed to check all the certificates in the system, making it an invaluable tool in situations like these. The beauty of vCert lies in its simplicity and ease of use, combined with the ability to provide a comprehensive overview of the certificate landscape within your vCenter Server.

I often prefer using vCert for SSL certificate refresh tasks, as it offers a more streamlined and interactive process compared to the built-in certificate manager tool provided by VMware (/usr/lib/vmware-vmca/bin/certificate-manager).

Armed with vCert, I was ready to dive deep into the underbelly of the SSL certificate system to identify the rogue certificate causing the HTTP 500 error. Follow along as we delve further into the troubleshooting process, demonstrating the power of vCert, and how it helped in identifying and resolving this tricky issue.

As the script worked its magic, I observed the output keenly, scanning for any anomalies that could provide a clue to our HTTP Status 500 error. And there it was, the vital piece of information that would turn the tide in our favor: an expired Secure Token Service (STS) certificate.

Having identified the expired STS certificate as the root cause of the HTTP Status 500 error, it was time to fix the issue and bring vCenter back to life. Thankfully, the vCert script made this task a breeze. I selected option 11 in the script, which is specifically designed to handle STS signing certificates.

4a15465005
Reply all
Reply to author
Forward
0 new messages