Hi Daniel,
In the exercise the extension is supposed to run the sudo apt-get update command for you when you run az vm extension set command. Lately the process has been failing occasionally--you will know it failed if you see lots of errors in your cloud shell after running az vm extension set command. If you don't see these errors, then no need for you to run commands manually.
If you do see the errors, please follow instructions below:
You need to ssh to the vm you created before you can use sudo.
Please activate new sandbox and create the VM as instructed in the exercise. After Task 1 finishes, make a note of the publicIpAddress that was assigned to the VM (e.g. 20.245.72.52). Start Task 2, and then when it errors out, follow steps below:
Connect to the newly-created VM using ssh (in cloud shell). You will need to substitute the publicIpAddress you noted above for <VM public ip address> below:
ssh azureuser@<VM public ip address>
Example: ssh azureuser@20.245.72.52
Enter yes when you are prompted.
Copy and right-click -- paste the following three commands below in the cloud shell window. Wait for each to complete before pasting in the next command.
sudo apt-get update
sudo apt-get install -y nginx
echo "<html><body><h2>Welcome to Azure! My name is $(hostname).</h2></body></html>" | sudo tee -a /var/www/html/index.html
Performing the steps above should only add a couple of minutes to the process. Continue on in the module. If you have any questions please let me know in a comment.
If this was helpful to you please Accept Answer.
Thanks.
-TP