VMware {code} Community
Denver14
Contributor
Contributor

How to retrieve virtual disk partition information?

I am completely new to hypervisors and especially to theirs APIs. Thus my question might look profane. In this case I kindly ask to answer what resources shall I read or shortly describe basic ways to achieve the goal (described below).

I am using Workstation 12.0 with Windows 7 installed on it. It has next partitions: 2 disks C:\ and D:\. Both are 60GB with, lets say, 50GB and 40GB of free space correspondingly.

Mission: retrieve information about virtual disk partitions (amount of disks, total size, free space, type) from host using VMWare API.

So far I've tried VIX API, including vixDiskLib.dll and vixMntapi.dll. None of the functions provided by these libraries seem to return required information.

The only decision I came to is using RunProgramInGuest() function, which will run some custom service or application, which somehow (depends on implementation) will be sending required information to the host. I find this approach quite cumbersome and far from optimal.

I feel like I am missing something extremely simple. Any help will be greatly appreciated.

Reply
0 Kudos
1 Reply
Denver14
Contributor
Contributor

EDIT: I need to retrieve this info while VM is running. So, mounting virtual disk on the host OS is not an option.

Reply
0 Kudos