How to use custom icons for virtual machines in UnRAID

·

·

UPDATE 23.08.2023: The VM icons will reset during reboot, see the end of post for a fix.

There is 24 icons you can choose between in the UnRAID GUI, but there is actually possible to add your own custom icons. Not in the GUI, but by copying them to the folder where the icons is stored. In this guide I will add a custom icon I found for my Home-Assistant VM.

custom_home-assistant.png

The first thing you have to do is to copy your icon to one of the UnRAID shares, which one is not important. It is just temporary storage. You can for example copy it to the domains folder.

After this, open up the UnRAID terminal (look for >_ in the upper right menu). Here you can verify that the file is in there.

ls /mnt/user/domains

You can also verify the destination path, where icons should be stored.

ls /usr/local/emhttp/plugins/dynamix.vm.manager/templates/images

Use the cp-command to copy the files from source (domains) to the folder where icons should be located. This path is not accessible as a share, that is the reason for temporary storage in the domains share.

cp /mnt/user/domains/custom_home-assistant.png /usr/local/emhttp/plugins/dynamix.vm.manager/templates/images/custom_home-assistant.png

Replace custom_home-assistant.png with the correct filename.

Now you can see that the cutom_home-assistant.png is stored in the destination.

Now the icons is available for selection in the VM settings, you may need to turn the VM off and on again to apply a new icon.

The result

Prevent reset on reboot

As mentioned in the top, if you reboot the server the icon will be deleted from /usr/local/emhttp/plugins/dynamix.vm.manager/templates/images.
The fix:

  • Install the add-on “User Scripts” from APPS.
  • Create a new script with “ADD NEW SCRIPT”, give it a name and paste in the following script:
#!/bin/bash
cp /mnt/user/domains/*.png /usr/local/emhttp/plugins/dynamix.vm.manager/templates/images
  • Set the schedule to “At Startup of Array”

The script will rund and copy the images in domains to the right folder every time the array starts (when UnRAID starts), and the VM icon will persist.

Share