Topic 1 · Question 184
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 the Azure portal, launch Azure Cloud Shell and select PowerShell. Run the command in Cloud Shell.
Does this meet the goal?
A. Yes
B. No
PS Azure:\> az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys
SSH key files '/home/****/.ssh/id_rsa' and '/home/****/.ssh/id_rsa.pub' have been generated under ~/.ssh to allow SSH access to the VM. If using machines without permanent storage, back upyour keys to a safe location.
{
"fqdns": "",
"id": "/subscriptions/****************/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1",
"location": "uksouth",
"macAddress": "************",
"powerState": "VM running",
"privateIpAddress": "10.0.0.4",
"publicIpAddress": "51.x.x.x",
"resourceGroup": "RG1",
"zones": ""
}
Azure:/
PS Azure:\>