Skip to content

[AOE] Long-time deallocated VMs remediation runbook is skipping deallocated VMs #1456

Description

@helderpinto

🐛 Problem

The Remediate-LongDeallocatedVMsFiltered runbook does a validation on the VM power status before downgrading its disks to Standard HDD. However, due to changes in the Az.Compute PowerShell module, it is doing a validation on a property that no longer exists and thus assumes the VM is running and skips it.

👣 Repro steps

  1. Have virtual machines deallocated for more than 30 days
  2. Wait for the Virtual Machine has been deallocated for long with disks still incurring costs recommendation to start appearing in the Recommendations workbook
  3. Wait for 4 weeks
  4. Trigger the Remediate-LongDeallocatedVMsFiltered runbook
  5. See the "Skipping as VM is not deallocated" message in the job logs for each VM recommended
  6. Confirm the VM is deallocated and the message above reflects a wrong power state

🤔 Expected

The correct power state should have been validated and the remediation should have gone through.

🙋‍♀️ Ask for the community

We could use your help:

  1. Please vote this issue up (👍) to prioritize it.
  2. Leave comments to help us solidify the vision.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions