Support Tip: Updating DHCP agents after applying VMM 2012 R2 Update Rollup 3

Support Tip: Updating DHCP agents after applying VMM 2012 R2 Update Rollup 3

  • Comments 2
  • Likes

~ Alvin Morales

ToolsHi everyone, with the release System Center 2012 R2 Virtual Machine Manager Update Rollup 3 (VMM 2012 R2 UR3) the DHCP agent was updated. The most important fix in this agent is the mitigation of an issue that can cause delays of up to 45 seconds in acquiring an IP address when using private networks. You can read more about this here:

http://blogs.technet.com/b/scvmm/archive/2014/07/31/support-tip-vms-deployed-to-hyper-v-networks-experience-delays-acquiring-an-ip-address-after-reboot.aspx

The update of the DHCP agent requires that you install it on all hosts. This can be done easily using System Center 2012 Configuration Manager but I would like to illustrate how you can accomplish this with VMM 2012 by using the Invoke-SCScriptCommand.

First, create a custom resource by adding a new folder to a library share named DHCPAGENT.cr.

clip_image002 clip_image004

Note: If you are not familiar with custom resources, review the second note in the link below for details:

http://technet.microsoft.com/library/gg610598.aspx

Copy DHCPextn.msi from C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\SwExtn\ to the DHCPAGENT.cr folder, then refresh the library.

At this point you can right click any host and select the Run script command. In the executable program type cmd.exe, and in the parameters specify /q /c msiexec /i dhcpextn.msi. Select the resource package you created in the library and a Run As account (it is recommended that you use the same Run As account that you use to manage hosts).

If you want to run this against all hosts at the same time, you can use the sample PowerShell script below. I used get-scvmmmanagedcomputer instead of get-scvmhost to illustrate some more commandlets:

clip_image005

NOTE: If you do not have a specific run as account associated with your hosts, then you must replace $VMHost.RunAsAccount with a valid run as account name.

I hope this information helps you deploy this update in a quick and easy way, and special thanks to Mark Stanfill for his help in reviewing this post.

Alvin Morales | Senior IT Service Ops | Microsoft

Get the latest System Center news on Facebook and Twitter:

clip_image001 clip_image002

System Center All Up: http://blogs.technet.com/b/systemcenter/
System Center – Configuration Manager Support Team blog: http://blogs.technet.com/configurationmgr/
System Center – Data Protection Manager Team blog: http://blogs.technet.com/dpm/
System Center – Orchestrator Support Team blog: http://blogs.technet.com/b/orchestrator/
System Center – Operations Manager Team blog: http://blogs.technet.com/momteam/
System Center – Service Manager Team blog: http://blogs.technet.com/b/servicemanager
System Center – Virtual Machine Manager Team blog: http://blogs.technet.com/scvmm

Windows Intune: http://blogs.technet.com/b/windowsintune/
WSUS Support Team blog: http://blogs.technet.com/sus/
The AD RMS blog: http://blogs.technet.com/b/rmssupp/

App-V Team blog: http://blogs.technet.com/appv/
MED-V Team blog: http://blogs.technet.com/medv/
Server App-V Team blog: http://blogs.technet.com/b/serverappv

The Forefront Endpoint Protection blog : http://blogs.technet.com/b/clientsecurity/
The Forefront Identity Manager blog : http://blogs.msdn.com/b/ms-identity-support/
The Forefront TMG blog: http://blogs.technet.com/b/isablog/
The Forefront UAG blog: http://blogs.technet.com/b/edgeaccessblog/

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Thanks for this. Could you please add the code so kt can be easily copy pasted?
    Thx

  • The Code:
    $hosts = Get-SCVMMManagedComputer | where {($_.StateString -eq 'Responding') -and ($_.AgentVersion -ne '0.0') -and ($_.RoleString -match 'Host')}
    foreach ($host in $hosts){
    if($host.RoleString -eq 'Host'){
    $ScriptSetting = New-SCScriptCommandSetting
    Set-SCScriptCommandSetting -ScriptCommandSetting $ScriptSetting -WorkingDirectory '' -PersistStandardOutputPath '' -PersistStandardErrorPath ''-MatchExitCode '[1-9][0-9]*' -FailOnMatch -RestartOnRetry $false -MatchStandardError '[1641][3010][3011]' -RestartScriptOnExitCodeReboot -AlwaysReboot $false
    $LibraryResource = Get-SCCustomResource -Name dhcpagnt.cr
    $VMHost = Get-SCVMHost $Host.Name
    $RunAsAccount = Get-SCRunAsAccount -Name $VMHost.RunAsAccount
    Invoke-SCScriptCommand -Executable 'cmd.exe' -TimeoutSeconds 120 -CommandParameters '/q /c msiexec /i DHCPExtn.msi /quiet /norestart /lv* c:\dhcpagent.log' -VMHost $VMHost -ScriptCommandSetting $ScriptSetting -LibraryResource $LibraryResource -RunAsAccount $RunAsAccount -RunAsynchronously
    }
    else {
    Write-Output "Role of Computer $($host.Name) is $($host.RoleString). Only Computers with the role Host will be updated."
    }
    }