Task marked failed despite verified working setup — "Assigning Public IP to Virtual Machines" (Day 21)

Task: Create Azure VM datacenter-vm (Ubuntu, Standard_B1s), generate SSH key on azure-client, associate static public IP datacenter-pip, and confirm SSH access.

What I did (all steps completed successfully, confirmed in terminal output):

  1. Generated SSH key pair on azure-client: ssh-keygen -t rsa -b 4096 -f ~/.ssh/datacenter-vm-key -N ""
  2. Created static public IP datacenter-pip in Central US — confirmed via az network public-ip create, output showed "provisioningState": "Succeeded", "publicIPAllocationMethod": "Static", IP 52.242.132.214
  3. Created VM datacenter-vm with az vm create, using --os-disk-size-gb 30 --storage-sku Standard_LRS to comply with the subscription’s disk policy. Output confirmed "powerState": "VM running" with the correct public IP attached.
  4. Verified with az vm show -d --output table — showed PowerState: VM running, correct PublicIps, correct resource group.
  5. Tested SSH: ssh -i ~/.ssh/datacenter-vm-key azureuser@52.242.132.214 — connected successfully, landed on the Ubuntu 22.04.5 LTS welcome banner, session was live and interactive.

Result: Clicked “Check” immediately after confirming SSH access. Task was marked failed with: “SSH access to ‘datacenter-vm’ failed or VM is not in the ‘running’ state.”

Observed pattern: This happened twice in a row. Both times, the environment timer crossed below the 5-minute mark at almost the exact moment I clicked Check, and the failure message appeared right after. In both cases my own terminal showed the VM running and SSH already connected successfully before clicking Check.

Suspected cause: A timing/race condition where the grading backend’s own verification (SSH probe + resource check) doesn’t complete before the lab environment begins tearing down near the 5-minute expiry mark, producing a false failure even though the actual Azure resources were correctly configured and reachable.

Attached evidence: Screenshots of the terminal showing the successful az vm create, az vm show (PowerState: VM running), and the live SSH session with the Ubuntu banner, taken immediately before clicking Check.

Request: Please review the attached evidence and mark this task as complete, and/or look into whether the Check mechanism has a timing issue when triggered close to environment expiry.




I just tried the lab via Console, and it worked fine with me:

1 Like

The problem is most likely with this

ssh -i datacenter-vm-key azureuser@x.x.x.x

Unless a question specifically asks for a keypair named datacenter-vm-key, then you must always use the defaults with ssh-keygen, i.e. id-rsa (simply pressing ENTER to accept that default).
Or if you want to use -f on ssh-keygen, then specify the default name, i.e -f ~/.ssh/id_rsa

The grader cannot know in advance what you called your keypair if it didn’t give you a name for it. It will expect the default and call ssh without a -i.

This holds for all questions, not just this one.

1 Like

Thanks @Santosh_KodeKloud for your effort, though I was trying with CLI instead of GUI. However, finally I became able to clear the lab :blush:

Thanks a lot Dear @Alistair_KodeKloud ! You really helped me a lot in Completing the Lab just in few minutes as I followed the steps you mentioned. Appreciate your time and effort​:blush::blush: