Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.