In Hyper-V there are two supported virtual machine generations, generation 1 and generation 2. Generation 2 virtual machines have a simplified virtual hardware model, and it supports Unified Extensible Firmware Interface (UEFI) firmware instead of BIOS-based firmware. Additionally, the majority of legacy devices are removed from generation 2 virtual machines.
Generation 1
- Provides the same virtual hardware to the virtual machine as in previous versions of Hyper-V.
Generation 2
- Provides the following new functionality on a virtual machine:
- Secure Boot (enabled by default)
- Boot from a SCSI virtual hard disk
- Boot from a SCSI virtual DVD
- PXE boot by using a standard network adapter
- UEFI firmware support
The following guest operating systems are supported as generation 2 virtual machines.
- Windows Server 2012
- Windows Server 2012 R2 Preview
- 64-bit versions of Windows 8
- 64-bit versions of Windows 8.1 Preview
FAQs
Can I run generation 1 and generation 2 virtual machines together?
Yes. This is expected because generation 2 does not support all of the Hyper-V-supported guest operating systems. Guest operating systems that are not supported by generation 2 virtual machines need to be installed in a generation 1 virtual machine.
Is RemoteFX supported by generation 2 virtual machines?
No. RemoteFX is not supported by generation 2 virtual machines.
Can I attach a physical CD/DVD to a generation 2 virtual machine?
No. The virtual DVD drive in generation 2 virtual machines only supports ISO image files.
Can I attach a virtual hard disk in VHD format to a generation 2 virtual machine?
No. Generation 2 virtual machines only support VHDX format virtual hard drives. You can convert VHD files to VHDX format using the Edit Virtual Hard Disk Wizard in the Hyper-V Manager Console or use the Convert-VHD PowerShell cmdlet.
Can a VHDX file that was converted from a VHD file be used to boot a generation 2 virtual machine?
No. A clean install of the operating system is required.
Can I resize a VHDX file containing the boot volume for a generation 2 virtual machine while the virtual machine is running?
Yes.
What is the maximum size of VHDX file support by a generation 2 virtual machine?
64TB
Can I create a VHDX file that can be used to boot both generation 1 and generation 2 virtual machines?
While this is technically possible, it is possible that unexpected errors may occur. Therefore a VHDX file that is bootable to both generation 1 and generation 2 virtual machines is not supported or recommended.
Can I mount a VHDX file used by a generation 2 virtual machine?
Yes. A VHDX file itself is a container for a disk and as such can be mounted regardless of the virtual machine generation.
Can I tell whether a VHDX file was created by a generation 1 or generation 2 virtual machine?
No. The virtual machine generation is a property of the virtual machine not the virtual hard disk.
Can a generation 2 VHDX file be attached to a generation 1 virtual machine?
Yes, the VHDX file can be attached to either IDE or SCSI controller of a generation 1 virtual machine. If this is a bootable VHDX file the generation 1 virtual machine will not boot.
Can I import a generation 2 virtual machine to Hyper-V running on Windows Server 2012?
No. Generation 2 virtual machine is a new feature to Windows Server 2012 R2 Preview.
Is Secure Boot or UEFI firmware required on the physical host?
No. The virtual firmware and configuration are independent of the physical platform.
Does the UEFI firmware in a generation 2 virtual machine support setup mode for Secure Boot?
No.
Can I run a UEFI shell or other UEFI application in a generation 2 virtual machine?
Microsoft does not provide or support a UEFI shell or other UEFI applications. Using a non-Microsoft UEFI shell or UEFI applications is technically possible if complied from sources directly. If these applications are not appropriately digitally signed you will be required to disable Secure Boot for the virtual machine.
Where are the boot entries for generation 2 virtual machines stored?
The boot entries for a generation 2 virtual machine are stored in the configuration file for the virtual machine.
What is the default generation of a new virtual machine?
By default a virtual machine created by both the New Virtual Machine Wizard and the New-VM PowerShell cmdlet create generation 1 virtual machines. In the New Virtual Machine Wizard you can select Generation 2 on the Specify Generation. In PowerShell you can use the –Generation parameter to specify the generation of a virtual machine.
Can I change the generation of a virtual machine after it has been created?
No.
Why are Windows 7 64 bit or Windows Server 2008 R2 not supported as generation 2 guest operating system?
While Windows 7 and Windows Server 2008 R2 support UEFI, they depend on a Programmable Interrupt Controller (PIC) which is not present in generation 2 virtual machine hardware.
Why are Windows 8 and Windows 8.1 Preview 32 bit editions not supported as generation 2 guest operation systems?
Generation 2 virtual machines do not support 32-bit guest operating systems as the 64-bit only UEFI firmware does not have a Compatibility Service Module (CSM).
What is the maximum number of network adapters supported by a generation 2 virtual machine?
8. Generation 2 virtual machines do not support legacy network adapters.
What is the maximum number of storage devices, VHDX or DVD Drives, supported by generation 2 virtual machines?
256. Generation 2 virtual machines support up to 4 SCSI controllers with each controller supporting 64 devices. Generation 2 virtual machines can have more than 4 DVD drives.
When I create a new virtual machine with the New-VM PowerShell cmdlet, why does a generation 2 virtual machine not have a DVD drive?
On a generation 2 virtual machine you can add a DVD drive while the virtual machine is running.
Does generation 2 virtual machines support iSCSI or Fibre Channel boot?
No.
Can I perform a network install using IPv6?
Yes. By default generation 2 virtual machines uses IPv4. Use can set a virtual machine to use IPv6 instead of IPv4 using the Set-VMFirmware PowerShell cmdlet.
Can I use a virtual floppy disk (.vfd) as an answer file for unattended installation of a generation 2 virtual machine?
No. Generation 2 virtual machines do not support virtual floppy drives. As an alternate use an ISO image file on a DVD drive.
More information can be found here;
Update;
Convert Gen1 to Gen2 script can be found here;