Generation 2 VM created in System Center 2012 R2 Virtual Machine Manager cannot start

Applies to: Microsoft System Center 2012 R2 Virtual Machine Manager

Symptoms


When using System Center 2012 R2 Virtual Machine Manager (VMM 2012 R2) for template creation, Generation 2 virtual machines (VMs) based on this template cannot start after creation. Virtual Machine Manager returns the following error:

Error (23352) VMM cannot find the device or this device is not valid for a boot device.

Cause


The issue occurs because the Bootmgfw.efi file is set as the first startup device for the VM instead of the .vhdx file that contains the operating system. 

Resolution


To resolve the issue, open the properties of the VM, highlight Hard Drive and move the .vhdx file that contains the operating system that you want to start from to the top of the list. This enables the VM to start.

To resolve the problem within the template for future VM deployments, run the following PowerShell command on Virtual Machine Manager server:

get-scvmtemplate -name "YourGen2TemplateName" | set-scvmtemplate -FirstBootDevice “SCSI,0,0”

whereYourGen2TemplateName is the name of your Generation 2 template, the first 0 is the SCSI bus ID and the second 0 is the LUN ID of the boot disk.

As soon as this change is made, new Generation 2 virtual machines deployed from the template should successfully start.