MSFT_VirtualDisk class enumeration will not yield attached virtual disks

Himanshu Pareek 1 Reputation point
2024-02-22T05:53:45.6733333+00:00

I have a virtual disk (VHD) and attached via disk mgmt tool. Now using WMI and windows storage management API, I used MSFT_Disk class and executed the query "select * from MSFT_Disk" and both of the disks were listed. I thought that MSFT_VirtualDisk should result in only virtualdisk attached to the system but it does not return any disk. Please help with any clue.

Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
631 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,891 Reputation points Microsoft Vendor
    2024-02-26T07:50:09.7833333+00:00

    Hi Himanshu Pareek, Thanks for your post. A MSFT_Disk object models the Windows operating system's concept of a disk device. The disk may be directly attached to the computer system, or it may be a virtual disk exposed to the system through the use of a Storage Management Provider. A MSFT_VirtualDisk class represents a subsystem storage volume. Can I know have you attached the virtual disk to the volume? Best Regards, Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments