VMM Crash – Error 802

Encountered some strange behaviour within VMM.
Situation:

I created a VM Template “VMTemplate – Windows Server 2012 Datacenter” from a server called “VM – Windows Server 2012 Datacenter”.
The VM Template disk is stored in a folder on the library share.
When I delete the folder (or safely move to a folder outside the library) the library gives the disk the “Warning” status as the disk cannot be found anymore:
vmmcrash1

The VM template is linked to the Virtual Machine, the Virtual Machine is not visible in VMM but it still remains on your disk for the use of the template.
Deleted the pysical location of the “VM – Windows Server 2012 Datacenter” on my CSV.
Deleted the VM Template “VMTemplate – Windows Server 2012 Datacenter”

Created a new Virtual machine with the same name “VM – Windows Server 2012 Datacenter”.
Then created a template from this Virtual Machine.

I Recieved the error the VirtualHardDisk file is already in use by another VirtualHardDisk

vmmcrash4

In the VM pane the server is in “Sysprepping..” state.
vmmcrash5

And all options on the server are greyed out.
vmmcrash7

Here comes the magic:
Restarted the failed “Create Template” job.

vmmcrash6

Event viewer:
Event ID: 1

   System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VirtualManager.Engine.WorkloadCreation.OSConfig.DecryptPasswords(IOSConfigSettings oscfgOverrides)
   at Microsoft.VirtualManager.Engine.VmOperations.NewTemplateSubtask.Initialize()
   at Microsoft.VirtualManager.Engine.TaskRepository.SubtaskBase.Initialize(TaskContext context, Guid subtaskID)
   at Microsoft.VirtualManager.Engine.TaskRepository.Task`1.Start(UserOrGroup authorizeAsUser, UserOrGroup auditAsUser, TaskStartParamsData startData)
   at Microsoft.VirtualManager.Engine.TaskRepository.Task`1.Start(ConnectionProperties properties, String cmdletName)
   at Microsoft.VirtualManager.Engine.Remoting.ClientConnection.RestartTask(Guid taskID, CredentialParameterData credential, Boolean skipLastFailedStep, String cmdletNames, OnBehalfOf obo)
   at SyncInvokeRestartTask(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean

Event ID: 19999

Virtual Machine Manager (vmmservice:4864) has encountered an error and needed to exit the process. Windows generated an error report with the following parameters:
Event:VMM20
P1(appName):vmmservice
P2(appVersion):3.1.6018.0
P3(assemblyName):ImgLibEngine
P4(assemblyVer):3.1.6018.0
P5(methodName):M.V.E.W.OSConfig.DecryptPasswords
P6(exceptionType):System.NullReferenceException
P7(callstackHash):31d
.

So, the VM stays in “Sysprepping..” status, only way to get rid of it is force remove trough Powershell with the following command::

Get-SCVirtualMachine -Name "VM NAME"| Remove-SCVirtualMachine -Force

And delete the missing disk from the VMM Library so this won’t happen again.

Okay, maybe I had it coming…

2 thoughts to “VMM Crash – Error 802”

Leave a Reply

Your email address will not be published. Required fields are marked *