Horizon Agent fails to install: “system must be rebooted” error

Nothing is more fun than walking into a client site on a Monday morning and something that’s supposed to be easy (installing Horizon Agent in base image) doesn’t work.

I logged into the Windows 7 virtual desktop image and tried to install the Horizon Agent, however, I received a message stating: “The system must be rebooted before installation can continue.” Seemed simple enough, so I restarted the machine, and tried again. Same error. #facedesk

00.png

Did some digging and found an old KB (1029288). The KB doesn’t say that it is applicable to Horizon View 7.0.x but it solved the issue I was having.

First I tried to uninstall and re-install VMware Tools. No luck.

I went through the registry keys suggested by the aforementioned KB but there weren’t any associated strings associated with the registry keys.

At the very end of the list, two registry keys were listed:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce\
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\

There were values located in HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce, so I deleted all the values, rebooted the machine.

Voilà! I was finally able to get the Horizon Agent to install so I could proceed with my day. It appeared that there was a previously failed installation that was preventing the Horizon Agent from launching its own installer.

Horizon 7 Instant Clones – Folder Structure

When provisioning Horizon 7 Instant Clones, you may have noticed some new folders that were created in the VM and Template view in the vSphere Web Client.

Screen Shot 2016-12-19 at 9.37.17 AM.png

Each of these folders has a specific purpose for Instant Clones:

  • ClonePrepInternalTemplateFolder
    • cp-template-xxxx –  Virtual machine that is a template used to create Instant Clones; this is created from the master image.
  • ClonePrepParentVmFolder
    • cp-parent-xxxx – These virtual machines exist in a 1:1 relationship to the number of ESXi hosts in the cluster. I have a four node cluster, therefore I have 4 clone prep parent virtual machines. Each ESXi host has one of these powered on and in memory in order to provision the Instant Clone VMs.
  • ClonePrepReplicaVmFolder
    • cp-replica-xxxx – This virtual machine is used to create the clone prep parent virtual machines. It will be also used as necessary to provision additional clone prep parent virtual machines.
  • ClonePrepResyncVmFolder
    • If the Instant Clones are updated with a new image, a virtual machine will be created here for staging purposes.