Clear SCVMM Failed Job Status
Hello,
We have one SCVMM 2008 installed managing 2 3nodes Hyper-V clusters.
We noted that often, when we move one VM from one HyperV node to another using SCVMM, the jobs are reported as failed in the console even if the VM is correclty up and running on the target host.

So we'd like to know:
- if it's possible to set a sort of timeout on this operation in order to tell to SCVMM to wait a little bit more before setting the failed job status
- how to reset the job status or delete the job status entry, state that the desired operation was succesfully completed.

Hope to have clearly explaned our needs
RGDS

February 13th, 2009 2:05pm

I'd like to know how to force a "failed job" from the status as well. I tried to migrate a server from VS2005 to a Hyper-V cluster. The migration failed and now it is just stuck there. I ended up logging into VS2005, shutting off the VM and manually moving it. So the server is up and running, but VMM show it on the old server still as "failed job". Wont let me repair it and won't let me delete it. The only work-around I can think of is just unisntalling the host and re-adding it.
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2009 5:32pm

I was able to clear the failed jobs by doing the following:

1. Had to download and install SQL Management Studio Express (since I was using SQL 2005 Express for the SCVMM DB)
http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796

2. After attaching to the MICROSOFT$VMM$ database, i browsed to the following and highlighted it.
Databases > VirtualManagerDB

3. Then I selected New Query

4. I used this query:

UPDATE tbl_TR_TaskTrail SET IsVisible = 0 WHERE TaskState = 'Failed';

5. Then I executed thequery (r click > execute)



So, this basically keeps the failed jobs in the database, but makes it to wherethey are notvisable.




If you want to clear all jobs (make them not visable) use the following:

UPDATE tbl_TR_TaskTrail SET IsVisible = 0



NOTE: You must have SCVMM closed to be able to update the database.
February 18th, 2009 9:20am

I was able to clear the failed jobs by doing the following:

1. Had to download and install SQL Management Studio Express (since I was using SQL 2005 Express for the SCVMM DB)
http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796

2. After attaching to the MICROSOFT$VMM$ database, i browsed to the following and highlighted it.
Databases > VirtualManagerDB

3. Then I selected New Query

4. I used this query:

UPDATE tbl_TR_TaskTrail SET IsVisible = 0 WHERE TaskState = 'Failed';

5. Then I executed thequery (r click > execute)



So, this basically keeps the failed jobs in the database, but makes it to wherethey are notvisable.




If you want to clear all jobs (make them not visable) use the following:

UPDATE tbl_TR_TaskTrail SET IsVisible = 0



NOTE: You must have SCVMM closed to be able to update the database.
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2009 9:20am

Unfortunately, this isn't exactly what is needed.  It hides the failed jobs (not sure how that is useful), but does not apparently change the status of a VM to which a failed job applies.  I tried doing a refresh on the host but it seems to make no difference, and there appears to be no way to refresh a failed VM.

So I still have a VM whose P2V migration job failed, but I was able to fix manually.   The hosts's Hyper-V Manager is happily managing that VM, but SCVMM thinks the VM is in a failed state and won't do a thing with it.

What we really need here is a way to change the status of the VM itself, which was set as a result of a job, not a tool to hide the failed jobs.

I've done a little spelunking, and I note that the table dbo.tbl_WLC_VObject appears to list VM statuses.  There are several columns that seem relevant here, including ObjectState, TaskCheckPoint, FailedJobID and a few others.  It looks like I _should_ be able to change those values directly and fix the problem.  But I'm chicken:  the VM is in production and working fine; I'd rather not screw that up.

I might just be able to change the status (ObjectState) to 0 (I've found other references to people doing that under other circumstances in lab environments).  I'm not sure what to do with the OSID field, though.  It looks like a SID but, checking another VM, doesn't seem to show up in the registry.

And FWIW, I'd call this an SCVMM bug.  It should be possible to refresh/clear/reset the status of VM within the SCVMM user interface.   Right now, the only option within SCVMM seems to be to delete the VM altogether.  Nope, not going to do that.

FWIW2, after seeing that the suggested failed job "fix" didn't help, I decided to unfix it so I can see all jobs (not a fan of information hiding), and ran: UPDATE tbl_TR_TaskTrail SET IsVisible = 1.  It seemed to work fine. 

If anyone has suggestions how to deal with this safely, I'm all ears. 

/kenw

March 1st, 2010 5:01pm

I have a failed machine that I can't remove or repair. Anyone have a thought?

Thanks,

Brian
Free Windows Admin Tool Kit Click here and download it now
March 3rd, 2010 2:57pm

try this

VMM tricks: How to forcefully remove a Virtual Machine from the SCVMM admin console
http://fawzi.wordpress.com/2010/07/01/vmm-tricks-how-to-forcefully-remove-a-virtual-machine-from-the-scvmm-admin-console/

August 20th, 2010 9:24am

to remove failed VM try this...Try going into powershell interface and running the following command:

PS C:\> $VM = Get-VM -VMMServer VMMServer1.Contoso.com | where { $_.VMHost.Name -eq “VMHost01.Contoso.com” -and $_.Name -eq “VM01″ }
PS C:\> Remove-VM -VM $VM -Force

 

http://fawzi.wordpress.com/2010/07/01/vmm-tricks-how-to-forcefully-remove-a-virtual-machine-from-the-scvmm-admin-console/

Free Windows Admin Tool Kit Click here and download it now
September 5th, 2010 8:32pm

to remove failed VM try this...Try going into powershell interface and running the following command:

PS C:\> $VM = Get-VM -VMMServer VMMServer1.Contoso.com | where { $_.VMHost.Name -eq “VMHost01.Contoso.com” -and $_.Name -eq “VM01″ }
PS C:\> Remove-VM -VM $VM -Force

 

http://fawzi.wordpress.com/2010/07/01/vmm-tricks-how-to-forcefully-remove-a-virtual-machine-from-the-scvmm-admin-console/

September 5th, 2010 8:32pm

CAUTION!

Running this statement against the VMM db will cause TaskGC to no longer clean up jobs!

The command below, mentioned above, does not actually remove any jobs from the database. It merely causes them to not appear. This results in an ever increasing log of jobs that will not be correctly removed with TaskGC. One customer I worked with performed this operation and ended up with hundreds of thousands of jobs in the database. The highest number you would want is around ten thousand.

Do not use this command:

UPDATE tbl_TR_TaskTrail SET IsVisible = 0 WHERE TaskState = 'Failed';

The right way to clean up jobs:

SCVMM service may consume high memory or CPU utilization

http://blogs.technet.com/b/mbriggs/archive/2009/12/08/scvmm-service-may-consume-high-memory-or-cpu-utilization.aspx?wa=wsignin1.0

_______________________________________________________________________ 

Best Regards, Jonathan Jordan [MSFT] – Posting is provided "AS IS" with no warranties, and confers no rights

_______________________________________________________________________

Free Windows Admin Tool Kit Click here and download it now
September 8th, 2010 1:44pm

Thanks so much.

I've cleared several failed VMs per you pointed out.

July 3rd, 2015 5:57am

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

Other recent topics Other recent topics