The Linux Page

Change your VirtualBox VM Icon

Iconic Chess Pieces

Changing a Virtual Machine (VM) Icon

By default, VirtualBox assigns a default icon to your VMs. That icon appears in your bar of icons (usually on the left side of the screen) and also in the VirtualBox interface.

If you just have one or two VMs, that's certainly not a huge issue. When you have 50 to 100, it becomes tedious to know what's what since all the icons will look alike (by default, they select the icon based on the operating system defined for that VM).

The solution is to assign a new icon to your VMs.

First, make sure that your icon is a square such as 48x48, 96x96, or 128x128. I used an SVG with sizes 282x282 and it worked as well.

Then run the following command:

$ VBoxManage modifyvm "VM Name" \
        --iconfile /full/path/to/icon/Icon-96x96.png

So I know that .png and .svg images work. It is likely that most image file formats do work. If you have a .jpg, it is likely to work too.

The VirtualBox interface will update the icon immediately (the VBoxManager communicates with it, so it knows).

The Command Refused to Change the Icon

If the concerned VM is already running, it will refuse to make such changes. You'll have to shutdown the machine, then change the icon, and finally restart the machine. This is going to be necessary if you auto-start the VM on boot.

The best is to do the change right after you created the machine.

Error: VERR_FILE_NOT_FOUND

If the icon filename or path are incorrect, you get this error telling you that the file was not found.

Make sure that the icon file is accessible. You can, for example, use a command such as display to make sure:

display /full/path/to/icon/icon-96x96.png

If that fails too, then your path is invalid or you do not have access to your file.

Also that way you can verify that the file represents a square.

The Icon is not Showing in the Toolbar?

Yeah. That happens. It should show in the VirtualBox interface no problem. The toolbar will show the icon only if you are running the standard VirtualBox (the one you get with apt-get). If you want the latest version and uses the Snap version instead, then it has problems showing the icons unless you authorize it to do so. The issue is with apparmor. However, each time the Snap gets updated, you'll have to re-instate the apparmor changes.