Steps to upgrade manually the VCG database in vCenter Servers without internet connectivity
VMware vCenter Server 8.x
Steps to follow:
# grep 'client_' /usr/lib/vmware-updatemgr/config/vvs-config.json
client_id
and client_secret
values. These are going to be used in later stepsCLIENT_ID="<replace with values from step 2>"
CLIENT_SECRET="<replace with values from step 2>"
JSON=$(curl -d "client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&grant_type=client_credentials" -X POST
https://auth.esp.vmware.com/api/auth/v1/tokens)
TOKEN=$(echo $JSON | jq -r .access_token)
curl -L -H "X-Vmw-Esp-Client: $TOKEN" -X GET "https://vvs.esp.vmware.com/v1/compatible/vcg/bundles/all?format=gz" -o vlcm-vcg-offline.gz
$CLIENT_ID="<replace with values from step 2>"
$CLIENT_SECRET="<replace with values from step 2>"
$JSON = Invoke-WebRequest -Uri "https://auth.esp.vmware.com/api/auth/v1/tokens" -Method POST -Body "client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&grant_type=client_credentials"
$TOKEN = ($JSON.Content | ConvertFrom-Json).access_token
Invoke-WebRequest -Uri "https://vvs.esp.vmware.com/v1/compatible/vcg/bundles/all?format=gz" -Method GET -Headers @{"X-Vmw-Esp-Client"="${TOKEN}"} -OutFile vlcm-vcg-offline.gz
vlcm-vcg-offline.gz
downloaded on step 3 using an SCP client to the offline vCenter.gzip -d vlcm-vcg-offline.gz
/usr/lib/vmware-updatemgr/python/hcl/hcl_datastore.py update-offline --filePath /<path to the file>/vlcm-vcg-offline
/usr/lib/vmware-updatemgr/python/hcl/hcl_datastore.py information