Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improved disk size IOCTL checks #119

Merged
merged 1 commit into from
Jul 11, 2018
Merged

Conversation

gsuberland
Copy link
Collaborator

Previously we were only checking PhysicalDrive0 with the size IOCTL check, but on some systems PhysicalDrive0 might be associated with a single disk in a software RAID volume or an appliance boot volume. Such cases would be incorrectly flagged as a VM for being under 80GB in size. This new code instead finds the OS drive letter, maps that to a set of physical disks, then sums the sizes. If anything goes wrong it falls back to the old method of just checking PhysicalDrive0.

This resolves #118.

Previously we were only checking PhysicalDrive0 with the size IOCTL check, but on some systems PhysicalDrive0 might be associated with a single disk in a software RAID volume or an appliance boot volume. Such cases would be incorrectly flagged as a VM for being under 80GB in size. This new code instead finds the OS drive letter, maps that to a set of physical disks, then sums the sizes.  If anything goes wrong it falls back to the old method of just checking PhysicalDrive0.
@gsuberland gsuberland merged commit 7c5868b into master Jul 11, 2018
@gsuberland gsuberland deleted the disksize-ioctl-improvements branch July 11, 2018 18:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve disk size IOCTL check
1 participant