Skip to main content

🛡️ Azure Virtual Machine is overutilized🟢

Logic

Description

Open File

Description

Identify Azure Virtual Machines that exhibit signs of overutilization and initiate a scale-up (resize) action where appropriate. A VM is classified as overutilized if, over a 14-day period, its average CPU utilization exceeds 80% and its maximum CPU utilization consistently surpasses 95%.

Rational

Proactively detecting and addressing overutilized VMs is essential for ensuring optimal application performance and minimizing latency for services hosted on Azure.

Sustained high CPU utilization and frequent peak usage indicate that the current VM size is inadequate for the workload demands. Scaling up or enabling auto-scaling mechanisms ensures sufficient resource availability, mitigates performance degradation, and enhances system stability.

Impact

Resizing or scaling operations may incur additional Azure consumption costs. However, implementing auto scaling strategies provides the flexibility to respond to workload fluctuations, improving overall resource efficiency.

Audit

This policy evaluates an Azure Virtual Machine based on CPU performance data collected over a 14-day period.

... see more

Remediation

Open File

Remediation

Considerations

  1. Virtual machines (VMs) with local temporary disks cannot be resized to VM SKUs that do not support temporary disks, and vice versa.
  2. Resizing from a SCSI-based VM SKU to a remote NVMe-enabled VM SKU is not supported.

Right-Sizing Overutilized Virtual Machine

Resizing a VM should be treated as a disruptive operation, particularly for stateful workloads. Ensure proper planning and downtime windows if required.

For VMs leveraging Premium Storage, it is critical to select an s-series SKU to retain support. For instance, use Standard_E4s_v3 instead of Standard_E4_v3 to maintain Premium disk compatibility.

Azure CLI
resourceGroup={{resource-group-name}}
vmName={{vm-name}}
newSize={{desired-vm-size}}

### Deallocate the VM
az vm deallocate --resource-group $resourceGroup --name $vmName

### Resize the VM
az vm resize --resource-group $resourceGroup --name $vmName --size $newSize

### Start the VM
az vm start --resource-group $resourceGroup --name $vmName
PowerShell
$resourceGroup = "{{resource-group-name}}"

... [see more](remediation.md)

policy.yaml

Open File

Linked Framework Sections

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
💼 Cloudaware Framework → 💼 Resource Right-Sizing15no data
💼 Cloudaware Framework → 💼 Workload Efficiency24no data