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:
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
In the VM pane the server is in “Sysprepping..” state.
And all options on the server are greyed out.
Here comes the magic:
Restarted the failed “Create Template” job.
Event viewer:
Event ID: 1
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
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::
And delete the missing disk from the VMM Library so this won’t happen again.
Okay, maybe I had it coming…
Thanks for this post! Solved my problem 🙂
Thanks for solution! Same problem today. VMM 2012 SP1