Challenge - 5 Problems
Azure VM Command Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate2:00remaining
What happens after running this Azure CLI command?
You run the command to create a VM:
What is the state of the VM immediately after this command completes successfully?
az vm create --resource-group MyGroup --name MyVM --image UbuntuLTS --admin-username azureuser --generate-ssh-keys
What is the state of the VM immediately after this command completes successfully?
Azure
az vm create --resource-group MyGroup --name MyVM --image UbuntuLTS --admin-username azureuser --generate-ssh-keys
Attempts:
2 left
💡 Hint
Think about what the 'az vm create' command does by default regarding VM state.
✗ Incorrect
The 'az vm create' command creates and starts the VM by default, so it is running and ready for SSH after completion.
❓ Configuration
intermediate2:00remaining
Which command correctly stops a running Azure VM?
You want to stop a VM named 'TestVM' in resource group 'TestGroup' using Azure CLI. Which command will stop the VM and deallocate its resources?
Attempts:
2 left
💡 Hint
Stopping a VM does not always free resources; deallocating does.
✗ Incorrect
The 'az vm deallocate' command stops the VM and releases compute resources, which stops billing for the VM compute.
❓ Architecture
advanced2:00remaining
What is the effect of starting a deallocated VM in Azure?
You have a VM that was previously deallocated. You run:
What happens to the VM's IP address and resources after this command?
az vm start --resource-group ProdGroup --name ProdVM
What happens to the VM's IP address and resources after this command?
Attempts:
2 left
💡 Hint
Consider what happens to dynamic IP addresses when a VM is deallocated.
✗ Incorrect
When a VM is deallocated, dynamic public IP addresses are released. Starting the VM assigns a new dynamic IP and allocates compute resources.
❓ security
advanced2:00remaining
Which command sequence ensures a VM is stopped and cannot be accessed until restarted?
You want to stop a VM named 'SecureVM' in resource group 'SecureGroup' so that it is completely offline and inaccessible. Which sequence of commands achieves this?
Attempts:
2 left
💡 Hint
Stopping a VM does not release resources or IP addresses.
✗ Incorrect
Deallocating a VM stops it and releases compute resources and IP addresses, making it inaccessible until started again.
✅ Best Practice
expert2:00remaining
What is the best practice to minimize cost when a VM is not in use but you want to keep its data intact?
You have a VM that you do not need running 24/7 but want to keep all data and configuration intact. Which Azure CLI command should you use to minimize cost while preserving data?
Attempts:
2 left
💡 Hint
Stopping a VM does not release compute resources, but deallocating does.
✗ Incorrect
Deallocating a VM stops it and releases compute resources, reducing cost, while preserving disks and data.