0
0
Azurecloud~10 mins

Azure Spot VMs for cost savings - Interactive Code Practice

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

Complete the code to specify the VM priority as Spot for cost savings.

Azure
vm_parameters = {
  'location': 'eastus',
  'priority': '[1]'
}
Drag options to blanks, or click blank then click option'
ARegular
BSpot
CHigh
DLow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Regular' instead of 'Spot' does not enable cost savings.
Using invalid priority values causes deployment errors.
2fill in blank
medium

Complete the code to set the eviction policy for the Spot VM.

Azure
vm_parameters = {
  'priority': 'Spot',
  'evictionPolicy': '[1]'
}
Drag options to blanks, or click blank then click option'
ADeallocate
BDelete
CRestart
DPause
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'Delete' will remove the VM and its data permanently.
Using unsupported eviction policies causes errors.
3fill in blank
hard

Fix the error in the code to correctly configure a Spot VM with eviction policy.

Azure
vm_parameters = {
  'priority': '[1]',
  'evictionPolicy': 'Deallocate'
}
Drag options to blanks, or click blank then click option'
APreemptible
BRegular
CSpot
DLow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Preemptible' which is not a valid Azure VM priority.
Setting priority to 'Regular' disables Spot VM features.
4fill in blank
hard

Fill both blanks to configure a Spot VM with eviction policy and max price.

Azure
vm_parameters = {
  'priority': '[1]',
  'evictionPolicy': '[2]',
  'maxPrice': -1
}
Drag options to blanks, or click blank then click option'
ASpot
BDelete
CDeallocate
DRegular
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Regular' priority disables Spot VM features.
Choosing 'Delete' eviction policy deletes the VM on eviction.
5fill in blank
hard

Fill all three blanks to create a Spot VM with eviction policy, max price, and a tag for cost center.

Azure
vm_parameters = {
  'priority': '[1]',
  'evictionPolicy': '[2]',
  'maxPrice': [3],
  'tags': {
    'CostCenter': 'Finance'
  }
}
Drag options to blanks, or click blank then click option'
ARegular
BDeallocate
C-1
DSpot
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Regular' priority disables Spot VM features.
Setting maxPrice to a string instead of a number.
Omitting tags reduces resource organization.