I love my custom host server icon. I dabbled around, and did it incorrectly a few times (take backups!) before I got the recipe right.
I mean look at this thing.
Nobody’s server looks like this crusty old box. Its literally, the worst.
Much better. Customized to what I’m running. Feels like home.
Normal yada yada Dislaimer: Obviously, this isn’t supported by VMware (sadly). Doing this incorrectly WILL result in a blank screen when you click on hosts. Take the backups as described.
- First of all, lets find this image on the VCSA.
- Right click on it, and copy the image address.
- Open up WinSCP, and log into your VCSA.
- Search the “usr” folder for “*host-ui*” (since we saw that was part of the folder path for this image). The asterisks are important, cause we have no idea what the file name is yet.
- A match! Right click and choose “Focus” to go to the folder.
- Make a backup by right-clicking and choosing Duplicate.
Step 1 – We’re going to work out of a temp folder named ‘h5-host-ui’ in /root. Log into VCSA via SSH (I use Putty) and run this command:
mkdir /root/h5-host-ui cp /usr/lib/vmware-vsphere-ui/plugin-packages/vsphere-client/plugins/h5-host-ui.war /root/h5-host-ui
Step 2 – Now lets warp into the folder, unzip the war file, and ditch the .war file itself:
cd /root/h5-host-ui unzip h5-host-ui.war rm h5-host-ui.war
Step 3 – Back in WinSCP, navigate to /root/h5-host-ui/ , dig around until you find that obj-host.png file. Replace it!
My replacement image was 96×124 to match the original. Not sure if this is required or not. Image kilobyte size doesn’t seem to matter; Mine went from 5kb to 21kb.
Step 4 – Now its time for the most important step, re-zipping. YOU MUST DO THESE STEPS IN AN SSH SESSION. YOU CANNOT DOWNLOAD THESE WAR FILES AND EDIT THEM AND RE-ZIP THEM, IT WILL BRICK THE WAR FILE.
The code below does the following: Hop into the h5-host-ui folder which is where you unzipped everything previously, then, zip up and create a new h5-host-ui.war file, which includes the following files and folders. Take special note of the resources######## folder, yours may differ from mine at a later build of VCSA.
cd /root/h5-host-ui zip -r /root/h5-host-ui.war plugin.xml META-INF resources15863815 WEB-INF locales
You did it. You now have a beautiful h5-host-ui.war file that includes your custom .png file for the server object icon!
Step 5 – Paste your new .war file back on top of where you got it from (remember, take a backup of the original, you can’t get that back without rebuilding VCSA from scratch). (You can also just right-click and copy this to the correct location, but you’re in SSH anyway so…)
cp /root/h5-host-ui.war /usr/lib/vmware-vsphere-ui/plugin-packages/vsphere-client/plugins/h5-host-ui.war
Reboot VCSA to take affect.
Also, CTRL + F5 to hard-refresh the elements on your screen after you’ve logged back into VCSA in a browser (I was so sad it didn’t work at first, but it actually did).