Today i was trying to delete a tenant in vRA 7 and it was not working. Error was "System Exception"
Solution:-
It is documented in this KB
This is known Issue and currently there is no solution. Only workaround is available to handle this issue.
Solution:-
It is documented in this KB
This is known Issue and currently there is no solution. Only workaround is available to handle this issue.
- Take a snapshot or backup of your vRA appliance(s).
- Copy this script into a file and save it as recover-tenant.sh on your vRA appliance in the /tmp directory.
#!/bin/bash
export PYTHONIOENCODING=utf8
administrator_password=${1?"Usage: $0 <SSO ADMINISTRATOR PASSWORD> <TENANT ID> [HOST]"}
tenant_id=${2?"Usage: $0 <SSO ADMINISTRATOR PASSWORD> <TENANT ID> [HOST]"}
host="${3:-localhost}"
token=$(curl -v -s -S -k -X POST -H "Accept: application/json" -H "Content-type: application/json" -d '{"username":"administrator","password":"'"$administrator_password"'","tenant":"vsphere.local"}' https://$host/identity/api/tokens/ | \
python -c "import sys, json; print json.load(sys.stdin)['id']")
tenant=$(curl -v -s -S -k -H "Accept: application/json" -H "Content-type: application/json" -H "Authorization: Bearer $token" https://$host/identity/api/tenants/$tenant_id )
tenant=$(curl -v -s -S -k -H "Accept: application/json" -H "Content-type: application/json" -H "Authorization: Bearer $token" -X PUT -d "$tenant" https://$host/identity/api/tenants/$tenant_id )
echo $tenant - Grant execution permissions to the file by running the command:
chmod +x /tmp/recover-tenant.sh - Execute the file by running the command:
/tmp/recover-tenant.sh <SSO ADMINISTRATOR PASSWORD>
Note: Replace <SSO ADMINISTRATOR PASSWORD> with your administrator@vsphere.local password. - Capture the output of the script's execution, this may be needed in case of failure or if the issue is not resolved.
- Attempt to remove the tenant from the vRA UI again.
No comments:
Post a Comment