Create a Virtual Machine in Azure Subscription1 | Exam AZ-900 Solution | Microsoft Azure

Create a Virtual Machine in Azure Subscription1

Prev Question Next Question

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure subscription named Subscription1. You sign in to the Azure portal and create a resource group named RG1.

From Azure documentation, you have the following command that creates a virtual machine named VM1. az vm create --resource-group RG1 --name VM1 --image UbuntuLTS

--generate-ssh-keys

You need to create VM1 in Subscription1 by using the command.

Solution: From a computer that runs Windows 10, install Azure CLI. From PowerShell, sign in to Azure and then run the command.

Does this meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

B

The command can be run from PowerShell or the command prompt if you have the Azure CLI installed. However, it must be run on the Windows 10 computer, not in Azure.

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest

Yes, the solution meets the goal of creating VM1 in Subscription1 by using the given command.

The solution involves two steps:

Step 1: Install Azure CLI on a computer running Windows 10 Azure CLI is a command-line tool that allows you to manage Azure resources from a terminal or command prompt. To use the az vm create command, you need to install Azure CLI on a computer running Windows 10. You can download and install Azure CLI from the official website.

Step 2: Sign in to Azure and run the command After installing Azure CLI, you need to sign in to Azure using PowerShell. PowerShell is a command-line shell used for task automation and configuration management. To sign in to Azure, you can use the Connect-AzAccount cmdlet. Once you are signed in, you can run the az vm create command with the required parameters to create VM1 in Subscription1.

The az vm create command creates a virtual machine named VM1 in the resource group named RG1. The virtual machine is created from an image of Ubuntu LTS and SSH keys are generated for authentication. The SSH keys are used to secure the communication between the virtual machine and the client.

In conclusion, the solution meets the goal of creating VM1 in Subscription1 by using the given command by installing Azure CLI on a computer running Windows 10 and signing in to Azure using PowerShell to run the command.