Complete the code to specify the VM priority as Spot for cost savings.
vm_parameters = {
'location': 'eastus',
'priority': '[1]'
}Setting the VM priority to Spot enables cost savings by using unused Azure capacity.
Complete the code to set the eviction policy for the Spot VM.
vm_parameters = {
'priority': 'Spot',
'evictionPolicy': '[1]'
}The eviction policy Deallocate deallocates the VM when evicted, allowing you to restart it later.
Fix the error in the code to correctly configure a Spot VM with eviction policy.
vm_parameters = {
'priority': '[1]',
'evictionPolicy': 'Deallocate'
}The priority must be set to Spot to enable Spot VM features including eviction policy.
Fill both blanks to configure a Spot VM with eviction policy and max price.
vm_parameters = {
'priority': '[1]',
'evictionPolicy': '[2]',
'maxPrice': -1
}Setting priority to Spot enables Spot VM. Eviction policy Deallocate stops the VM on eviction. Max price -1 means pay up to the on-demand price.
Fill all three blanks to create a Spot VM with eviction policy, max price, and a tag for cost center.
vm_parameters = {
'priority': '[1]',
'evictionPolicy': '[2]',
'maxPrice': [3],
'tags': {
'CostCenter': 'Finance'
}
}Priority Spot enables Spot VM. Eviction policy Deallocate stops VM on eviction. Max price -1 means pay up to on-demand price. Tags help organize resources.