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

[BUG] Quickstart script failed to connect to Azure Arc #65

Closed
johnliu55-msft opened this issue Feb 17, 2023 · 2 comments
Closed

[BUG] Quickstart script failed to connect to Azure Arc #65

johnliu55-msft opened this issue Feb 17, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@johnliu55-msft
Copy link

Describe the bug
The script AKSEdgeRemoteDeployment.ps1 used in Quickstart successfully deployed AKS-Edge-Essentials but failed to connect to Azure Arc with the following error message:

az : The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\AksEdgeScript\AKS-Edge-1.0.266.0\tools\modules\AksEdgeDeploy\AksEdge-Arc.ps1:175 char:24
+                 $ret = az login --service-principal -u $aiauth.Servic ...
+                        ~~
    + CategoryInfo          : ObjectNotFound: (az:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Error: ServicePrincipalId/Password possibly expired.
C:\AksEE\AksEdgeRemoteDeploy.ps1 : Azure login failed.
At line:1 char:1
+ .\AksEdgeRemoteDeploy.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,AksEdgeRemoteDeploy.ps1

Based on the error message, seems like it's using az command to connect to Azure, but it is not mentioned anywhere in the document that Azure-CLI is required.

To Reproduce
Steps to reproduce the behavior:

  1. Freshly install a Windows 11 Pro
  2. Download the script AKSEdgeRemoteDeployment.ps1
  3. Update the script with Azure configs
  4. Run the script .\AksEdgeRemoteDeploy.ps1
  5. Deployment Successfull, but failed to connect to Arc.

Expected behavior
The script should connect to Azure Arc if all Azure configs are provided.

Screenshots
image

Environment (please complete the following information):

  • AKS Edge Essentials Version 1.0.266.0
  • Kubernetes version 1.24.3
  • Windows Host OS (please complete the following information):
    • Edition: 11 Pro
    • Version: 10.0.22621.382
    • Virtual Machine: Local Hyper-V VM

Additional context
Add any other context about the problem here.

@johnliu55-msft johnliu55-msft added the bug Something isn't working label Feb 17, 2023
@parameshbabu
Copy link
Collaborator

Az CLI is not installed. Will fix.

@parameshbabu
Copy link
Collaborator

Fixed with #70
Az Powershell is used now and doesnt require az cli. Initialize-AideArc should install the required Az Powershell modules.

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

3 participants