Hand pointing to a computer

Last Updated on August 7, 2025 by Arnav Sharma

Hibernation is an effective cost management feature available for Azure virtual machines (VMs), allowing you to pause VMs that are not in use, thereby saving on compute costs. Whether you are using Linux or Windows VMs, Azure provides a straightforward process to hibernate and resume these machines, ensuring that your applications can quickly pick up right where they left off. This blog post will explore the details of hibernating Azure VMs, the supported configurations, and the specific steps for both Windows and Linux environments.

Why Hibernate Your VMs?

Hibernation is particularly beneficial for:

  • Virtual desktops, dev/test servers, and other scenarios where VMs don’t need to run 24/7.
  • Systems with long boot times due to memory-intensive applications. These applications can be initialized on VMs and hibernated. Prewarmed VMs can then be quickly started with applications already running in the desired state.

How Hibernation Works

When you hibernate a VM, Azure signals the VM’s operating system to perform a suspend-to-disk action. The memory contents of the VM are stored in the OS disk, and the VM is then deallocated. When you start the VM again, the memory contents are transferred from the OS disk back into memory, allowing applications and processes to resume from their previous state.

Once a VM is in a hibernated state, you aren’t billed for the VM usage. Instead, you’re only billed for the storage (OS disk, data disks) and networking resources (IPs, etc.) attached to the VM.

Supported Configurations

Hibernation support is limited to certain VM sizes and OS versions. Here are the key configurations:

Supported Operating Systems

Windows

  • Windows Server 2022
  • Windows Server 2019
  • Windows 11 Pro, Enterprise, Enterprise multi-session
  • Windows 10 Pro, Enterprise, Enterprise multi-session

Linux

  • Ubuntu 22.04 LTS, 20.04 LTS, 18.04 LTS
  • Debian 11, 10 (with backports kernel)
  • RHEL 9.0+ (with minimum kernel version 5.14.0-70), RHEL 8.3+ (with minimum kernel version 4.18.0.240)

Supported VM Sizes

VM sizes with up to 64-GB RAM from the following General Purpose VM series support hibernation:

  • Dasv5-series
  • Dadsv5-series
  • Dsv5-series
  • Ddsv5-series
  • Easv5-series
  • Eadsv5-series
  • Esv5-series
  • Edsv5-series

VM sizes with up to 112-GB RAM from the following GPU VM series support hibernation:

  • NVv4-series (in preview)
  • NVadsA10v5-series (in preview)

Configure Hibernation

Windows VMs

  1. Enable Hibernation During VM Creation: In the Azure portal, check the ‘Enable hibernation’ box during VM creation. This can also be done via CLI, PowerShell, ARM templates, and API.
  2. Enable Hibernation on an Existing VM:
    • Deallocate your VM using az vm deallocate.
    • Update the OS disk to set supportsHibernation to true.
    • Update the VM to enable hibernation.
    • Start the VM and configure the guest OS for hibernation.
  3. Configuring the Guest OS: The ‘Microsoft.CPlat.Core.WindowsHibernateExtension’ VM extension is automatically installed. Ensure the page file is on the C: drive.
  4. Hibernate and Resume: Use the Azure portal, CLI, PowerShell, or REST API to hibernate and resume the VM.
Hybernate a vm

Linux VMs

  1. Enable Hibernation During VM Creation: Check the ‘Enable hibernation’ box in the Azure portal during VM creation. This can also be done via CLI, PowerShell, ARM templates, and API.
  2. Enable Hibernation on an Existing VM:
    • Deallocate your VM using az vm deallocate.
    • Update the OS disk to set supportsHibernation to true.
    • Update the VM to enable hibernation.
    • Start the VM and configure the guest OS for hibernation.
  3. Configuring the Guest OS: Use either the LinuxHibernateExtension or the hibernation-setup-tool. Ensure there is sufficient space available to create the swap file, especially for RHEL.
  4. Hibernate and Resume: Use the Azure portal, CLI, PowerShell, or REST API to hibernate and resume the VM.
hibernated vm

Troubleshooting

Windows VMs

  • Ensure the page file is on the C: drive.
  • Use the powercfg commands to verify and enable hibernation.

Linux VMs

  • Install the LinuxHibernateExtension or hibernation-setup-tool.
  • Ensure sufficient space for the swap file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.