Sunday, February 19, 2023

Enabling TRIM in Virtualbox VM

I'm back to using Linux as a desktop for the umpteen time since the days of RedHat 5.2. This time it looks like I might just stick to it since it finally feels "right" as a desktop (most importantly my Windows games and apps runs under Wine).  

This time Linux feels right as a desktop.

One of the first things after moving is to install Virtual machine manager for development.  In goes Virtualbox, and then tried to "fstrim -v /" and got "discard not supported".

Turns out that discard has to be explicitly turned on using "VBoxManage storageattach <VM name> --storagectl "SATA" --port 0 --device 0 --nonrotational on --discard on"