none
Unable to remove VMM agent from Hyper-V host

    Question

  • Hello, I have this weird issue. The VMM agent won't let me uninstall in from the host. The agent is there, its working, but there is no entry in add\remove programs (or registry or wmi) for VMM agent. So if I try to uninstall\repair\install new agent it fails to remove the old agent.

    Edit for clarification: I tried updating Agent to UR7 (from VMM Console, I have ur6 agent now), it failed, I started digging deeper to find this out. I'm Running SCVMM 2012 R2 UR7

    Any help appreciated. Thanks in advance.


    The data above this text is pseudorandom, brace yourselves.



    Tuesday, August 18, 2015 10:21 AM

Answers

  • Ok, so after almost 2 hours on the phone with MS Support this one is solved. Basically what we did:

    1. We imported registry folders from the host where agent was present and working normally
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\GUID
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\GUID
    HKEY_CLASSES_ROOT\Installer\Products\GUID
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EE6A3726-D270-4AD1-9EFD-CFD982D2313C}
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{ab8e1320-965a-4cf9-9c07-fe25378c2a23}

    2. We changed build number to the one from UR6 (something.8002 or whatever, you can google it). In description and in hex (version string) and path to msi under C:\Windows\Installer. You can figure out the MSI you need by size, for example.

    3. The program was still missing in Add\Remove but we were able to remove program with https://support.microsoft.com/mats/program_install_and_uninstall (don't forget to shutdown SCVMMAgent service before doing so).

    4. We used the SC utility to delete VMM Agent service (sc delete SCVMMAgent)

    5. Renamed\Deleted VMM Agent folder in program files

    6. We manually installed agent.

    7. Reassociated host from VMM console

    Phew. One heck of a ride.


    The data above this text is pseudorandom, brace yourselves.

    • Marked as answer by 4c74356b41MVP Tuesday, August 25, 2015 12:27 PM
    Tuesday, August 25, 2015 12:27 PM

