Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add storage code to create a Dev Drive #75

Merged
merged 6 commits into from
Mar 23, 2023

Conversation

bbonaby
Copy link
Contributor

@bbonaby bbonaby commented Mar 22, 2023

Summary of the pull request

This is the first of 2/3 PR's that will hook up the Dev Drive functionality in Dev home end to end. Another Bigger one for UI/secondary windows will follow.

This PR is to add the storage code needed to create a Dev Drive. There are 5 stages

  1. Creating the virtual disk (no elevation required)
  2. Attaching the virtual disk (elevation required)
  3. Initializing the virtual disk (elevation required)
  4. Creating a partition on the virtual disk (elevation required)
  5. Formatting a volume as a dev drive. (elevation required)

Currently the Setupflow doesn't have the elevation process Flor has worked on, for all the elevated parts to work in the app. So validation of the parts that need elevation was done outside of the app.

The Dev Drive manager can now get a list of existing dev drives on the users machine to display with this change.

Detailed description of the pull request / Additional comments

Note for formatting the volume, there are no publicly available AND publicly documented apis to format a volume except using the windows managment instrumentation api's (System.Management in .Net) and the windows infrastructure management apis. Both are in maintenance mode and active development on them has ceased. Due to this I tried to use wmi sparingly where it made sense and used win32 public api's for most of the work.

The flags that were placed into wmi to create a dev drive could possibly be removed depending on how the internal conversions go with servicing on the storage side. We do have a plan in case that happens, but will have more information in april and for now we believe we should be fine to proceed with wmi.

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@bbonaby bbonaby marked this pull request as ready for review March 22, 2023 19:33
@bbonaby
Copy link
Contributor Author

bbonaby commented Mar 22, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bbonaby bbonaby merged commit e1fb319 into main Mar 23, 2023
@crutkas crutkas deleted the user/bbonaby/add-dev-drive-storage-functionality branch May 18, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants