-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Unable to install desktopvirtualization extension in current AZ CLI. status code 3221225477 #30536
Comments
Thank you for opening this issue, we will look into it. |
Same issue with az upgrade:
|
In looking at some of the previous reported issues and a bit of Binging around on the internet I found a post that suggested I update the python path in PowerShell which I tried and it worked!
If you're using VSCode, do this in the pwsh terminal. When I tried this using the regular Windows Terminal the version of the desktopvirtualization extension would appear as unknown. Removing the extension and then adding it back within the VSCode pwsh terminal did the trick and when I checked in the Windows Terminal for the version of the extension it also worked and showed the correct version. Hopefully this helps out others. |
@bzabber that has fixed my az upgrade issue and a separate module extension problem too, thanks! |
Describe the bug
When I try to run a PowerShell script that runs a series of AZ CLI commands it fails when it gets to running commands for desktopvirtualization. I tried to install the extension manually on my AVD VM and I get an error.
I've attempted to run the command in pwsh 7.4.6, VSCode 1.96.0 using bash, and Terminal running the same version of pwsh 7.4.6
Related command
az extension add --name desktopvirtualization
Errors
An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
Issue script & Debug output
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'desktopvirtualization', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001E7151432E0>, <function OutputProducer.on_global_arguments at 0x000001E7152DC040>, <function CLIQuery.on_global_arguments at 0x000001E715305440>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: extension 0.005 1 7
cli.azure.cli.core: Total (1) 0.005 1 7
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001E7176B1C60>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\Zabchuk.B.azure\commands\2024-12-17.17-33-40.extension_add.17132.log'.
az_command_data_logger: command args: extension add --name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000001E7176F32E0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001E7177416C0>, <function register_cache_arguments..add_cache_arguments at 0x000001E717741800>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x000001E7177418A0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001E7152DC0E0>, <function CLIQuery.handle_query_parameter at 0x000001E7153054E0>, <function register_ids_argument..parse_ids_arguments at 0x000001E717741760>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 4795389
cli.azure.cli.core.extension._resolve: Candidates ['desktopvirtualization-0.1.0-py3-none-any.whl', 'desktopvirtualization-0.1.1-py3-none-any.whl', 'desktopvirtualization-0.2.0-py3-none-any.whl', 'desktopvirtualization-1.0.0-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['desktopvirtualization-0.1.0-py3-none-any.whl', 'desktopvirtualization-0.1.1-py3-none-any.whl', 'desktopvirtualization-0.2.0-py3-none-any.whl', 'desktopvirtualization-1.0.0-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['desktopvirtualization-0.2.0-py3-none-any.whl', 'desktopvirtualization-1.0.0-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['desktopvirtualization-0.2.0-py3-none-any.whl', 'desktopvirtualization-1.0.0-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['desktopvirtualization-0.2.0-py3-none-any.whl', 'desktopvirtualization-1.0.0-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://azcliprod.blob.core.windows.net/cli-extensions/desktopvirtualization-1.0.0-py3-none-any.whl', 'filename': 'desktopvirtualization-1.0.0-py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.55.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': '[email protected]', 'name': 'Microsoft Corporation', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Azure/azure-cli-extensions/tree/main/src/desktopvirtualization'}}}, 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'desktopvirtualization', 'summary': 'Microsoft Azure Command-Line Tools Desktopvirtualization Extension.', 'version': '1.0.0'}, 'sha256Digest': '3a1e7a8f0e579fa21fed770859b21c23bec8b8489d834a61411695a9a90c7cd4'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://azcliprod.blob.core.windows.net/cli-extensions/desktopvirtualization-1.0.0-py3-none-any.whl to C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): azcliprod.blob.core.windows.net:443
urllib3.connectionpool: https://azcliprod.blob.core.windows.net:443 "GET /cli-extensions/desktopvirtualization-1.0.0-py3-none-any.whl HTTP/1.1" 200 55923
cli.azure.cli.core.extension.operations: Downloaded to C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', 'C:\Users\Zabchuk.B\.azure\cliextensions\desktopvirtualization', 'C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl']
cli.azure.cli.core.extension.operations: Running: ['C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe', '-m', 'pip', 'install', '--target', 'C:\Users\Zabchuk.B\.azure\cliextensions\desktopvirtualization', 'C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations:
cli.azure.cli.core.extension.operations: Command '['C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe', '-m', 'pip', 'install', '--target', 'C:\Users\Zabchuk.B\.azure\cliextensions\desktopvirtualization', 'C:\Users\Zabchuk.B\AppData\Local\Temp\tmp2biq_0d2\desktopvirtualization-1.0.0-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 3221225477.
cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at C:\Users\Zabchuk.B.azure\cliextensions\desktopvirtualization
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 733, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", line 16, in add_extension_cmd
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 343, in add_extension
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 172, in _add_whl_ext
knack.util.CLIError: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001E7176B1EE0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 3.240 seconds (init: 0.354, invoke: 2.886)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3821 in cache file under C:\Users\Zabchuk.B.azure\telemetry\20241217173343199
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\Zabchuk.B.azure C:\Users\Zabchuk.B.azure\telemetry\20241217173343199"
telemetry.process: Return from creating process 16976
telemetry.main: Finish creating telemetry upload process.
Expected behavior
Should install the az cli desktopvirtualization extension without issue and drop me back to the prompt.
Environment Summary
$ az --version
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\Zabchuk.B.azure\cliextensions'
Python (Windows) 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
There are three different versions of Python on the AVD VM I'm running. The AVD VM OS is Windows 11 Enterprise multi-session version 10.0.22000 Build 22000
I triend using vscode using the pwsh terminal and the git bash terminal in VSCode. I've also tried just the regular Terminal program in my VM with similar results.
The text was updated successfully, but these errors were encountered: