Enable Hibernation for Azure Virtual Machines

Let’s check how to enable hibernation for Azure virtual machines. By hibernating Azure VMs, users can optimize resource utilization, minimize costs. Additionally, hibernation in Azure ensures quick and efficient resumption of tasks, contributing to improved operations.

Hibernating virtual machines is a crucial feature in the realm of virtualization, enabling the preservation of a VM’s current state. This process allows users to essentially freeze the virtual machine at its current point in operation, saving its memory and disk contents.

Azure Virtual Machines Hibernation is currently in Preview. Hibernation allows you to pause VMs that aren’t being used and save on computing costs. It’s an effective cost management feature for scenarios such as:

  • Virtual desktops, dev/test, and other scenarios where the 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. These “prewarmed” VMs can then be quickly started when needed, with the applications already up and running in the desired state.

Hibernation support is limited to certain VM sizes and OS versions. VM sizes with up to 32 GB RAM from the Dasv5-series, Dadsv5-series, Dsv5-series and Ddsv5-series VM series support hibernation. Make sure you have a supported configuration before using hibernation.

Patch My PC

Hibernate saves you time and money by deallocating your virtual machine and saving the contents of its RAM to the root volume, allowing you to resume from where you left off when your VM restarts. Once enabled, an extension supporting this feature will be automatically installed.

Prerequisites to use Hibernation

To leverage hibernation effectively, certain prerequisites must be in place, especially in virtual machines-supported platforms and OS Support.

  • The hibernate feature is enabled for your subscription.
  • A persistent OS disk large enough to store the contents of the RAM, OS and other applications running on the VM is connected.
  • The VM size supports hibernation.
  • The Windows operating systems support hibernation, Windows Server 2022, Windows Server 2019, Windows 11 Pro/Enterprise, Windows 11 Enterprise multi-session, Windows 10 Pro/Enterprise, and Windows 10 Enterprise multi-session.
  • The Azure VM Agent is installed if you’re using the Windows or Linux Hibernate Extensions.
  • Hibernation is enabled on your VM when creating the VM.
  • If a VM is being created from an OS disk or a Compute Gallery image, then the OS disk or Gallery Image definition supports hibernation.

Enabling Hibernation Feature for your Azure Subscription

Use the following steps to enable hibernation feature for your subscription. Preview Features allows you to opt in and out of pre-release features. You can access it by searching in Azure or from All Services to see which features are available to your subscription. You can register, unregister, and keep track of the registration state here.

  • Sign in to the Azure portal https://portal.azure.com/.
  • Once you are inside the portal, Search for and select Preview features.
Configure Hibernation for Azure Virtual Machines Fig.1
Configure Hibernation for Azure Virtual Machines Fig.1

Search for ‘hibernation’. Check the ‘Hibernation Preview’ item. Click Register.

Adaptiva
Configure Hibernation for Azure Virtual Machines Fig.2
Configure Hibernation for Azure Virtual Machines Fig.2

Confirm that the registration state is Registered (registration takes a few minutes) before trying out the feature. A successful message appears. Feature requests processed Successfully registered 1 feature(s). The registration state should show as ‘Registered’.

Display nameStateProviderRelease dateLearn more
Hibernation PreviewRegisteredMicrosoft.Compute8/19/2023Documentation 
Table 1 – Enable Hibernation for Azure Virtual Machines

Enable Hibernation for Azure Virtual Machines during Creation Process

To enable hibernation during VM creation, you can use the Azure portal, CLI, PowerShell, ARM templates and API. The steps help you through using the Azure portal to enable Hibernation for Azure Virtual Machines.

You have the option to Create a virtual machine with trusted launch enabled. To hibernate a VM, you must first enable the feature while creating the VM.

Note! You can only enable hibernation for a VM when you create it. You can’t enable this feature after the VM is created.

Configure Hibernation for Azure Virtual Machines Fig.3
Hibernation for Azure Virtual Machines – Configure Hibernation for Azure Virtual Machines Fig.3

Once you have enabled a VM with hibernation enabled, you must configure the guest OS to hibernate your VM successfully.

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

About Author – JiteshMicrosoft MVP, has over six years of working experience in the IT Industry. He writes and shares his experiences related to Microsoft device management technologies and IT Infrastructure management. His primary focus is Windows 10/11 Deployment solution with Configuration Manager, Microsoft Deployment Toolkit (MDT), and Microsoft Intune.

Leave a Comment

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