• Renewing NSX-T Local certificates - REV

     

    How to Renew NSX-T Local Certificates

    In NSX-T, certificates are crucial for ensuring secure communication between different NSX components (e.g., NSX Manager, NSX Controllers, Edge appliances, etc.). Over time, certificates may expire and need to be renewed to maintain secure communication within the NSX-T environment. Renewing the NSX-T local certificates is an essential task to ensure continued security and proper operation of the system.

    This guide outlines the steps to renew NSX-T local certificates, focusing on the most common process for renewing the internal certificates used by NSX Manager, NSX Edge, and NSX Controllers.

    Prerequisites

    Before renewing NSX-T local certificates, ensure that you meet the following requirements:

    1. NSX-T Manager and Components: The process applies to NSX Manager, NSX Edge, and NSX Controllers.
    2. Backup: Always take a backup of your NSX-T configuration and certificates before proceeding.
    3. Access: Ensure you have administrative privileges to access the NSX Manager CLI or the NSX Manager Web UI.
    4. SSL Certificate Understanding: Familiarize yourself with self-signed certificates or CA-signed certificatesbased on your organization’s certificate management policies.

    Steps to Renew NSX-T Local Certificates

    Option 1: Using the NSX Manager Web Interface

    1. Login to NSX Manager Web Interface:

      • Access the NSX Manager web interface by navigating to the URL: https://<NSX-Manager-IP>
      • Log in using your admin credentials.
    2. Navigate to the Certificates Section:

      • From the NSX Manager Dashboard, go to System > Certificates.
      • You will see the list of certificates in use (including certificates for NSX ManagerNSX ControllersNSX Edge, etc.).
    3. Renew the Certificates:

      • To renew a certificate, select the relevant certificate from the list (typically the NSX Manager certificate or any other local certificate you need to renew).
      • Click on Renew. You will typically be presented with options to renew using either a CA-signed certificateor self-signed certificate.
        • Self-Signed Certificate: If you are renewing with a self-signed certificate, the system will generate a new certificate for you. Simply click Renew and confirm the operation.
        • CA-Signed Certificate: If you want to use a CA-signed certificate, you'll need to generate a CSR (Certificate Signing Request) and submit it to your Certificate Authority (CA) for signing. Once you receive the signed certificate, upload it into NSX-T.
    4. Apply and Reboot if Necessary:

      • After renewing or uploading the new certificate, apply the changes.
      • Some NSX components (like NSX Manager and NSX Edge) may need to be restarted for the new certificate to take effect.
      • You may also need to redeploy the NSX Edge appliances for the changes to propagate.

    Option 2: Renewing Certificates Using the NSX Manager CLI

    1. Log in to NSX Manager via SSH:

      • Log in to your NSX Manager via SSH as the admin user.
      • Use an SSH client to access the system:
        ssh admin@<NSX-Manager-IP>
    2. Check Existing Certificates:

      • You can view the current certificate details by running the following command:
        arduino
        get certificate
      • This command will list all the certificates in use, including expiry dates.
    3. Generate a New CSR (If Using a CA-Signed Certificate):

      • If you want to renew the certificate using a CA-signed certificate, you need to generate a CSR. This is typically done using the following command:
        php
        certificate csr <certificate-name>
        • Replace <certificate-name> with the specific certificate you want to renew (e.g., NSX-Manager).
        • The system will generate a CSR file and private key for submission to a Certificate Authority (CA).
    4. Upload the Signed Certificate (If Using a CA-Signed Certificate):

      • After receiving the signed certificate from the CA, you will need to upload it to NSX-T. Use the following CLI command:
        certificate import <certificate-name> <path-to-signed-cert-file>
      • Replace <certificate-name> with the specific certificate you are renewing and <path-to-signed-cert-file> with the file path to the signed certificate you received.
    5. Renew Using Self-Signed Certificate:

      • If you are using a self-signed certificate, you can directly renew it with the following command:
        certificate renew <certificate-name>
      • Replace <certificate-name> with the name of the certificate you wish to renew (e.g., NSX-ManagerNSX-Edge, etc.).
    6. Verify the New Certificate:

      • After renewal, verify that the new certificate is applied by running the command:
        get certificate
    7. Restart NSX-T Components (If Required):

      • After renewing the certificates, you may need to restart the relevant NSX components (NSX Manager, NSX Edge, NSX Controllers) for the changes to take effect:
        • To restart NSX Manager, use:
          system restart nsx-manager
        • To restart NSX Edge, use:
          system restart nsx-edge

    Option 3: Renewing Certificates Using the NSX-T API

    For more advanced automation or bulk renewal scenarios, you can use the NSX-T REST API to interact with certificates programmatically.

    1. Authenticate with the NSX Manager API:

      • Use an API client like Postman or curl to authenticate with the NSX Manager API:
        curl -u admin:<password> -k https://<NSX-Manager-IP>/api/v1
    2. Generate a CSR (Certificate Signing Request):

      • To generate a CSR, make a POST request to the /api/v1/certificates/csr endpoint.
    3. Upload the Signed Certificate:

      • Once you have the signed certificate from the CA, upload it using the /api/v1/certificates/importendpoint.
    4. Verify the Certificate Renewal:

      • You can retrieve the status of the certificate renewal using the /api/v1/certificates endpoint.

    Verifying the Renewal

    After renewing the certificates, ensure the following:

    1. Correct Certificate is Applied: Use the NSX Manager UI, CLI, or API to verify the certificate’s details and check the expiry date.
    2. Check System Health: Ensure there are no errors related to certificate validity or communication failures between NSX components.
    3. Network Traffic: Verify that secure communication (via SSL/TLS) between NSX Manager, Edge appliances, and controllers is working correctly.

    Conclusion

    Renewing NSX-T local certificates is crucial to maintaining the security and integrity of your NSX environment. Whether you’re using self-signed certificates or CA-signed certificates, the process involves generating a new certificate (either manually or automatically), uploading the signed certificate, and ensuring all NSX components (Manager, Edge, Controllers) are correctly configured. Always ensure that you take necessary backups, verify your configuration, and restart components as required after renewing certificates.

  • Renewing NSX-T Local certificates

    This article focusing on the main piont to help to renew the local NSX-T sertificates:
     
    Use REST API requests by Postman for example.
    use admin credentials to make API requests.
     
    STEP x: Generate self signed certificate:
    Make sure that when this certificate was imported, the option Service Certificate was set to No
     
    STEPx: Validate the cetrificate:
    - The basic API call for this is: GET https://<nsx-mgr>/api/v1/trust-management/certificates/<cert-id>?action=validate>
    Responce shuld be: "status": "OK"
      
    POST https://<nsx-local-mgr>/api/v1/trust-management/certificates?action=set_pi_certificate_for_federation
    {
        "cert_id": "c5f13ec0-8075-441e-80b5-aeb707f6b87e",
        "service_type": "LOCAL_MANAGER"
    }
     
     
    Main article for more information:
     
    After implementation test:
    Search the cert ID and section "used_by" should represent where the cert is in use.
  • NSX-T randomly stopped services

    If you experining the SSH unavaliability on the NSX-T, probably one of the reason is that SSH serivece not running,
    To start SSH servces on the NSX-V, you have to use vCenter to havedirect access to the NSX applience.
  • NSX-T Password expired issue

    Just recently connected to my test NSX-T environment and found that my password is espired.
    Actually it is admin credentials. See picture below:
     
    NSXT password expired
     
    Fix is eazy, just SSH to the host and update the admin passwrd.
     
    You are required to change your password immediately (password aged)
    WARNING: Your password has expired.
    You must change your password now and login again!
    Changing password for admin.
    (current) UNIX password:
    New password:
    Retype new password:
     
    After updating the password over CLI, you can successfuly login over UI.
     
    Password expiration is 90 days by default.
     
    To avoind this issue in the future we can extend expiration dates using next command:
    set user admin password-expiration 9999
     
    To check the expiration date:
    get user admin password-expiration
    Thu Nov 09 2021 UTC 00:36:18.240
    Password expires 9970 days after last change. Current password will expire in 9970 days.
  • NSX-V to NSX-T Migration: universal objects

    We are planning to process with NSX to vSphere to NSX-T migration.

  • NSX-T issue: Some appliance components are not functioning properly

    One of the NSX-T nodes reporting "Some appliance components are not functioning properly" and web page is down.
  • NSX-T node deployment stuck in "Waiting To Register Host"

    During the auto deployment installation of additional NSX node using User Interface (UI), the NSX Node displays a status of "Waiting to Register VM" indefinitely.
     
    NSX-T_node_issue_01.png
     
    Issues could be differet and must be checked case by case.
     
    Workaround is do delete the node with issues over API.
     
    First check all your deployments and grab vm_id.
     
     NSX-T_node_issue_02.png
     
    Delete the node using next command:
    https://10.3.60.179/api/v1/cluster/nodes/deployments/86f643e9-e722-451b-be68-9a9f08d0b5b7?action=delete
     
    Bonus:
    Issue with the deloyment in my case was laydown in NFS storage. Simly moving the delpoyment VM target to anither type of storage, solved issue.
     

Google AdSence

AUST IT - Computer help out of hours, when you need it most.

Find out why we do it for less.

About

AUST IT will help you resolve any technical support issues you are facing onsite or remotely via remote desktop 24/7. More...

Contacts

Reservoir, Melbourne,
3073, VIC, Australia

Phone: 0422 348 882

This email address is being protected from spambots. You need JavaScript enabled to view it.

Sydney: 0481 837 077

Connect

Join us in social networks to be in touch.

Newsletter

Complete the form below, and we'll send you our emails with all the latest AUST IT news.