identify the possible blocking state while executing resizing and idle automation for virtual machine

Sree Aravind M 40 Reputation points
2026-09-02T06:32:29.21+00:00

Find all the possible blocking conditions that can stop or affect resizing and idle automation for VM, EC2, and Compute Engine.

We have already completed the checks for:

Delete protection

Permission check

Now, we need to identify any other possible blockers before starting the resizing and idle automation.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


2 answers

Sort by: Oldest
  1. AI answer

    2026-09-02T06:32:51.2933333+00:00

    For Azure Virtual Machines, possible blocking conditions beyond delete protection and permission checks include:

    1. VM not fully deallocated when resize requires it
      • Some resize operations require the VM to be in Stopped (deallocated) state.
      • A VM shut down from inside the guest OS can remain Stopped instead of Stopped (deallocated), which can block the operation.
    2. VM size/SKU does not support live disk resize
      • Not all VM sizes support resizing attached disks while the VM is running.
      • If the VM SKU does not support live resize, the VM must be deallocated first.
    3. OS disk live resize requirements not met
      • OS disk resize has stricter requirements than data disk resize.
      • If the VM SKU or storage type is unsupported, resize is blocked until the VM is deallocated.
    4. Shared disk attached (maxShares > 1)
      • Shared disks cannot be live-resized while attached to running VMs.
      • All attached VMs must be deallocated, or the disk must be detached.
    5. Disk SKU and size combination does not support online resize
      • Online resize is not supported for:
        • OS disks
        • Shared disks
        • Standard HDD, Standard SSD, or Premium SSD data disks that are 4 TiB or smaller when expanding them beyond 4 TiB
    6. Active SAS token on the disk
      • An active SAS URI places a lease on the disk and blocks modifications.
      • This can happen because of:
        • Disk export
        • Azure Backup job in progress
        • Azure Site Recovery replication
        • Third-party backup tools
    7. Backup job in progress
      • A running Azure Backup job can hold the lease and block disk resize until the job finishes or is canceled.
    8. Disk export in progress
      • If a disk export URL exists, the disk may have an active SAS lease that blocks resize.
    9. Target disk size is invalid
      • Resize fails if the requested size is outside the valid range for the disk SKU or if the operation attempts to shrink the disk.
    10. Disk attached while crossing the 4 TiB threshold
    • A Standard HDD, Standard SSD, or Premium SSD disk that is 4 TiB or smaller cannot be expanded beyond 4 TiB while attached.
    • The disk must be detached first.
    1. Availability set allocation constraints during VM resize/start
    • If the VM is in an availability set, resize or restart can fail because the original cluster may not support the requested size or may lack capacity.
    • This is especially relevant when only some VMs in the availability set are deallocated.
    1. Partial deallocation in an availability set
    • Starting or resizing VMs in a partially deallocated availability set can behave like adding capacity to the existing set and fail due to cluster capacity restrictions.
    • Deallocating all VMs in the availability set and starting them together is a documented workaround.
    1. VM in transitional or updating state
    • A VM in provisioning or updating state can affect automation actions such as start/stop.
    • Failed or in-progress extensions can also affect accessibility and operations.

    For idle automation on Azure VMs, the context supports these blockers:

    • VM in transitional state
    • Pending operations such as disk resize
    • Provisioning state issues
    • Extension installation or extension failure
    • Automation identity lacks required access
    • Bad request from automation due to configuration mismatch or conflicting VM state

    The provided context does not contain supported blocker lists for AWS EC2 or Google Compute Engine, so only Azure VM blockers can be listed from the available material.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Jose Benjamin Solis Nolasco 12,036 Reputation points Volunteer Moderator
    2026-09-02T13:13:18.9366667+00:00

    Welcome to Microsoft Q&A, @Sree Aravind M I hope you are doing well today,

    Beyond delete protection and permissions, I would also validate the VM state and any dependencies before running automated resize or idle operations that may be blocking ....

    For Azure VMs, the main conditions to check are:

    • VM is in a transitional state such as Updating, Provisioning, Starting, or Stopping.
    • The VM is not fully deallocated when the target resize requires deallocation.
    • The requested VM size/SKU is unavailable in the region or cannot be allocated due to capacity constraints.
    • Availability Set constraints prevent the VM from being allocated to the requested size.
    • Another operation is already in progress on the VM or its disks.
    • A disk has an active SAS lease, for example from disk export or a backup operation.
    • Disk resize prerequisites are not satisfied, particularly when crossing the 4-TiB boundary for certain disk SKUs.
    • The VM is protected by another automation/policy that may start, stop, or resize it concurrently.
    • Azure Policy or resource locks prevent the required operation.
    • The automation identity has permission to the VM but not to a dependent resource required by the operation.
    • For idle automation, verify that monitoring data is available and current; missing/stale metrics can prevent the automation from correctly identifying an idle VM.

    For the resize workflow, I would check the VM's provisioningState, powerState, current SKU, pending operations, disk state/SAS leases, Availability Set configuration, and regional SKU capacity before executing the action.

    Microsoft references:

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-disk-resize-errors

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/allocation-failure

    https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/resize-vm

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.