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

configureSelfElevate fails in hyperv vm #4926

Open
harrhp opened this issue Oct 30, 2024 · 5 comments
Open

configureSelfElevate fails in hyperv vm #4926

harrhp opened this issue Oct 30, 2024 · 5 comments
Labels
Command-Configure Issue related to WinGet Configuration Experimental This experimental feature can be enabled in settings Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@harrhp
Copy link

harrhp commented Oct 30, 2024

Brief description of your issue

resources with securityContext: elevated fail to apply in hyperv vm

# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
  resources:
    - resource: DSCR_FileContent/TextFile
      directives:
        description: scratchpad
        allowPrerelease: true
        securityContext: elevated
      settings:
        Ensure: Present
        Path: "c:/test.txt"
        Contents: "hello"
  configurationVersion: 0.2.0

Steps to reproduce

  1. create windows 11 (23h2/24h2 doesn't matter, both don't work) vm in hyperv
  2. install winget 1.9.25180
  3. enable configureSelfElevate setting
  4. apply winget configuration file with resource that has securityContext: elevated directive

Expected behavior

configuration applied successfully

Actual behavior

verbose log log.txt

The configuration unit failed due to an internal error: -532462766
The text associated with this error code could not be found.
Some of the configuration was not applied successfully.

Environment

Windows Package Manager v1.9.25180
Windows: Windows.Desktop v10.0.22631.4317
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25180.0

clean windows installation. no other software

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Oct 30, 2024
@denelon
Copy link
Contributor

denelon commented Oct 30, 2024

Was the configuration run in a "user" context?

There should have been a UAC (User Account Control) trigger after accepting the configuration agreement.

@denelon
Copy link
Contributor

denelon commented Oct 30, 2024

Can you share the output from winget features?

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Experimental This experimental feature can be enabled in settings Command-Configure Issue related to WinGet Configuration labels Oct 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage Issue need to be triaged label Oct 30, 2024
@harrhp
Copy link
Author

harrhp commented Oct 31, 2024

Was the configuration run in a "user" context?

There should have been a UAC (User Account Control) trigger after accepting the configuration agreement.

Yes. There was a UAC propmt and i confirmed it

Can you share the output from winget features?

The following experimental features are in progress.
They can be configured through the settings file 'winget settings'.

Feature                  Status   Property             Link
-------------------------------------------------------------------------------------
Direct MSI Installation  Disabled directMSI            https://aka.ms/winget-settings
Resume                   Disabled resume               https://aka.ms/winget-settings
Configuration Schema 0.3 Disabled configuration03      https://aka.ms/winget-settings
Configure Self Elevation Enabled  configureSelfElevate https://aka.ms/winget-settings
Configure Export         Disabled configureExport      https://aka.ms/winget-settings

@denelon
Copy link
Contributor

denelon commented Oct 31, 2024

I ran the configuration on my local machine and it did succeed. I'm spinning up a VM to see if I can repro in Hyper-V.

@denelon
Copy link
Contributor

denelon commented Oct 31, 2024

OK, I was able to repro this.

@SteveL-MSFT is this something you've seen before? Given WinGet is leveraging the DSCR_FileContent/TextFile resource in this configuration, I'm wondering if it's an issue with Hyper-V.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Configure Issue related to WinGet Configuration Experimental This experimental feature can be enabled in settings Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

2 participants