In this blog post we are exploring the use of APIs for VxRail upgrade operations. This is particularly important when managing multiple clusters or automating upgrades.

I’m using the REST client “Insomnia” in this example, it’s a lightweight client I personally like but any REST client can obviously be used. 
The actual upgrade of VxRail using API can be divided in two main sections:
  • Upgrade
    • Perform VxRail Upgrade
    • Run Compliance Report (optional)
Initially we will use GET https://vxrailmanager/rest/vxm/v1/system to retrieve the current software version. You need to use basic authentication using your vCenter SSO credentials. As you can see from the output below, the system is running at 7.0.320.
 

To execute the pre-check, we need to POST the upgrade bundle location and credentials to https://vxrailmanager/rest/vxm/v1/lcm/precheck - see below for details.


The request id returned from the previous command can be used to review the status of the pre-check by executing GET https://vxrailmanager/rest/vxm/v1/requests/idxxx.




Once the pre-check is completed successfully, we can proceed to the actual upgrade. In the same fashion as during the pre-check, we need to POST the upgrade bundle location and credentials to https://vxrailmanager/rest/vxm/v3/lcm/upgrade - see below for details.

The process will upgrade VxRail Manager first followed by vCenter Server and ESXi hosts.


The request id returned from the previous command can be used once again to review the status of the pre-check by executing GET https://vxrailmanager/rest/vxm/v1/requests/idxxx.





Once the upgrade is completed successfully, we can use GET https://vxrailmanager/rest/vxm/v1/system to retrieve the current software version. The system is now reflecting version 7.0.372.




Optionally, after the upgrade you can create a compliance report for a more in dept report on versioning of all sub-components. We use POST https://vxrailmanager/rest/vxm/v1/cvs/compliance-report followed by retrieving the request id using GET https://vxrailmanager/rest/vxm/v1/requests/idxxx – see below for further details.