Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have VirtualBox 4.1.14 on Windows 7 as host, and Ubuntu server 11.10 as guest. System was installed at traditional HDD years ago (and upgraded later), but now it's at SSD as expanding drive. There is "AHCI" and "it's SSD" features enabled in SATA controller. Problem is, this expanding drive growth to it's almost max size (90% of it), but actually in VM only about 50% spent. Also, guest VM does not recognize /dev/sda as SSD, /sys/block/sda/queue/rotational says "1", /sys/block/sda/queue/discard_* all says "0". And, of course, I cannot run fstrim /, it says that operation not supported. Is there some trick to enable TRIM support in my guest system without reinstalling it?

share|improve this question

Enable TRIM in the host OS, not the guest. The virtual disk resides as a large file on the host file system, and disk writes in the guest get translated to disk writes on your host, where TRIM will be applied if enabled.

TRIM doesn't help you anyway for virtual disks. The purpose of TRIM is let the SSD know which sectors are unused, but every sector of the virtual disk file is considered to be still in use by the host, and it doesn't decrease in size so none of it will ever be flagged as unused by TRIM.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .