Thursday, December 19, 2013

vCAC Windows Deployment Stuck at CustomizeOS State

I ran into this issue in my lab recently.  I configured my Windows VM template with the vCAC guest agent (gugent) and then created a blueprint that used the agent to run a script on the deployed machine. 

The machine state would stop every time on "CustomizeOS" and eventually the deployment would time out.  From the Windows machine, I looked at the guest agent log and saw that it would hang every time on Wait for completion of '10_customizeos.bat' with no other progress.



The problem was that the scripts for the guest agent (located in the c:\VRMGuestAgent\site folder) were all "blocked" and could not be executed.  For example, looking at the properties of c:\VRMGuestAgent\site\CustomizeOS\10_customizeos.bat showed that ""This file came from another computer and might be blocked to help protect this computer" - with the option to "Unblock"...



I noticed that the GugentZip_x64 that I downloaded from the vCAC 6.0 appliance was also blocked - this means that the content of the zip would also be blocked when unzipped!

To fix this (or prevent it), simply unblock the zip before extracting.  In my case, I took the extra precaution of removing the vCAC gugent service, deleting the entire c:\VRMGuestAgent and doing a fresh install with my "unblocked" zip.

12 comments:

  1. How are you getting all that information in your log file?
    I performed the unblock on the ZIP file and then installed the service, but it still hangs.

    The log just shows repeated entries of:

    Applilication.MachineQuery: [Information] uuid = blah-blah-blah
    Application: [Debug] uninitializing subsystem: logging subsystem

    ReplyDelete
    Replies
    1. Those log entries mean that the guest agent is running, but no work has been given to the agent by the vCAC server. Very likely that your agent isn't properly configured or is not able to communicate with the server. If you are sure that the agent is configured correctly, make sure that you can communicate with the vCAC server.

      Delete
    2. Should it be pointed to the vCAC appliance or the IaaS? I pointed it to vCAC and imported the self-signed cert as a trusted root cert, but still no luck. I tried a 2012 VM today to see if I have the same issue and it's reporting the same problem.

      Delete
    3. You need to point it to IaaS. gugent receives work from IaaS.

      Delete
  2. nevermind. It appears that VMware documentation strikes again. Easily confusing when it states vCAC server. There is the vCAC Appliance and the IaaS server. Since the Manager Service is an IaaS (after doing research), the agent needs to point to the IaaS server.

    ReplyDelete
  3. What exactly is the IaaS Server? Is this saying point it at the vSphere server?

    ReplyDelete
    Replies
    1. The IaaS server is where you would have installed the vCAC Windows components.

      Delete
  4. Please note some environments do not allow you to use the unblock under properties. If this occurs use the command line utility streams.exe to unblock the file from an elevated command prompt.

    ReplyDelete
  5. If you're using a distributed environment, the vRA agent should be pointed to the IaaS server running the Manager Services. I had problems using the load balancer url, so I normally use the fqdn of the manager services server.

    -Tony

    ReplyDelete
  6. I am trying to run a script using vrmguestagent but somehow script kept in template is not getting executed.

    GuestAgent.log reports below two lines:
    2015-11-13 05:32:17 Application.MachineQuery: [Information] uuid = 8f823b42-b828-0b10-ad88-1cb0fd566b6b
    2015-11-13 05:32:17 Application: [Debug] Uninitializing subsystem: Logging Subsystem


    repeatedly..

    Operating system is windows 7

    blueprint has custom properties this:
    VirtualMachine.Admin.UseGuestAgent = true
    VirtualMachine.Customize.WaitComplete = true
    VirtualMachine.Software0.Name = Add Owner to Local Admin Group
    VirtualMachine.Software0.ScriptPath = C:\VRMGuestAgent\scripts\addusertoadmin.cmd {Owner}

    vRMguest agent is mapped to manager server using command below

    winservice.exe iaas-server.local:443 -p ssl


    Could anyone comment on it why vrmguestagen is not excuting the script


    I performed the unblock on the ZIP file and then installed the service, but it still hangs.


    Cert.pem file is generated which is of 2 KB.

    vcacguestagent servcie is also started.
    pls suggest.

    Thanks.

    ReplyDelete
    Replies
    1. Priyanka, can you confirm that once the VM has been deployed you are able to communicate with the IaaS server? I cannot tell from your description if the cert.pem is being generated during the VM startup or if you had already provided the cert.pem in your template.

      The repeated entry from the gugent log indicates to me that there is some communications problem between the VM and IaaS.

      Delete