Unable to run first command in lab "Configure network access" lab under "Describe Azure Compute and Networking Services

Jadon Mills 0 Reputation points
2023-02-22T00:45:54.3466667+00:00

I am currently attempting to complete task one but am stuck. I first attempt to run the command, without the quotes: "az vm list-ip-addresses" only to get blank output.

I then try it with what I was assuming was supposed to be the output, immediately follwing the command so it was something like az vm list-ip-addresses IPADDRESS="$(az vm list-ip-addresses \ --resource-group..." and so on, including the quotes and still no luck, as I still get blank output and prompted for another command. Is there something im missing?

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,720 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Luke Murray 11,091 Reputation points MVP
    2023-02-22T01:34:34.3966667+00:00

    Try:

    az vm list-ip-addresses -o table
    

    Also make sure you are logged in: https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli
    And that the subscription is right: https://learn.microsoft.com/en-us/cli/azure/manage-azure-subscriptions-azure-cli

    0 comments No comments

  2. kobulloc-MSFT 26,346 Reputation points Microsoft Employee
    2023-02-22T01:50:26.1666667+00:00

    Hello, @Jadon Mills !

    This is likely because the VM you created in unit 3 timed out and was automatically cleaned up. Recreate the VM in unit 3 and the commands in unit 9 should work as expected. I'll go into more detail below.

    Where am I seeing this?

    Why am I getting blank output on Step 1 with az vm list-ip-addresses?

    Unit 9 depends on the VM you created in unit 3 as stated in an often overlooked paragraph at the beginning of the unit:

    In this exercise, you'll configure the access to the virtual machine (VM) you created earlier in this module. The Microsoft Learn sandbox should still be running. If the sandbox timed out, you'll need to redo the previous exercise (Exercise - Create an Azure virtual machine).

    Attempting to run az vm list-ip-addresses without a VM will return an empty set of brackets and you'll get a curl: (3) URL using bad/illegal format or missing URL error on step 2. Rerun unit 3: Exercise - Create an Azure Virtual Machine and then return to unit 9 before the hour is up and your sandbox resets.

    You'll get empty brackets when running az vm list-ip-addresses and an error on step 2 if you don't have a VM in your active sandbox from unit 3:

    User's image

    If you do have a VM in your active sandbox, the commands will complete as expected:

    User's image


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.