Monday, July 20, 2015

Fixing Horizon View Linked Clones in WSUS

I recently noticed that only one desktop from each of my VDI pools was showing up in my WSUS client.  The name and IP of the single desktop in each pool would change throughout the day, so I knew all of them were reporting in at different times.  However there was only ever one VM from each pool represented in WSUS at any given time.  After some searching, I learned that each computer that talks to WSUS gets a unique client ID.  Since the base VM I used for each of my desktop pools was joined to my domain and talking to the WSUS server prior to it being cloned out, the unique ID of the base machine was also the unique ID of every VM in each pool.  WSUS lists client machines based on their unique ID, hence only one VM from each pool being visible in the WSUS console.

The solution for me was to stop the Windows Update service on each VDI VM, wipe out the unique ID in the VM's registry, then reboot the VM.  The PowerShell commands I ran on each VM are below.

net stop wuauserv
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientIdValidation /f
net start wuauserv
wuauclt /resetauthorization /detectnow
wuauclt /reportnow

The articles I'd read indicated that after running those commands, a reboot wasn't required.  However the VDI VMs I ran these commands on did not show up in the WSUS console until after a reboot.

Update 08/04/2015:
I've confirmed that you can prevent this from happening in linked-clone desktops by removing the two registry keys from the base VM prior to shutting it down and snapshotting it for use with View Composer.  Once the linked-clone VMs are up and running, they'll contact WSUS and each will get their own unique ID.  This will ensure they all show up individually in the WSUS console.

No comments:

Post a Comment