U
U
Ulrich2016-12-28 17:06:58
virtual box
Ulrich, 2016-12-28 17:06:58

Do I need to do trim on virtual machines?

Hello!
I have several virtual machines on SSD. The hypervisor runs trim once a day. Do I need to run trim on virtual machines too?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
15432, 2016-12-28
@ulrich-schnauss

No, TRIM is an ATA command to the physical media itself. Virtual machines have a virtual disk as a data device, which will either ignore the TRIM command or forward it to a physical disk, but it is already periodically trimmed by the hypervisor.
Clarification according to Artem's answer:
This is true only if the hypervisor has complete information about free blocks on the disk. If the hypervisor only sees a fixed-size set of images, which may include "voids" of virtual free space, it will not be affected by the trim.
But if the disk image occupies only the amount corresponding to the actual space occupied, everything is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question