Last week I build a Generation 2 virtual machine (Windows Server 2012 R2) which I will be use as a virtual machine template in SCVMM 2012 R2. I build this virtual machine with SCVMM 2012 R2. After building and configuring the virtual machine I have converted the virtual machine to a template and stored the template on a library share.
As soon as the virtual machine was stored in the library I would like to deploy some virtual machines from this template. I started the deploy and I saw that the virtual machine was created succesfully. However during the template rollout the proces stops at step 1.4 (view from the “Jobs” tab):
I switched to the “Summary” view and there I saw the following Error: VMM cannot find the device or this device is not valid for a boot device.
I was pretty sure that the virtual machine does not have any boot issues when it was a “normal” virtual machine. First I checked the virtual machine properties in SCVMM. When you look at the virtual machine properties in SCVMM you will notice that the properties on a virtual machine are not in line with the Hyper-V management console. In SCVMM you do not have a “boot order” menu as you have in the Hyper-V management console. However in SCVMM you do have an option called “Contains the operating system for the virtual machine”. The virtual machine that I’ve deployed from the template does have this option enabled so this could not be the problem.
After some research on the internet and reading through some TechNet threads I deciced to delete the template, build a new virtual machine and before converting it as a template changing the boot order with Hyper-V Manager in such a way that the harddrive with the OS installed will be the boot device (instead of the boot file):
After changing the boot order in the source virtual machine I converted it to a template again. On the properties of the virtual machine template I disabled the option “Enable Secure Boot”. On the hardware profile this option is still enabled.
Fingers crossed and let’s deploy a virtual machine from template again. The result:
Still the same issue
.
Time for a recap, what are the steps that I have taken so far:
- From out the SCVMM 2012 R2 console I’ve build a Generation 2 virtual machine
- I’ve installed the virtual machine with Windows Server 2012 R2
- Installed and configured updates and additional sofware and shutted down the virtual machine
- Saved the virtual machine as a virtual machine template in the SCVMM library
- Deployed a new virtual machine from the template
- Oops… error (no valid boot device)
Then:
- From out the SCVMM 2012 R2 console I’ve build a Generation 2 virtual machine
- I’ve installed the virtual machine with Windows Server 2012 R2
- Installed and configured updates and additional sofware and shutted down the virtual machine
- Go to the Hyper-V manager (local on a Hyper-V 2012 R2 host) go to the properties of the virtual machine and changed the boot order (Harddrive with OS as first boot device)
- Saved the virtual machine as a virtual machine template in the SCVMM library
- On the properties of the virtual machine template I’ve disabled the option “Enable Secure Boot”
- Deployed a new virtual machine from the template
- Oops… error (no valid boot device)
Try three:
- From out the SCVMM 2012 R2 console I’ve build a Generation 2 virtual machine
- I’ve installed the virtual machine with Windows Server 2012 R2
- Installed and configured updates and additional sofware and shutted down the virtual machine
- Go to the Hyper-V manager (local on a Hyper-V 2012 R2 host) go to the properties of the virtual machine and changed the boot order (Harddrive with OS as first boot device)
- Disabled the option ‘Enable Secure Boot’ in Hyper-V manager and SCVMM console
- Deployed a new virtual machine from the tempate
- OOOOOPS…. error (no valid boot device)
So none of the options mentioned in this thread works! Very frustrating. It looks like that it is not possible to deploy a Generation 2 virtual machine template in some environments.
I will log a case at Microsoft for this issue and keep you updated offcourse.
Update 13-12-2013: Thanks to John (see comments) I’ve a workaround for this issue. First I checked the SCSI bus ID and the LUN ID, this was bus 0, LUN 0.
Then I used the following PowerShell command: get-scvmtemplate -name “Windows Server 2012 R2 template” | set-scvmtemplate -FirstBootDevice “SCSI,0,0”