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

Failed to extract windows vhdx. LASTEXITCODE: 2 (AksEdge.psm1:4781) #118

Closed
pbering opened this issue May 11, 2023 · 4 comments
Closed

Failed to extract windows vhdx. LASTEXITCODE: 2 (AksEdge.psm1:4781) #118

pbering opened this issue May 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@pbering
Copy link

pbering commented May 11, 2023

Describe the bug

Not possible to create new deployment of type LinuxAndWindows nor adding Windows node afterwards. This has been working on previous AKS Edge versions (before GA).

To Reproduce

Steps to reproduce the behavior:

  1. Follow intructions: https://learn.microsoft.com/en-us/azure/aks/hybrid/aks-edge-howto-single-node-deployment#create-a-mixed-workload-cluster
  2. Fails with:
[05/11/2023 09:34:58] Extracting Windows Vhdx

System ERROR:
The filename, directory name, or volume label syntax is incorrect.

[05/11/2023 09:34:58] Exception Caught!!!

 - Failed to extract windows vhdx. LASTEXITCODE: 2 (AksEdge.psm1:4781)

Expected behavior

That it is possible to add a Windows node.

Environment:

  • AKS Edge Essentials Version: 1.1.220.0 April Release
  • Kubernetes version: 1.24.6 (k8s)
  • Windows Host OS:
    • Edition: Windows 11 Enterprise
    • Version: 22H2, OS Build 22621.1635
    • Virtual Machine: NO
@pbering pbering added the bug Something isn't working label May 11, 2023
@pbering
Copy link
Author

pbering commented May 11, 2023

ohh found the issue... was running in the latest PowerShell Core 7.3.4, when switching to legacy v5.0 then it works!

@fcabrera23
Copy link

Hi @pbering,

Great to see you fixed your issue. However, probably the issue was not related to PS, because we support PS7.

Thanks,
Francisco

@pbering
Copy link
Author

pbering commented May 16, 2023

Hi Francisco,

I think this issue should remain open. The issue is in "C:\Program Files\WindowsPowerShell\Modules\AksEdge\1.1.220.0\AksEdge.psm1" line 4779, if you run the following in PowerShell 7.3.4:

& "C:\Program Files\AksEdge\AksEdgeWindows-v1.exe" "x" "-o""C:\temp""" "-y" 

it fails with The filename, directory name, or volume label syntax is incorrect.. But if you run it in PowerShell 5 then it works and extracts fine.

If the quoting of the -o argment is removed so the line looks becomes:

& "C:\Program Files\AksEdge\AksEdgeWindows-v1.exe" "x" -o""C:\temp"" "-y" 

The it works across v5 and v7.

@fcabrera23 fcabrera23 reopened this May 16, 2023
@fcabrera23
Copy link

Hi @pbering,

Closing this issue - It was fixed with 1.2.414.0 release.

Thanks,
Francisco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants