In this guide I will walk you through how to change that pesky All Services icon to one of your choice.
Pre-Reqs
- vRealize Automation 7.2 or newer installed and configured See my guide here
- A Linux system with a command line that you can run curl from to connect to the vRealize Appliance API
- An account with System Administrator (I had to use administrator@vsphere.local)
- A quiet place where you will not be interrupted see my guide here
Please NOTE: This is a system wide setting for all tenants! You have been warned!
Here is the image I will be using
First we need to convert the image we want to upload to vRA into Base64 encoded format. Go to the following site and upload your image
Copy the string to the notepad for later or just leave this browser window open. We will use this later
export VRA=vra-01a.corp.local
export ACCEPT="application/json"
Now request the Auth token with the following command
NOTE: I was only able to get this to work with the Tenant Admin account
curl --insecure -H "Accept: application/json" -H 'Content-Type: application/json' --data '{"username":"administrator@corp.local","password":"VMware1!","tenant":"vsphere.local"}' https://$VRA/identity/api/tokens
export AUTH="Bearer MTQ0OTYwMjc2MDI4NToyODlmZWM2MjZlNzNkMDAwZmRmYjp0ZW5hbnQ6dnNwaGVyZS5sb2NhbHVzZXJuYW1lOnRvbnlAY29ycC5sb2NhbGV4cGlyYXRpb246MTQ0OTYzMTU2MDAwMDo4MzE3NThmNjhjZTNjNzg5MDNiMWM3ODdlODBmMDQ3NGYzNmYwMzBkYWFjNGM4Y2I3YTk5YmY1ODBmN2E4N2IyNzM4MTRhM2M3NmQzNzM3ZTUzMmZjZDI4OGEwZTI0OTA4NTZjMDg3YTQ2NzRjMjczZTIyOTQyZGJlOWQwNDU2NQ=="
Now let’s request the new icon with the Base64 encoding string we created earlier. See below for the command and where you need to paste your code
Note: This command needs to be one long string without carriage returns or it will fail
curl https://$VRA/catalog-service/api/icons --insecure -H "Accept: application/json" -H 'Content-Type: application/json' -H "Authorization: $AUTH" --data '{"id":"cafe_default_icon_genericAllServices","fileName":"mynewicon","contentType":"image/png","image":"PasteStringHere"}'
If you want to revert back to the old icon, follow the instructions again to get logged in and get the AUTH token then run the following command
curl https://$VRA/catalog-service/api/icons/cafe_default_icon_genericAllServices --insecure -H "Authorization: $AUTH" --request DELETE
Hello,
very good work! I have tested it and it works very well!
But, you have an error in a command line, “request the new icon” the attribute name “$VCAC” is incorrect. The correct attribute would be “$VRA” !
I have also tested it with a tenant Administrator, unfortunately without success!
{“errors”:[{“code”:10112,”message”:”Authorization error.”,”systemMessage”:”System icon cafe_default_icon_genericAllServices may only be updated by a System Administrator”,”moreInfoUrl”:null}]}
Thanks a lot
by
Hi Ralf,
Thank you for the kind words and the heads up on the typo. I fixed it and updated the post with that change. I also tried as tenant admin and got the same error. Not sure why it has to be the vsphere.local user. Also check out the new icon pack if your looking for some different all services icons! https://github.com/vmtocloud/vraiconpack