BROKEN: Exercise - Create an Azure Virtual Machine

Olsen, Aaron 20 Reputation points
2023-01-14T20:48:47.7966667+00:00

This exercise runs a custom script, when the script is run it produces an error. The error being that it cannot install nginx. This causes this exercise to not complete successfully and impacts the ability to do the next exercise in this module. Any chance this could be fixed?

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.
650 questions
{count} votes

2 answers

Sort by: Most helpful
  1. TP 68,406 Reputation points
    2023-01-14T21:53:42.2266667+00:00

    Hi,

    You can complete the exercise by connecting to the Linux VM you just created using ssh and then manually copying/pasting the commands from the script.

    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>

    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

    9 people found this answer helpful.
    0 comments No comments

  2. kobulloc-MSFT 22,091 Reputation points Microsoft Employee
    2023-01-14T21:31:33.78+00:00

    Hello!

    Where are you seeing this issue?

    Why am I running into an error when running the custom nginx script?

    In rare cases, this external dependency will result in an error. The most reliable way to correct this is to restart the sandbox and run the commands again.

    We apologize for the inconvenience and are reviewing alternative options for this part of the training. Thank you for reporting this!

    0 comments No comments