Can't remove virtual disks completely

gdlr 106 Reputation points
2020-10-25T22:02:09.79+00:00

I'm creating a lot of differencing disks for my project and deleting them after some time.

I use "detach vdisk" command, they disappear from disk management but they are not completely removed...

When i use "list vdisk" command there is a huge list with all the virtual disks ever attached:
34749-b5c13e178e1511c9164ec57698195da7.png

I couldn't find a way to clear this and I have no idea if it will impact performance at some point. Does anyone know where all this info is stored and how to remove it?

Is there any way to completely remove a virtual disk so it won't show up in this list after?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,667 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,176 questions
0 comments No comments
{count} votes

Accepted answer
  1. gdlr 106 Reputation points
    2020-10-26T19:46:07.83+00:00

    I tested and restarting computer clears the list.

    1 person found this answer helpful.

7 additional answers

Sort by: Newest
  1. Dave Patrick 426.1K Reputation points MVP
    2020-10-26T11:43:25.85+00:00

    Yes, I'd definitely reboot to see if that clears up a cache.

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  2. gdlr 106 Reputation points
    2020-10-26T11:34:17.343+00:00

    Problem is I'm not using Hyper-V and I don't want to merge any disks. I just want to remove them completely.

    And I noticed same thing happens even if I don't use differencing disks.

    Maybe there is a cache for previous mounted disks or something that resets after some time . Maybe the purpose of it is to automatically assign the same drive letter when you attach the same disk again.
    I cannot restart the server right now to check if it clears after restart but i will try tomorrow maybe.

    0 comments No comments

  3. Dave Patrick 426.1K Reputation points MVP
    2020-10-26T10:35:12.09+00:00

    Maybe this one helps.
    https://norcliffe.com/2019/01/14/merging-and-deleting-a-differencing-disk-in-hyper-v/

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  4. gdlr 106 Reputation points
    2020-10-26T08:23:32.777+00:00

    But I delete the file after ... I use Remove-Item from powershell.

    The disk still remains listed there. I have almost 3000 disks now ...

    @Dave Patrick
    I can't figure out how to use Remove-VirtualDisk here. I tried following commands but they don't work. Where can I find out the name or the friendly name of the virtual disks that show up in diskpart list?

    Remove-VirtualDisk -FriendlyName "VDisk 2852"

    Remove-VirtualDisk -Name "VDisk 2852"

    Also, I have to mention that the disks are created on a virtual machine that doesn't run Hyper-V services. Can this be causing the problem?

    0 comments No comments