MicrosoftDocs / azure-docs-cli

Repository used to store content for the docs.microsoft.com content for the Azure CLI
https://docs.microsoft.com/cli/azure/
Creative Commons Attribution 4.0 International
210 stars 486 forks source link

AZ login caused the error in Dashboard PowerShell #801

Closed sp04355 closed 6 years ago

sp04355 commented 6 years ago

PS Azure:> az login Traceback (most recent call last): File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli__main.py", line 32, in az_cli = get_default_cli() File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core__init__.py", line 492, in get_default_cli help_cls=AzCliHelp) File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\init.py", line 49, in init__ ensure_dir(azure_folder) File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\knack\util.py", line 38, in ensure_dir os.makedirs(d) File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\os.py", line 220, in makedirs mkdir(name, mode) FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\Users\ContainerAdministrator\CloudDrive\.pscloudshell'

sp04355 commented 6 years ago

I deleted an old cloud shell and resources and created a new one, and passed this step. Then i foolowed an instructions on https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart-powershell and failed on create cluster command: Azure:\ PS Azure:> az --version azure-cli (2.0.32)

acr (2.0.24) acs (2.0.32) advisor (0.5.1) ams (0.1.0) appservice (0.1.32) backup (1.1.1) batch (3.2.2) batchai (0.2.2) billing (0.1.8) cdn (0.0.14) cloud (2.0.13) cognitiveservices (0.1.13) command-modules-nspkg (2.0.1) configure (2.0.15) consumption (0.3.1) container (0.1.23) core (2.0.32) cosmosdb (0.1.21) dla (0.0.19) dls (0.0.21) dms (0.0.1) eventgrid (0.1.12) eventhubs (0.1.3) extension (0.0.13) feedback (2.1.1) find (0.2.9) interactive (0.3.20) iot (0.1.20) keyvault (2.0.21) lab (0.0.22) monitor (0.1.6) network (2.1.0) nspkg (3.0.2) profile (2.0.24) rdbms (0.2.2) redis (0.2.13) reservations (0.1.2) resource (2.0.28) role (2.0.23) servicebus (0.1.2) servicefabric (0.0.12) sql (2.0.25) storage (2.0.32) vm (2.0.31)

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\ContainerAdministrator\CloudDrive.pscloudshell.azure\cliextensions'

