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

Use WMI/MI to interact with Hyper-V instead of PowerShell #2958

Open
bbonaby opened this issue May 17, 2024 · 0 comments
Open

Use WMI/MI to interact with Hyper-V instead of PowerShell #2958

bbonaby opened this issue May 17, 2024 · 0 comments
Labels
Area-Environments Area-Environments-Hyper-V-Extension For issues, features requests and bugs related to the Hyper-V Extension in Dev Home Issue-Feature New feature or request Needs-Triage New issue that the core contributors need to triage Type-Performance Related to performance

Comments

@bbonaby
Copy link
Contributor

bbonaby commented May 17, 2024

Suggested new feature or improvement

Currently the Hyper-V extension uses PowerShell under the hood to interact with Hyper-V functionality. When using Hyper-V the time it takes to load the Hyper-V module on first load of environments isn't deterministic and can be affected by the users profile. In addition to this, we run into issues like: #2955 which is hard to repro and also after investigation looks to be user profile related and not machine related. Switching to WMI/MI will remove this issue and decrease the abstraction between the extension and the Hyper-V service by one level.

The Hyper-V manager in Windows for example also uses WMI under the hood. This will allow us to also be closer to on par with the Hyper-V manager. I've tested retrieving VMs using WMI and it is a lot faster. The only negative of WMI is that it takes more code, however our goal of increasing speed is more important.

Scenario

The retrieval of Hyper-V VMs is faster when navigating to the environments page or the setup environment page. Decreasing the time it takes to load Hyper-V VMs on those pages.

Additional details

No response

@bbonaby bbonaby added Issue-Feature New feature or request Area-Environments Area-Environments-Hyper-V-Extension For issues, features requests and bugs related to the Hyper-V Extension in Dev Home labels May 17, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage New issue that the core contributors need to triage label May 17, 2024
@bbonaby bbonaby added the Type-Performance Related to performance label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Environments Area-Environments-Hyper-V-Extension For issues, features requests and bugs related to the Hyper-V Extension in Dev Home Issue-Feature New feature or request Needs-Triage New issue that the core contributors need to triage Type-Performance Related to performance
Projects
None yet
Development

No branches or pull requests

1 participant