W10 disk detected as HDD instead of SSD


Mr.Will

Recommended Posts

Hello unraiders :)
I have a Windows 10 VM inside Unraid phisically residing in the SSD cache. The "C:" drive is a thin provisioned file (not passthrough), and G: is just the Google Drive virtual unit stored inside C:. It has all the Red Hat virtio drivers installed and so on. 

However, Windows detects the device as an HDD in task manager instead of SSD. In the defrag console it displays as "thin provisioned disk" (sorry, the picture is in spanish).

I'm guessing Windows is not taking the full advantages of an SSD, and possibly not using TRIM. Questions are:

- Is it really required to change it to SSD somehow? The underlaying OS (unraid) should treat it as an SSD anyway

- If so, how can I change it to SSD?

 

Below is the disk definition. I already tried adding "discard='unmap'" after cache (following another forum), but it still shows the same.

 

Thank you!!

 

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>

 

 

 

image.png.bda8b75bc58934b5780b8537f956be2b.png

 

image.png.851254380b515387fddf56b5a1cabbe5.png

Edited by Mr.Will
Link to comment

Try to change to this:

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='virtio' rotation_rate='1'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>

 

to force to be seen as ssd.

  • Like 1
Link to comment
4 hours ago, ghost82 said:

Try to change to this:

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='virtio' rotation_rate='1'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>

 

to force to be seen as ssd.

 

Thanks. I tried adding rotation_rate='1' as you suggest but it errors saying it only works with SATA, SCSI or IDE.

It's Virtio so I tried changing it to SCSI and the VM blue screens to death. I had to turn it back to Virtio and remove rotation_rate='1'

 

I think I may need to somehow change the driver to SCSI before changing the config of the VM. Not sure how though. Also, Virtio is supposed to be the best performant (at least that's what Unraids help says), no not sure if the change is worth it.

 

Thanks again!

 

Screenshot_20221002-194328.jpg

Link to comment

I think the important thing is to make trim to work for the virtual disk.

virtio, and in particular virtio-blk should support trim, try to add discard=unmap:

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>

Check available size of the real disk in unraid, copy a big file inside the vm on the virtual disk.

Check again available size of the real disk: should have decreased.

Delete the file you copied from inside the vm.

Check available size of the real disk: if it increases again trim is working correctly.

 

This is what JorgeB pointed in his reply.

Edited by ghost82
Link to comment
On 10/2/2022 at 11:47 PM, ghost82 said:

I think the important thing is to make trim to work for the virtual disk.

virtio, and in particular virtio-blk should support trim, try to add discard=unmap:

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>

Check available size of the real disk in unraid, copy a big file inside the vm on the virtual disk.

Check again available size of the real disk: should have decreased.

Delete the file you copied from inside the vm.

Check available size of the real disk: if it increases again trim is working correctly.

 

This is what JorgeB pointed in his reply.

Do you mean the allocated space in the VM tab of Unraid?

What I see there is quite strange. If the VM is off it says 407Gb allocated (out of 600). If the VM is on then it's 583Gb allocated. If I check on windows it's using 407Gb.

Of course, if I try to copy or remove a file to/from the VM the size doesn't increase or reduce.

 

Unmap is added of course.

Link to comment
  • 2 weeks later...
On 10/4/2022 at 8:16 PM, Mr.Will said:

Do you mean the allocated space in the VM tab of Unraid?

What I see there is quite strange. If the VM is off it says 407Gb allocated (out of 600). If the VM is on then it's 583Gb allocated. If I check on windows it's using 407Gb.

Of course, if I try to copy or remove a file to/from the VM the size doesn't increase or reduce.

 

Unmap is added of course.

Is that supposed to happen?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.