locked
SCVMM 2012 R2 - HyperV Host pending state after removal RRS feed

  • Question

  • Hello,

    I am having issue removing a old hyperv host from the SCVMM 2012 R2. The host doesn't exit anymore so any communication with it is impossible. I tried few steps, though still no result.

    Lastly I even tried the force removal from powershell, got a strange error. Any help would be greatly appreciated.

    Thank you
    Singh

    PS C:\> $VMHost = Get-SCVMHost -ComputerName "WS12-HYPERV-01.contoso.local"
    PS C:\> Remove-SCVMHost -VMHost $VMHost -Force -Confirm

    Confirm
    Are you sure you want to perform this action?
    Performing operation "Remove-SCVMHost" on Target "ws12-hyperv-01.contoso.local".
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
    Remove-SCVMHost : VMM encountered a critical exception and created an exception report at
    C:\ProgramData\VMMLogs\SCVMM.7a32b60d-5469-49ce-b413-b30271e2b62b\report.txt. (Error ID: 20413)

    See the report for more details and search user forums for well-known failure root causes for self-help.

    To restart the job, run the following command:
    PS> Restart-Job -Job (Get-VMMServer scvmm.contoso.local | Get-Job | where { $_.ID -eq
    "{ab31fda6-a406-4b71-883d-ae2f7b774e57}"})
    At line:1 char:1
    + Remove-SCVMHost -VMHost $VMHost -Force -Confirm
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ReadError: (:) [Remove-SCVMHost], CarmineException
        + FullyQualifiedErrorId : 20413,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.RemoveHostCmdlet




    • Edited by reensi Saturday, August 16, 2014 3:46 PM none
    Saturday, August 16, 2014 3:44 PM

All replies

  • And, what does the report tell you?


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    Monday, August 18, 2014 3:16 PM
  • Hi Brian,

    This is what i see in the report. However, the database seem to be working fine.

    This is just the partial report.

    Thank you
    Singh

    ----------------------------------------------------
    ------------------- Error Report -------------------
    ----------------------------------------------------
    Error report created 8/20/2014 2:08:43 PM
    CLR is not terminating

    ----------------------------------------------------
    --------------- Bucketing Parameters ---------------
    ----------------------------------------------------
    EventType=VMM20
    P1(appName)=vmmservice.exe
    P2(appVersion)=3.2.7672.0
    P3(assemblyName)=Utils.dll
    P4(assemblyVer)=3.2.7672.0
    P5(methodName)=Microsoft.VirtualManager.DB.SqlRetryCommand.ExecuteNonQuery
    P6(exceptionType)=Microsoft.VirtualManager.DB.CarmineSqlException
    P7(callstackHash)=7488

    SCVMM Version=3.2.7672.0
    SCVMM flavor=C-buddy-RTL-AMD64
    Default Assembly Version=3.2.7672.0
    Executable Name=vmmservice.exe
    Executable Version=3.2.7510.0
    Base Exception Target Site=8781317360088
    Base Exception Assembly name=System.Data.dll
    Base Exception Method Name=System.Data.SqlClient.SqlConnection.OnError
    Exception Message=Unable to connect to the VMM database because of a general database failure.
    Ensure that the SQL Server is running and configured correctly, then try the operation again.
    EIP=0x000007fc9e7132c8
    Build bit-size=64


    ----------------------------------------------------
    ------------ exceptionObject.ToString() ------------
    ----------------------------------------------------
    Microsoft.VirtualManager.DB.CarmineSqlException: Unable to connect to the VMM database because of a general database failure.
    Ensure that the SQL Server is running and configured correctly, then try the operation again. --->

    ...

    Wednesday, August 20, 2014 6:23 PM
  • Interesting.
    Did you already check the SQL logfiles for errors?

    You could so some Debug tracing on VMM:

    http://support.microsoft.com/kb/2913445/

    Or you could analyze the query's that are executed from VMM with "SQLperformance analyzer".

    Hope it will get you any further.


    Thursday, August 21, 2014 7:35 AM
  • Hi,

    I've experienced similar issues in the past mostly due to locks in the SQL database.

    You could open SQL management studio and see if any locks exist and persist by using the activity monitor. If locks exist, try to restart the SCVMM service which should clean these up.

    If the service won't shutdown, which could happen because of the SQL locks, look for the blocked by SQL session which is causing the locks and terminate it. Probably this will be a chain so you have to look for the session with the lowest session ID.

    If this does not solve your problems, you could delete the host from the database by editing it manually. For some good reference see http://blogs.technet.com/b/mbriggs/archive/2009/05/13/how-to-manually-remove-a-host-from-the-vmm-database.aspx

    HTH, Ben

    • Proposed as answer by Ben GelensMVP Friday, September 12, 2014 1:15 PM
    Friday, September 12, 2014 8:01 AM