When running Windows 10 (in my case, “Insider, Fast Ring”) in a VM running on the SSD of the host OS (Windows 10 Pro), does the guest OS “see” the segment of the SSD it runs on as an SSD? Or does it see it as a HDD? Can the host OS run Trim on the SSD segment? If not, should the user run Optimise in the guest OS if the VM disk is shown to be fragmented by the guest OS?
I ask this, because my Windows 10 Insider VM (running under VMWare on the same SSD as my host Windows 10 Pro OS) indicates the Guest OS to be fragmented and offers the option to “defragment” it. I clicked to see what would happen, and VMWare ran the “defrag” for about 5 minutes. This is longer than one would expect if Trim had been carried out. If Trim can not be run in this situation, is it wise to run Defrag and possibly increase wear on the SSD?
Does the Virtual Windows 10 OS “see” the SSD as an SSD and does it automatically run Trim as it would when not installed as a VM? Can it, in fact, run Trim when in a virtual setup?
(The VMWare Support/Help page states the following:
”Solid-State Drives:
If your host machine has a physical solid-state drive (SSD), the host informs guest operating systems they are running on an SSD.
This allows the guest operating systems to optimize behavior. How the virtual machines recognize SSD and use this information depends on the guest operating system and the disk type of the virtual disk (SCSI, SATA, or IDE).
On Windows 8, Ubuntu, and Red Hat Enterprise Linux virtual machines, all drive types can report their virtual disks as SSD drives.
On Windows 7 virtual machines, only IDE and SATA virtual disks can report their virtual disks as SSD. SCSI virtual disks only report as SSD when used as a system drive in a virtual machine, or as a mechanical drive when used as a data drive inside a virtual machine.
On Mac virtual machines, only SATA virtual disks are reported as SSD. IDE and SCSI virtual disks are reported as mechanical drives.
Use the virtual machine operating system to verify your virtual machine is using SSD as its virtual disk.”
So, it seems that the Guest “sees” the SSD; but the above does not say if the Guest can actually Trim its segment of the SSD. All it says is “How the virtual machines recognize SSD and use this information depends on the guest operating system and the disk type of the virtual disk (SCSI, SATA, or IDE).”
The text in Red further complicates things: How does one “verify that the VM OS is using the SSD as an SSD?
A Wiki article upsets things by stating: “The TRIM command does not work with disks which are stored in disk image files. This is caused by the fact that computer files can only be deleted completely or truncated at the end. This problem affects applications like virtual disk services, virtual machines, etc.”
It seems that “the question is not about translating a TRIM operation on the virtual disk to a TRIM operation on the host disk. It does not work so directly. The question is clearly about translating a TRIM call on the virtual disk to a shortening of the image file on the host disk (which, incidentally, can in turn trigger a TRIM operation on the host disk, but the question is about the first step)
Comments from Expert Loungers that could perhaps clarify this complex issue would be greatly appreciated.
(Sorry for the convoluted way I have expressed myself, but hopefully Loungers will understand my dilemma!!)
My Rig: AMD Ryzen 9 5900X 12-Core CPU; ASUS Cross Hair VIII Formula Mobo; Win 11 Pro (64 bit)-(UEFI-booted); 32GB RAM; 2TB Corsair Force Series MP600 Pro 2TB PCIe Gen 4.0 M.2 NVMe SSD. 1TB SAMSUNG 960 EVO M.2 NVME SSD; MSI GeForce RTX 3090 VENTUS 3X 24G OC; Microsoft 365 Home; Condusiv SSDKeeper Professional; Acronis Cyberprotect, VMWare Workstation Pro V17.5. HP 1TB USB SSD External Backup Drive). Dell G-Sync G3223Q 144Hz Monitor.