I have been banging my head against this particular brick for nearly 4 days now, We need to get the Liquidware Labs Stratusphere UX agent working in the deployed linked clones.
This is a synopsis of what as been done so far:
Snap shot taken of Gold image.
Connector ID agent installed to Image, and confirmed that the agent is talking to the hub.
VMwareView_MasterImagePrep.bat file run to remove the "crt" file from the agent directroy structure and stop and change the LWL Stratusphere services to manual.
This is the script that LWL provide:
@echo off
: disable auto start of Liquidware Labs services
cd /d %~dp0
set checkpoint="tntgrd"
sc config "tntgrd" start= demand
if %ERRORLEVEL% NEQ 0 (
goto error
)
set checkpoint="tntuidsvc"
sc config "tntuidsvc" start= demand
if %ERRORLEVEL% NEQ 0 (
goto error
)
set checkpoint="tntupdsvc"
sc config "tntupdsvc" start= demand
if %ERRORLEVEL% NEQ 0 (
goto error
)
: clean driver
set checkpoint="idcontrol"
"%CD%\..\idcontrol.exe" clean
if %ERRORLEVEL% NEQ 0 (
goto error
)
echo Done!
goto done
:error
echo Error level: %ERRORLEVEL%. Failed to configure %checkpoint%.
echo Make sure you run this batch file as administrator.
:done
pause
exit
The following files are placed in a newly created directory called scripts at the root of the C: drive.
VMWareView_PostSyncScript.bat
VMwareView_PostSync-Worker.bat.
The first file moves to the working folder and then calls the second batch.
@REM VMWareView Composer sometimes only runs the first line in the post sync script
@REM Use a worker batch file to work around this issue.
cd /d %~dp0
cmd.exe /c VMWareView_PostSyncScript-Worker.bat
This script has been modified to read as below to simplify the helper script:
cd /script
cmd.exe /c VMWareView_PostSyncScript-Worker.bat
The second batch file changes the services to auto and starts them.
@REM VMWare Views Composer sometimes only runs the first line in the post sync script.
@REM We work around this by using a proxy batch file that just calls this one
@echo Configuring CID Key services to start automatically...
@sc config "tntgrd" start= auto
@sc config "tntuidsvc" start= auto
@sc config "tntupdsvc" start= auto
@sc start tntgrd
@sc start tntuidsvc
@sc start tntupdsvc
@echo Completed!
@echo Please verify services are in Running state
There was no customization to this script.
IPconfig /release was then run to remove the IP Address from the Gold Master and a further snapshot was taken. The pool is then edited to add a Post Sync file to enable the services post provisioning.
I have tried the following different methods to call the script
c:\scripts\VMWareView_PostSysncScript.bat
call /c c:\scripts\VMWareView_PostSysncScript.bat
start c:\scripts\VMWareView_PostSysncScript.bat
I have even attempted to use psexec
psexec -hsi cmd.exe /c c:\scripts\VMwareView_PostSyncScript.bat
However when rebalancing, we always receive the following error:
View Composer agent initialization state error (19): Failed to execute postsync script (waited 0 seconds)
When checking the %system_drive%\Windows\Temp\vmware-viewcomposer-ga-new.log file, we see the following in there:
2016-01-22 15:53:52,245 [1420] INFO Ready - [Ready.cpp, 128] Running the PostSync script: "start" C:\script\VMwareView_PostSyncScript.bat with timeout: 20000
2016-01-22 15:53:52,245 [1420] DEBUG Wow64FsRedirectionOff - [Wow64FsRedirectionOff.cpp, 109] Successfully disabled WOW FS redirection.
2016-01-22 15:53:52,248 [1420] FATAL Guest - [Guest.cpp, 486] RunScript: Unable to execute script: 006FACB0 , error = 2
2016-01-22 15:53:52,680 [1420] DEBUG Wow64FsRedirectionOff - [Wow64FsRedirectionOff.cpp, 135] Successfully reverted WOW FS redirection.
2016-01-22 15:53:52,828 [1420] FATAL Ready - [Ready.cpp, 141] Failed to run PostSyncScript: "start" C:\script\VMwareView_PostSyncScript.batUnable to create process for the scriptError 2 (0x2): The system cannot find the file specified.
Which seems to indicate that the file cannot be found, however when visually checking the VM guest, we can plainly see the files in the correct location.
Manually running the files correctly run the scripts and adds the machine to the Stratusphere Hub inventory. so communications between the guest and the hub is not a factor.