Deploy Generation 2 VMs in Azure

Recently at Ignite 2019, Microsoft announced GA of Generation 2 VMs in Azure. Customers have been asking this for a very long time. Microsoft introduced Gen 2 VMs in Windows Server 2012 R2 but wasn’t available in Azure. But now we can deploy Gen 2 VMs in Azure thanks to the Microsoft.

Generation 2 VMs support key features that aren’t supported in generation 1 VMs. These features include increased memory, Intel Software Guard Extensions (Intel SGX), and virtualized persistent memory (vPMEM). Generation 2 VMs running on-premises have some features that aren’t supported in Azure yet.

Hyper-V Gen 2 vs Azure Gen2 VMs

Azure doesn’t currently support some of the features that on-premises Hyper-V supports for generation 2 VMs.

Generation 2 feature On-premises Hyper-V Azure
Secure boot ✔️
Shielded VM ✔️
vTPM ✔️
Virtualization-based security (VBS) ✔️
VHDX format ✔️

Generation 2 VMs use the new UEFI-based boot architecture rather than the BIOS-based architecture used by generation 1 VMs. Compared to generation 1 VMs, generation 2 VMs might have improved boot and installation times.

Features and capabilities

Generation 1 vs Generation 2 features

Feature Generation 1 Generation 2
Boot PCAT UEFI
Disk controllers IDE SCSI
VM sizes All VM sizes Only VMs that support premium storage

Generation 1 vs Generation 2 capabilities

Capability Generation 1 Generation 2
OS disk > 2 TB ✔️
Custom disk/image/swap OS ✔️ ✔️
Virtual machine scale set support ✔️ ✔️
Azure Site Recovery ✔️ ✔️
Backup/restore ✔️ ✔️
Shared image gallery ✔️ ✔️
Azure disk encryption ✔️

Getting Started

Generation 2 VM Sizes

All of Azure VMs supports Generation 1, but Generation 2 VM support is limited to listed SKUs only:

  • B-series
  • DC-series
  • Dsv2-series and Dsv3-series
  • Esv3-series
  • Fsv2-series
  • GS-series
  • HB-series
  • HC-series
  • Ls-series and Lsv2-series
  • Mv2-series
  • NCv2-series and NCv3-series
  • ND-series
  • NVv3-series

Generation 2 Images in Azure

Generation 2 VMs currently supports below OS/Images only:

  • Windows Server 2019, 2016, 2012 R2, 2012
  • Windows 10
  • SUSE Linux Enterprise Server 15 SP1
  • SUSE Linux Enterprise Server 12 SP4
  • Ubuntu Server 16.04, 18.04, 19.04, 19.10
  • RHEL 8.0

Create a Virtual Machine

To create Generation 2 VMs, you can use Azure CLI, PowerShell, ARM Templates and, Azure Portal. Here is how can you deploy Generation 2 VM in Azure using Azure Portal. In the Advanced tab in VM creation experience, select Gen2 in VM Generation section.

Generation 2 VMs in Azure

If you are looking to upload a Hyper-V Gen 2 VM in Azure, then convert it to VHD format first. Azure still doesn’t support VHDX format.

I hope this post helps you to understand the capability and features of Generation 2 VMs in Azure. Let me know your thoughts in the comment section.

Leave a Reply

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