Cannot create gen2 VM from template

I am trying to build several VMs from a template.  The template was created and I have ran Sysprep on it before creating the template.  Every time it fails with pretty much the same error message and I can't track down what it really means.

Error (12700)
VMM cannot complete the host operation on the <HOST> server because of the error: 'vm' failed to remove device 'Microsoft:Hyper-V:Synthetic SCSI Controller': Invalid operation (0x80041016). (Virtual machine ID 4D94F1E2-598D-4015-AE50-8BBD7D202D6E)

'vm': The storage controller resource allocation setting data object 'Microsoft:4D94F1E2-598D-4015-AE50-8BBD7D202D6E\7EE2F771-1BB6-4323-989C-12B374FD010C\0' cannot be deleted because one or more storage drive objects are still attached to it. (Virtual machine ID 4D94F1E2-598D-4015-AE50-8BBD7D202D6E)
Unknown error (0x8000)

Recommended Action
Resolve the host issue and then try the operation again.
September 19th, 2014 4:57pm

Hi James,

The error states: cannot be deleted because one or more storage drive objects are still attached to it.
So something seems to be connected to the SCSI controller, probably an ISO.. or are u using shared VHDX on the VM?

What is connected to the SCSI controller?


You could check the SCSI controller using Powershell:

$VM = Get-VM -ID "4D94F1E2-598D-4015-AE50-8BBD7D202D6E"
Get-VMScsiController -VM $VM

Good Luck.




Free Windows Admin Tool Kit Click here and download it now
September 25th, 2014 8:32am

Hi James,

The error states: cannot be deleted because one or more storage drive objects are still attached to it.
So something seems to be connected to the SCSI controller, probably an ISO.. or are u using shared VHDX on the VM?

What is connected to the SCSI controller?


You could check the SCSI controller using Powershell:

$VM = Get-VM -ID "4D94F1E2-598D-4015-AE50-8BBD7D202D6E"
Get-VMScsiController -VM $VM

Good Luck.




September 25th, 2014 8:32am

In my case it was a bad template...

The VM I turned in to a template was joined to a domain and that gave the wired 12700 error every time I tried to deploy it.

Make sure you follow the obscure rules for creating at VM that will later be turned in to a template :)

Free Windows Admin Tool Kit Click here and download it now
April 6th, 2015 3:13pm

In my case it was a bad template...

The VM I turned in to a template was joined to a domain and that gave the wired 12700 error every time I tried to deploy it.

Make sure you follow the obscure rules for creating at VM that will later be turned in to a template :)

April 6th, 2015 7:10pm

In my case it was a bad template...

The VM I turned in to a template was joined to a domain and that gave the wired 12700 error every time I tried to deploy it.

Make sure you follow the obscure rules for creating at VM that will later be turned in to a template :)

Free Windows Admin Tool Kit Click here and download it now
April 6th, 2015 7:10pm

In my case it was a bad template...

The VM I turned in to a template was joined to a domain and that gave the wired 12700 error every time I tried to deploy it.

Make sure you follow the obscure rules for creating at VM that will later be turned in to a template :)

April 6th, 2015 7:10pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics