0
0
Azurecloud~10 mins

VM commands (create, start, stop) in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new Azure VM using the Azure CLI.

Azure
az vm create --resource-group MyResourceGroup --name MyVM --image UbuntuLTS --admin-username azureuser [1]
Drag options to blanks, or click blank then click option'
A--delete
B--start
C--stop
D--generate-ssh-keys
Attempts:
3 left
💡 Hint
Common Mistakes
Using --start or --stop during VM creation is incorrect.
Forgetting to generate SSH keys can block access.
2fill in blank
medium

Complete the code to start an existing Azure VM.

Azure
az vm [1] --resource-group MyResourceGroup --name MyVM
Drag options to blanks, or click blank then click option'
Acreate
Bstart
Cstop
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' tries to make a new VM instead of starting.
Using 'stop' will power off the VM.
3fill in blank
hard

Fix the error in the command to stop an Azure VM.

Azure
az vm [1] --resource-group MyResourceGroup --name MyVM
Drag options to blanks, or click blank then click option'
Astop
Bshutdown
Cpoweroff
Dterminate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'shutdown' or 'poweroff' are not valid Azure CLI commands.
Using 'terminate' is not recognized.
4fill in blank
hard

Fill both blanks to create and start a VM with SSH keys.

Azure
az vm [1] --resource-group MyResourceGroup --name MyVM --image UbuntuLTS --admin-username azureuser [2]
Drag options to blanks, or click blank then click option'
Acreate
B--generate-ssh-keys
Cstart
D--no-wait
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'create' when making a VM.
Forgetting to generate SSH keys.
5fill in blank
hard

Fill all three blanks to stop a VM and delete it without waiting.

Azure
az vm [1] --resource-group MyResourceGroup --name MyVM && az vm [2] --resource-group MyResourceGroup --name MyVM [3]
Drag options to blanks, or click blank then click option'
Astop
Bdelete
C--no-wait
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to delete without stopping first.
Not using --no-wait causes waiting for deletion.