All replies

  • There should be an option when pushing the agent to 'reassociate' the host with this SCVMM server, that forces an uninstall scrub.

    However, my experience has always been that the agent regisers in add-remove programs.

    This might be helpful: http://itproctology.blogspot.com/2012/02/uninstalling-scvmm-agent-from-server.html


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

    Tuesday, August 18, 2015 2:57 PM
    Moderator
  • Been there, saw that. There is no entry for VMM agent in WMI or registry. There is an entry for VMM DHCP Server for example, but not for agent.

    The data above this text is pseudorandom, brace yourselves.

    Tuesday, August 18, 2015 3:10 PM
  • I guess that I am not clear what you are experiencing.

    When SCVMM places a Hyper-V host under management the SCVMM agent is pushed to the remote Hyper-V host.  (in the most common way).

    Normally, this fails because the local admin share is not active on the Hyper-V Server ( Add-WindowsFeature FS-FileServer ) or because DNS does not resolve.

    If the install begins and fails part way through for some other reason, SCVMM normally cleans it up pretty well and leaves no trace beyond a temp file.

    Also, when a host is removed from management, the SCVMM agent is removed.

    The SCVMM DHCP Virtual Switch Extension is something entirely different and is left behind to avoid breaking the virtual switch.


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

    Tuesday, August 18, 2015 3:22 PM
    Moderator
  • Well, whats the difference between issuing a "remove" command from a VMM console VS "update an agent" command from a VMM console if it can't remove the agent?

    I tried updating manually and through the console, no success.

    I told you about VMM DHCP Server just as an example.

    I've tried regedit (no entry in either install or uninstall) and wmi (get-wmiobject -class win32_product or something like that). Nothing.

    The host is part of the FC cluster, is there a way to remove it from VMM without removing it from cluster? Like powershell? Will it reboot the host if I issue -force command? What happens if host gets removed from the DB with the force command but the agent doesn't?


    The data above this text is pseudorandom, brace yourselves.


    Tuesday, August 18, 2015 3:31 PM
  • Lets back up.

    What was the job error that you received when SCVMM pushed out the Host Agent update?

    You should be able to go back through the SCVMM job logs and find that.

    Can you remove an individual cluster node from management by SCVMM without removing it from the cluster?  Not that I am aware of.

    You could re-add the cluster to SCVMM using the reassociate option when the agent is pushed.  That is the only thing that is coming to mind at the moment.

    I have screwed up my SCVMM environment numerous times.  And the thing I always try to avoid is adding a host manually, because the pointers in the SCVMM database always get messed up.

    At this time I am expecting some type of notification in SCVMM that a host in the cluster is not under management.  And some remediation step option when you select that host.


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

    Tuesday, August 18, 2015 3:47 PM
    Moderator
  • Hi Sir,

    >> The VMM agent won't let me uninstall in from the host. The agent is there, its working, but there is no entry in add\remove programs (or registry or wmi) for VMM agent.

    Please check if  the service "System Center virtual machine manager Agent " is still running on that host .

    Also please check the Host status in VMM .

    Best Regards,

    Elton Ji


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com .

    Thursday, August 20, 2015 4:46 AM
    Moderator
  • Hello, sorry for no replies, I was away yesterday. So the service is there, the agent is running, in SCVMM console it (host) shows as "ok". However its not in the wmi or registry.

    The data above this text is pseudorandom, brace yourselves.

    Thursday, August 20, 2015 7:21 AM
  • Folks? Any ideas? xD

    The data above this text is pseudorandom, brace yourselves.

    Thursday, August 20, 2015 9:05 PM
  • Guys?

    The data above this text is pseudorandom, brace yourselves.

    Monday, August 24, 2015 7:07 AM
  • Hi Sir,

    Let's turn back to the original purpose .

    You are going to update the VMM agent for cluster nodes , right ?

    If you updated the UR then the you also need to install  new version VMM agent for hyper-v hosts .

    We can use the official solution:

    https://technet.microsoft.com/en-us/library/Hh430984.aspx

    Best Regards,

    Elton Ji


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com .

    Tuesday, August 25, 2015 8:07 AM
    Moderator
  • Sorry, I guess I wasn't clear enough. I cannot install new agent (ur7) on top of old (ur6) agent because to install UR7 it needs to uninstall UR6 agent first and it fails to do so. I've also tried manually deleting old agent no use.

    /msiexec /x {GUID taken from other working host}
    /msiexec /x \\path_to_vmm\bla-bla-\agent\x64\vmmagent.msi
    Also tried running installer to update or to repair or to remove. Everything fails with error no such product\product not found.

    I tried importing registry from working hosts...
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{ab8e1320-965a-4cf9-9c07-fe25378c2a23}
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders

    and this thing https://support.microsoft.com/mats/program_install_and_uninstall

    nothing so far


    The data above this text is pseudorandom, brace yourselves.





    Tuesday, August 25, 2015 9:55 AM
  • Ok, so after almost 2 hours on the phone with MS Support this one is solved. Basically what we did:

    1. We imported registry folders from the host where agent was present and working normally
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\GUID
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\GUID
    HKEY_CLASSES_ROOT\Installer\Products\GUID
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EE6A3726-D270-4AD1-9EFD-CFD982D2313C}
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{ab8e1320-965a-4cf9-9c07-fe25378c2a23}

    2. We changed build number to the one from UR6 (something.8002 or whatever, you can google it). In description and in hex (version string) and path to msi under C:\Windows\Installer. You can figure out the MSI you need by size, for example.

    3. The program was still missing in Add\Remove but we were able to remove program with https://support.microsoft.com/mats/program_install_and_uninstall (don't forget to shutdown SCVMMAgent service before doing so).

    4. We used the SC utility to delete VMM Agent service (sc delete SCVMMAgent)

    5. Renamed\Deleted VMM Agent folder in program files

    6. We manually installed agent.

    7. Reassociated host from VMM console

    Phew. One heck of a ride.


    The data above this text is pseudorandom, brace yourselves.

    • Marked as answer by 4c74356b41MVP Tuesday, August 25, 2015 12:27 PM
    Tuesday, August 25, 2015 12:27 PM
  • Funny thing, after I tried updating agent to UR8 same thing happened. So i reinstalled windows ;)

    I guess sometimes it just happens...


    The data above this text is pseudorandom, brace yourselves.

    Wednesday, December 9, 2015 11:31 AM