100 days of cloud Azure Day 2

Hello All,

I keep getting the below error , done some searching so

~ :heavy_multiplication_x: az vm create
–resource-group kml-rg_main-7fefd5672f984f75
–name xfusion-vm
–location centralus
–image Ubuntu2404
–size Standard_B1s
–admin-username kk_lab_user_main-0e8652b5d7e64091
–ssh-key-values xfusion-kp.pub
–os-disk-size-gb 30
–storage-sku Standard_LRS (add this part did not change a bit as per

Unable to create Azure VM using CLI in KodeKloud Lab (100 Days of Cloud(Azure) - Day3 task) )

similar error will be seen if I used did not add the last line in create a VM command

  • The error as seen below , not sure why the problem with the network even though Azure should create it automatically as far as I know

(AuthorizationFailed) The client ‘6fdacf58-5e17-4cb0-8a9a-f438602fa4c1’ with object id ‘9d80dd76-8024-42c5-82ae-1affcd6b268b’ does not have authorization to perform action ‘Microsoft.Network/virtualNetworks/read’ over scope ‘/subscriptions/f0c3bcdd-5ce2-4fa0-8cf3-41559747512b/resourceGroups/kml-rg_main-7fefd5672f984f75/providers/Microsoft.Network’ or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed
Message: The client ‘6fdacf58-5e17-4cb0-8a9a-f438602fa4c1’ with object id ‘9d80dd76-8024-42c5-82ae-1affcd6b268b’ does not have authorization to perform action ‘Microsoft.Network/virtualNetworks/read’ over scope ‘/subscriptions/f0c3bcdd-5ce2-4fa0-8cf3-41559747512b/resourceGroups/kml-rg_main-7fefd5672f984f75/providers/Microsoft.Network’ or the scope is invalid. If access was recently granted, please refresh your credentials.

BR
Adel

You can do this on the Azure Console.

thank you , will try it