Hi, i would like to know, is it safe to defrag or use the clean disk option on a ssd drive that is running in a VM.
In my vm, i got a message saying my hd needed defragment, but i am running as ssd on my host, so i guess i should ignore that defrag message.
I would ignore the messages. I'm guessing the VM doesn't have host access to the drive to know it's an SSD, hence the messages.
you would be doing a defrag on a virtual container (large file) on your SSD, the SSD wouldn't get the defrag. The virtual container (VM sees it as an HDD), can and does get fragmented As Mr.Magic has shown, do the degrag on the VM's drive from within the workstation settings. -ed- unless of course you created the VM and told it to use a physical drive, then yeah do not defrag the thing already.
If the Host drive is an SSD, you should declare the Guest being SSD, too. For example, Virtualbox has a checkmark in VM storage settings to switch the media type.
Clean disk is obviously safe, defrag is a different matter. Although is common to say never defrag an SSD, I'm not sure that the sentence should be taken to the letter. A fragmented FS is still fragmented on an SSD, the difference is that there isn't any mechanical inertia to fight so the performances wouldn't be affected that much. But a minimal overhead would be still present, and some additional in file writing could also affect some writing performances especially on older and less refined/smart flash controllers. But more than that a fragmented FS could impact negatively an eventual recovery process in case of messed FS/deleted files by mistake and so on. So my idea is that while the defrag should be avoided on weekly or monthly basis, like on platter HDDs, doing it once per year or so surely doesn't hurt, and may be also helpful. Also the average user is overconcerned about the SSD wearing. Personally I have yet to see a single broken or run out SSD and I was a very early adopter, for personal usage and ad upgrade on my client's PCs.