Unit 3 of Describe Azure compute and networking services: error when configuring Nginx on VM

Juan Antonio Pigurina 20 Reputation points
2024-04-20T15:52:14.34+00:00

When I entered the az extension set command into the sandbox powershell after creating the VM

I get an output in red indicating a package installation failure and file access error

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,713 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmaranS 6,805 Reputation points Microsoft Vendor
    2024-04-20T16:24:57.0933333+00:00

    Hi Juan Antonio Pigurina,

    Thank you for reaching out to Microsoft Q & A forum. 

    Where am I seeing this?

    Topic: AZ-900

    Learning Path: Azure Fundamentals: Describe Azure architecture and services.

    Module: Describe Azure compute and networking services

    Unit: Exercise - Create an Azure Virtual Machine

    I've made multiple attempts to reproduce the issue, and I can confirm that the documented steps function correctly for me.

    Here's a brief rundown of the steps:

    1. Activate a new sandbox and create the VM as indicated in the Exercise (Step 1 under "Create a Linux VM and Install Nginx").
    2. After completing Step 1, Please activate new sandbox and create the VM as instructed in the exercise.
    3. 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>

    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
    

    If the issue continues to persist, please do not hesitate to reach out to us.

    If you have found the answer provided to be helpful, please click on the "Accept answer" button so that it is useful for other members in the Microsoft Q&A community.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.