When creating a new VM in Virtual Machine Manager 2012 R2 from a Generation 2 template you may receive the following error:
The issue occurs because the Bootmgfw.efi file is set as the first startup device that the VM tries to start from, instead of the .vhdx file which contains the operating system.
To resolve the issue for the template going forward the following Powershell Script can be executed.
To replicate how storage is presented in a production scenario inside of a LAB, there are some useful Software SAN Tools (Starwinds etc) which present storage to VMM in order to import into the Fabric using iSCSI for example.
Now in Server 2012 R2 this can be achieved right out of the box using the iSCSI Target Server and Powershell to present into VMM.
Ensure your host is Server 2012 R2 and add the feature for the iSCSI Target Server.
Note down the drives you wish to make use in your environment but for the purpose of this post, I have 2 drives that are SSD which I will use as Gold and Silver Storage.
The SMI-S piece that did ship with VMM is no longer required in R2 as its their Out of the box.
We will now go through the steps via Powershell to bring these disks under the control of VMM.
Add a storage provider
Obtain the iSCSI Target Server local administrative credentials that are based on user name and password as follows:
$Cred = Get-Credential
Note*- Any account that is part of the Local Administrators group is sufficient.