Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-900 All Questions

View all questions & answers for the AZ-900 exam

Exam AZ-900 topic 1 question 195 discussion

Actual exam question from Microsoft's AZ-900
Question #: 195
Topic #: 1
[All AZ-900 Questions]

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 the Azure portal, launch Azure Cloud Shell and select Bash. Run the command in Cloud Shell.
Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
sham21
Highly Voted 3 years, 4 months ago
Answer is correct but need to understand why subscription and resource group are mentioned in question. While using the command subscription is not mentioned and some of us would look why subscription command was not used however all details mentioned in question was mentioned. For creating a virtual machine though power shall or bas, there is no requirement to put the subscription details. Name of VM and resource group are sufficient to create a vm.
upvoted 30 times
Nilvam
3 years, 4 months ago
*From Cloud shell, yes.
upvoted 1 times
...
mauchi
3 years, 4 months ago
I think the fact that you launch the Cloud shell from the Azure portal already implies that you have a subscription.
upvoted 14 times
SAFM
1 year ago
agree, because if you have no subscription you won't be able to run the azure cloud shell.
upvoted 2 times
NoursBear
1 week, 6 days ago
if there is only one subscription it defaults to it so no need to mention it
upvoted 1 times
...
...
...
Violoncello
3 years, 2 months ago
There are lots of assumptions. The question says "You have a subscription named Subscription1". Assume that's the only subscription. When you create RG1, it must go under a subscription. Subscription1 is the only subscription it will go to. By adding a VM to RG1, (and RG1 being under Subscription1), your goal is achieved. That is, if you assume things correctly.
upvoted 6 times
...
...
Luansi
Highly Voted 1 year, 9 months ago
Selected Answer: B
The command that is provided is for the Azure CLI (Command Line Interface) and specifically for the az vm create command, which is used to create a virtual machine using the Azure CLI. While it's true that you can launch the Azure Cloud Shell from the Azure portal, Cloud Shell supports both PowerShell and Bash and it can be used to run Azure CLI commands, the command provided is written in PowerShell and the solution is suggesting to use Bash shell, which will not be able to execute this command correctly.
upvoted 7 times
patrickrw99
1 year, 6 months ago
The command AZ VM create is not a PowerShell Command, it is a Bash command.
upvoted 13 times
...
Ajay_J
1 year, 1 month ago
AZ VM Create is a Bash command not Powershell. Please do not misguide people.
upvoted 7 times
...
SAFM
1 year ago
It's a bash command, not PowerShell, please be careful not to confuse other users!
upvoted 9 times
...
...
126e81f
Most Recent 1 month, 3 weeks ago
you can execute the az vm create command in a Bash shell. The Azure CLI, which provides the az commands, is compatible with various shell environments, including Bash
upvoted 1 times
...
NoursBear
2 months, 2 weeks ago
A useful doc which should remove some confusion https://learn.microsoft.com/en-us/cli/azure/choose-the-right-azure-command-line-tool
upvoted 1 times
...
Yomzie
6 months, 3 weeks ago
Hint: You sign in to the Azure portal and create a resource group named RG1. By implication, this means you already have a SUBSCRIPTION, as you won't be able to create a RG without a subscription. Now, to the question of whether the command given (az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys) is a Bash or PowerShell command, there should be no argument, since it can be tried out. az vm create --resource-group RG1 --name VM1 --image UbuntuLTS --generate-ssh-keys It's not a PowerShell command; it is an Azure CLI command written in Bash. It is used to create the "VM1" virtual machine in the resource group "RG1" using the "UbuntuLTS" image while generating SSH keys for authentication. PS: If you're in doubt, please try it out for yourself.
upvoted 1 times
...
linux_admin
6 months, 4 weeks ago
Selected Answer: B
The given command is written for Azure CLI, not Bash.
upvoted 1 times
...
ironcurtain
9 months, 3 weeks ago
What about a storage account? When I go to Azure portal, then clout shell and select either bash or PowerShell, I am getting this: "You have no storage mounted Azure Cloud Shell requires an Azure file share to persist files. Learn more This will create a new storage account for you and this will incur a small monthly cost. View pricing Azure Cloud Shell will register your subscription with Microsoft.CloudShell resource provider." So my answer is NO.
upvoted 1 times
...
mario1234ww
11 months, 2 weeks ago
This command works in bash shell
upvoted 1 times
...
SAFM
1 year ago
Selected Answer: A
The answer is correct, the given command is a bash one, and Azure CLI accessed from the Azure cloud shell is the right approach to writing and running it.
upvoted 2 times
...
semauni
1 year, 4 months ago
Selected Answer: A
Yes: this is a Bash command, which can be run in the Azure CLI
upvoted 3 times
...
Marcal
1 year, 5 months ago
Yes, this solution meets the goal. By launching Azure Cloud Shell and selecting Bash from the Azure portal, and then running the command in Cloud Shell, you can create VM1 in Subscription1. The correct answer is A. Yes.
upvoted 1 times
...
idjbm71
1 year, 5 months ago
Selected Answer: A
From Azure Portal you can do anything.
upvoted 4 times
...
AZFabio
1 year, 5 months ago
Selected Answer: A
correct
upvoted 1 times
...
kklohit
1 year, 7 months ago
Selected Answer: A
Yes, this solution meets the goal. The Azure Cloud Shell provides a command-line interface for Azure services directly within the Azure portal, allowing you to run Azure commands and scripts from anywhere with an internet connection. By selecting Bash as the shell type in Cloud Shell and running the given command, you can create the VM1 in Subscription1 within the specified resource group (RG1) using the UbuntuLTS image and automatically generating SSH keys for the virtual machine.
upvoted 1 times
...
motekim
1 year, 7 months ago
The answer is correct. You can obsoletely run this script in cloud shell bash, I just ran it and have a running VM1. Just remember to create a resource group RG1 (like the question says) and run it in bash.
upvoted 3 times
...
bobothewiseman
1 year, 8 months ago
Answer is No. The given command will not work in Bash
upvoted 2 times
...
iLike2LearnItLearnIt
1 year, 8 months ago
Selected Answer: A
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-manage-vm
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...