Python (Windows) 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Azure:\ PS Azure:> az provider register -n Microsoft.Network Registering is still on-going. You can monitor using 'az provider show -n Microsoft.Network' Azure:\ PS Azure:> az provider register -n Microsoft.Storage Registering is still on-going. You can monitor using 'az provider show -n Microsoft.Storage' Azure:\ PS Azure:> az provider register -n Microsoft.Compute Registering is still on-going. You can monitor using 'az provider show -n Microsoft.Compute' Azure:\ PS Azure:> az provider register -n Microsoft.ContainerService Registering is still on-going. You can monitor using 'az provider show -n Microsoft.ContainerService' Azure:\ PS Azure:> az group create --name myResourceGroup --location eastus { "id": "/subscriptions/28636f4a-1e71-4104-acaa-0868d27b3bec/resourceGroups/myResourceGroup", "location": "eastus", "managedBy": null, "name": "myResourceGroup", "properties": { "provisioningState": "Succeeded" }, "tags": null } Azure:\ PS Azure:> az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 1 --generate-ssh-keys SSH key files 'C:\Users\ContainerAdministrator.ssh\id_rsa' and 'C:\Users\ContainerAdministrator.ssh\id_rsa.pub' have been generated under ~/.ssh to allow SSH access to the VM. If using machines without permane nt storage like Azure Cloud Shell without an attached file share, back up your keys to a safe location Finished service principal creation[##################################] 100.0000%Operation failed with status: 'Bad Request'. Details: The VM size of Agent is not allowed in your subscription in location 'eastus'. Agent VM size 'Standard_DS1_v2' is available in locations: centraluseuap,eastus2euap,southcentralus,southeastasia,westus2.

How should i proceed? I have my corporation subscription "Visual Studio Professional", $50 per month

sp04355 commented 6 years ago

$50 for AZURE

twitchax commented 6 years ago

Login is not supported in the Cloud Shell because credentials are persisted from the browser.

sp04355 commented 6 years ago

I have passed login step, now my question is why I cannot build a cluster?

sp04355 commented 6 years ago

OK, i fixed the issue by providing the following parameter --node-vm-size Standard_DS1_V3, because default value is Standard_DS1_V2, and this default value is not available in my region for some reason. So now it is looks like eventually i should be able to create a cluster

sp04355 commented 6 years ago

hope, it did not work as well, got error:

Deployment failed. Correlation ID: 418ead05-f35b-422b-80e7-69cd2b4ca720. Provisioning of resource(s) for container service iwaydemoCluster in resource group myResourceGroup failed. Message: Deployment template validation failed: 'The provided value 'Standard_DS1_V3' for the template parameter 'nodepool1VMSize' at line '1' and column '12716' is not valid. The parameter value is not part of the allowed value(s): 'Standard_A0,Standard_A1,Standard_A10,Standard_A11,Standard_A1_v2,Standard_A2,Standard_A2_v2,Standard_A2m_v2,Standard_A3,Standard_A4,Standard_A4_v2,Standard_A4m_v2,Standard_A5,Standard_A6,Standard_A7,Standard_A8,Standard_A8_v2,Standard_A8m_v2,Standard_A9,Standard_B1ms,Standard_B1s,Standard_B2ms,Standard_B2s,Standard_B4ms,Standard_B8ms,Standard_D1,Standard_D11,Standard_D11_v2,Standard_D11_v2_Promo,Standard_D12,Standard_D12_v2,Standard_D12_v2_Promo,Standard_D13,Standard_D13_v2,Standard_D13_v2_Promo,Standard_D14,Standard_D14_v2,Standard_D14_v2_Promo,Standard_D15_v2,Standard_D16_v3,Standard_D16s_v3,Standard_D1_v2,Standard_D2,Standard_D2_v2,Standard_D2_v2_Promo,Standard_D2_v3,Standard_D2s_v3,Standard_D3,Standard_D32_v3,Standard_D32s_v3,Standard_D3_v2,Standard_D3_v2_Promo,Standard_D4,Standard_D4_v2,Standard_D4_v2_Promo,Standard_D4_v3,Standard_D4s_v3,Standard_D5_v2,Standard_D5_v2_Promo,Standard_D64_v3,Standard_D64s_v3,Standard_D8_v3,Standard_D8s_v3,Standard_DS1,Standard_DS11,Standard_DS11_v2,Standard_DS11_v2_Promo,Standard_DS12,Standard_DS12_v2,Standard_DS12_v2_Promo,Standard_DS13,Standard_DS13-2_v2,Standard_DS13-4_v2,Standard_DS13_v2,Standard_DS13_v2_Promo,Standard_DS14,Standard_DS14-4_v2,Standard_DS14-8_v2,Standard_DS14_v2,Standard_DS14_v2_Promo,Standard_DS15_v2,Standard_DS1_v2,Standard_DS2,Standard_DS2_v2,Standard_DS2_v2_Promo,Standard_DS3,Standard_DS3_v2,Standard_DS3_v2_Promo,Standard_DS4,Standard_DS4_v2,Standard_DS4_v2_Promo,Standard_DS5_v2,Standard_DS5_v2_Promo,Standard_E16_v3,Standard_E16s_v3,Standard_E2_v3,Standard_E2s_v3,Standard_E32-16s_v3,Standard_E32-8s_v3,Standard_E32_v3,Standard_E32s_v3,Standard_E4_v3,Standard_E4s_v3,Standard_E64-16s_v3,Standard_E64-32s_v3,Standard_E64_v3,Standard_E64s_v3,Standard_E8_v3,Standard_E8s_v3,Standard_F1,Standard_F16,Standard_F16s,Standard_F16s_v2,Standard_F1s,Standard_F2,Standard_F2s,Standard_F2s_v2,Standard_F32s_v2,Standard_F4,Standard_F4s,Standard_F4s_v2,Standard_F64s_v2,Standard_F72s_v2,Standard_F8,Standard_F8s,Standard_F8s_v2,Standard_G1,Standard_G2,Standard_G3,Standard_G4,Standard_G5,Standard_GS1,Standard_GS2,Standard_GS3,Standard_GS4,Standard_GS4-4,Standard_GS4-8,Standard_GS5,Standard_GS5-16,Standard_GS5-8,Standard_H16,Standard_H16m,Standard_H16mr,Standard_H16r,Standard_H8,Standard_H8m,Standard_L16s,Standard_L32s,Standard_L4s,Standard_L8s,Standard_M128-32ms,Standard_M128-64ms,Standard_M128ms,Standard_M128s,Standard_M64-16ms,Standard_M64-32ms,Standard_M64ms,Standard_M64s,Standard_NC12,Standard_NC12s_v2,Standard_NC12s_v3,Standard_NC24,Standard_NC24r,Standard_NC24rs_v2,Standard_NC24rs_v3,Standard_NC24s_v2,Standard_NC24s_v3,Standard_NC6,Standard_NC6s_v2,Standard_NC6s_v3,Standard_ND12s,Standard_ND24rs,Standard_ND24s,Standard_ND6s,Standard_NV12,Standard_NV24,Standard_NV6'.'.. Details:

twitchax commented 6 years ago

Standard_DS1_v2 should work: what region are you in?

sp04355 commented 6 years ago

i am in 'eastus', trying to build with Standard_A0, from command line and from the wizard, so far in 'Creating' status

sp04355 commented 6 years ago

How long it usually take to create cluster, one hour?

sp04355 commented 6 years ago

NO luck again: Deployment failed. Correlation ID: c7bb6f52-d4de-4f3c-9b62-221078ab0420. Template deployment timed out after 1h30m0s due to following resources: '/subscriptions/28636f4a-1e71-4104-acaa-0868d27b3bec/resourceGroups/MC_myResourceGroup_myAKS Cluster_eastus/providers/Microsoft.Compute/virtualMachines/aks-nodepool1-13532470-0/extensions/cse0'

sp04355 commented 6 years ago

looks like A0 does not have enough memory, trying with D1_v2

sp04355 commented 6 years ago

Finally succeeded with D1_v2, what a pain, wasted day and a half.

sp04355 commented 6 years ago

Now i cannot pass this: az aks install-cli Getting: Downloading client to C:\Program Files (x86)\kubectl.exe from https://storage.googleapis.com/kubernetes-release/release/v1.10.2/bin/windows/amd64/kubectl.exe Please ensure that C:\Program Files (x86) is in your search PATH, so the kubectl.exe command can be found. And i see kubtctl.exe under C:\Program Files (x86), and i add C:\Program Files (x86) to the path

sp04355 commented 6 years ago

PS Azure:> kubectl get nodes kubectl : The term 'kubectl' 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 line:1 char:1

sp04355 commented 6 years ago

Ops, my bad, never mind...