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

Hyper-V in environments throwing error #3351

Closed
crutkas opened this issue Jul 3, 2024 · 4 comments
Closed

Hyper-V in environments throwing error #3351

crutkas opened this issue Jul 3, 2024 · 4 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-Bug Something isn't working or needs investigation Priority-3 Resolution-By-Design This is intended to be implemented this way

Comments

@crutkas
Copy link
Member

crutkas commented Jul 3, 2024

Dev Home version

0.1501.547.0

Windows build number

10.0.22631.3874

Other software

OS Build Version: 10.0.22631.3874.amd64fre.ni_release.220506-1250
.NET Version: .NET 8.0.6

Steps to reproduce the bug

  1. Updated Dev Home to latest
  2. Click environment
  3. Get hyper-v error

Expected result

Just works cause Hyper-V Manager just works.

Actual result

hyper-v manager works yet dev home doesn't

Included System Information

CPU: Intel(R) Core(TM) Ultra 7 165H
Physical Memory: 31.64GB (12.65GB free)
Processor Architecture: x64

Included Extensions Information

Extensions:
Microsoft.Windows.DevHomeGitHubExtension.Canary_0.1500.530.0_x64__8wekyb3d8bbwe (Dev Home GitHub Extension (Canary))
Microsoft.Windows.DevHomeAzureExtension.Canary_0.1000.530.0_x64__8wekyb3d8bbwe (Dev Home Azure Extension (Canary))
Microsoft.Windows.DevHome_0.1501.533.0_x64__8wekyb3d8bbwe (Core Widget Extension)
Microsoft.Windows.DevHome_0.1501.533.0_x64__8wekyb3d8bbwe (Hyper-V Extension)
Microsoft.Windows.DevHomeGitHubExtension_0.1500.533.0_x64__8wekyb3d8bbwe (Dev Home GitHub Extension (Preview))
Microsoft.Windows.DevHome.Canary_0.1501.547.0_x64__8wekyb3d8bbwe (Core Widget Extension)
Microsoft.Windows.DevHome.Canary_0.1501.547.0_x64__8wekyb3d8bbwe (Hyper-V Extension)

Widget Service:
MicrosoftWindows.Client.WebExperience_524.18000.0.0_x64__cw5n1h2txyewy

@crutkas crutkas added the Issue-Bug Something isn't working or needs investigation label Jul 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage New issue that the core contributors need to triage label Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@bbonaby
Copy link
Contributor

bbonaby commented Jul 3, 2024

Hey @crutkas, Which error are you talking about exactly? If you mean the request to add the user to the Hyper-v group: I explain why its needed here: #2995 (comment)

@crutkas
Copy link
Member Author

crutkas commented Jul 5, 2024

Sorry looks like the screenshot didn’t paste in.

This is adding user to hyper-v group

If hyperv manager lets me create / launch / delete without this, dev home should too

@bbonaby
Copy link
Contributor

bbonaby commented Jul 5, 2024

We can talk offline about it but we actually can't as the Hyper-V extension would need to run elevated in order to do that. The comment I linked above explains it. But under the hood Hyper-V manager is elevating (without a UAC prompt), by means we can't use in Dev Home. The only other way to allow users to interact with Hyper-V is if they are in the Hyper-V admin group. Once added to this group the users would need to log off/on again or reboot. It's a local users and groups account which is a bit of a special case, as even after being added/removed from the group the users access token that was given to them at logon, does not get updated. The Hyper-v apis are checking the users access token to confirm if they're in the group, which is why we can't just add them and have it all just work as they still won't be able to see/interact with their VMs until they've logged off/rebooted unfortunately:

Heres an excerp from a MS learn doc: How Access Tokens Work | Microsoft Learn which states

If you add a user to a group after the user’s access token has been issued, or modify privileges assigned to the user account, the user must log off and then log on again before the access token will be updated.

@krschau krschau added Area-Environments Area-Environments-Hyper-V-Extension For issues, features requests and bugs related to the Hyper-V Extension in Dev Home labels Jul 8, 2024
@kanismohammed kanismohammed added Priority-3 and removed Needs-Triage New issue that the core contributors need to triage labels Jul 8, 2024
@kanismohammed kanismohammed closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2024
@krschau krschau added the Resolution-By-Design This is intended to be implemented this way label Sep 5, 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-Bug Something isn't working or needs investigation Priority-3 Resolution-By-Design This is intended to be implemented this way
Projects
None yet
Development

No branches or pull requests

4 participants