I'm able to instant clone VMs using View Connection Server 7.11 and View Agent 7.11 . I have cloneprep power-off script added in View pool settings. But looks clonePrep script is not working as expected. I want to debug issue why the script is not using by checking the vmware-viewcomposer-ga-new.log file. But the file is not generating on VM at location C:\Windows\Temp\ . I already set cloneprep.debug.mode = "ON" on the master VM image and took snapshot with these settings. I have vGPU assigned to the master image. I have checked another customer's setup, their also I have not seen vmware-viewcomposer-ga-new.log file. Is the log file location got changed? Why this log file is not generating? I have applied all windows update on VM [Windows 10 RS5 ].
The View Composer Guest Agent log is located in the Windows Temp directory on the linked-clone desktop at:
%system_drive%\Windows\Temp\VMware\vmware-viewcomposer-ga-new.log
This log should record the start and end time of script execution and contains output or error messages.
Have you enabled VMware View Script Host service on the horizon 7 desktop virtual machine image?
>>Have you enabled VMware View Script Host service on the horizon 7 desktop virtual machine image?
Thanks a lot for reply. Does this service needed to run cloneprep power-off script?
If cloneprep settings are on in DesktopPool then why this service not start automatically? Do you have any document that cloneprep needs this service to be running on VM?
Also, We have tested the View Agent 7.7 on the same master VM and cloneprep power-off script executed successfully. Also, log file generated at C:\Windows\Temp\vmware-viewcomposer-ga-new.log which is showing debug prints.
Is there any bug in the latest view agent 7.11? Can you test from your side too?
Hi Sivaprasad,
We tested all View versions. 7.10 and 7.9 don't have this issue. Log file is created and cloneprep script executed successfully. But on 7.11 no logs and cloneprep script is not executing. Enabled VMware View Script Host service on master image, created Instant Clone VMs but still can not see log file created under both locations C:\Windows\Temp\ and C:\Windows\Temp\Vmware. Interestingly, VMware View Script Host service is in disabled state on instant clone VMs. Can you please help in this?
Hi,
We have exactly the same issue with 7.11 on Windows 10 1809 latest build (17763.1039). No log file gets created and the post clone script does not run
Hi Tony, Thanks for the confirmation that you also have the same issue as I reported.
Hi VMware experts,
Please fix this issue ASAP as many customers using ClonePrep script are affected.
If your seeing this and you have support open an SR, while this section of the forums has more active vmware employees then others, I'm not sure they catch all of the posts.
Though kgsivan has the vm employee badge, I'd still open an SR, hopefull he is sending this to engineering.
Hi VMware experts,
Looks VMware started fixing this issue of ClonePrep Power Off script not working. What is ETA and in which release fix will be added?
Anyone got this issue solved? I upgraded to Horizon Agent 7.12 but still the same issue. Post-sync scripts still don't work...
No problems with 7.10 and older...
We also just upgraded to Horizon 7.12 and are having the same issue running a postsync script. We are also not seeing the expected log file.
Instant Clone agent initialization state error (19): Failed to execute postsync script (waited 5 seconds)
Confirmed the postsync script is (still) on the master image. Guest Customization settings for the desktop pool have not changed. This was working without issue on Horizon 7.10.
Cloneprep log originally found in C:\Windows\Temp\vmware-viewcomposer-ga-new.log have been revoked in View 7.12.
It is now merged with 'debug' log file found in agent machine at C:\ProgramData\VMware\VDM\Logs\Debug*.log. You can check debug log file to check cloneprep related activities.
Regarding the failure of post-sync script, If you use a scripting language that needs an interpreter to run the script, the script path must start with the interpreter executable. For example, instead of specifying C:\script\myvb.vbs, you must specify C:\windows\system32\cscript.exe c:\script\myvb.vbs.
Thank you for the new log file location and information.
We are using a .cmd file for our post sync script and have it set to "c:\postsync.cmd" under Guest Customizations. It has always worked until upgrading to 7.12.
I did try placing this in another folder (c:\Scripts\postsync.cmd) and also tried using a blank/empty test.cmd file. This had no effect.
Other observations I've found and from the log file. Looks like it's not able to secure the post sync file. In 7.10 the file would be moved from it's original location C:\postsync.cmd to C:\Windows\Temp\VMware\postsync.cmd along with the log file(s). Since the log files have now been moved to ProgramData can we confirm where the postsync.cmd script should be moved to when secured in order to run with Horizon 7.12?
It appears our postsync script is not secured by moving to another location. It is still in the original location C:\. Since we're not finding it where it was under 7.10 C:\Windows\Temp\VMware or under C:\ProgramData\VMware and it's still present in the original location I can only assume this would be a possible explanation for issues here.
2020-04-23T12:56:39.155-04:00 WARN (0BD8-083C) <2108> [vmware-svi-ga] svmga::common::windows::registry::ExistingRegKey::ReadDwordValue(): CloneMachinePasswordChanged Does Not Exist
2020-04-23T12:56:39.155-04:00 WARN (0BD8-083C) <2108> [vmware-svi-ga] svmga::common::windows::registry::ExistingRegKey::ReadDwordValue(): ChangeCloneMachinePassword Does Not Exist
2020-04-23T12:56:39.155-04:00 WARN (0BD8-083C) <2108> [vmware-svi-ga] svmga::common::windows::registry::ExistingRegKey::ReadDwordValue(): CloneCustomizationCompleted Does Not Exist
2020-04-23T12:56:39.155-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::OkToCompleteCustomization(): No flags set, completing customization
2020-04-23T12:56:39.155-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::CompleteCustomization(): Completing Clone Customization...
2020-04-23T12:56:39.155-04:00 WARN (0BD8-083C) <2108> [vmware-svi-ga] svmga::common::windows::registry::ExistingRegKey::ReadDwordValue(): PostCustScriptSecured Does Not Exist
2020-04-23T12:56:39.155-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::RunPostCustomizationScript(): Failed To Execute Post-Customization Script. It Was Not Secured
2020-04-23T12:56:39.155-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::SetCustomizationState(): Set guestinfo.clone.CustomizationState to error
2020-04-23T12:56:39.155-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::util::NotifyViewAgent::MarkCustomizationFailed(): Set NotifyVdmStatusValue to CustomizationFailed(5)
2020-04-23T12:56:39.170-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::CustomizeClone(): CompleteCustomization Failed
2020-04-23T12:56:39.170-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] Support::GetTotalCloneCustomizationTime(): Result: 0
2020-04-23T12:56:39.170-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::CustomizeClone(): Total Clone Customization Time: 12781ms
2020-04-23T12:56:39.170-04:00 WARN (0BD8-083C) <2108> [vmware-svi-ga] svmga::common::windows::registry::ExistingRegKey::ReadDwordValue(): CloneCustomizationCompleted Does Not Exist
2020-04-23T12:56:39.170-04:00 DEBUG (0BD8-083C) <2108> [vmware-svi-ga] svmga::core::windows::Guest::CustomizeVM(): Clone Customization Failed
2020-04-23T12:56:39.733-04:00 ERROR (14F4-14F8) <Main Thread> [wsnm_jms] View Composer agent has failed customization
Could you confirm if you are using double quotes in the location of the script in the UI under desktop pool settings? If not, you might be hitting a known bug in horizon 7.11 and 7.12. Perhaps the script is not being called in secure way.
As of now to workaround it, you can call a wrapper script that calls the target script with the correct parameter. A wrapper script just needs to have the full path to the target script. Ideally it should be installed in Windows\Temp\VMware for security.
For additional details and permanent fix please submit a ticket with VMware support.
I am not using double quotes in the UI under Guest Customization for the desktop pool settings.
Post-synchronization script name: c:\postsync.cmd
Had no issues with this previously so can assume this is the known bug in 7.11 and 7.12 you referenced.
I will try the workaround and post results. For the wrapper script should this be another script calling the postsync script? Or the cmd.exe executable calling the script as you called out in another post?
c:\wrapperscript.cmd (which calls c:\postsync.cmd)
c:\Windows\System32\cmd.exe c:\postsync.cmd
I opened up a SR the other day but the tech has not responded with next steps, information, or workarounds at this point. Do you have a specific bug ID or internal note on this I can reference in my SR?
VMware will also want to update documentation for Horizon 7.11 and 7.12 if the log file location has been updated since it still states the following:
ClonePrep Script Logs
ClonePrep writes messages to a log file. The log file is C:\Windows\Temp\vmware-viewcomposer-ga-new.log.
You are correct. The doc has not been updated with new log location causing the confusion and yes your wrapper script looks good.
Please check your inbox.
Still getting the same error.
Instant Clone agent initialization state error (19): Failed to execute postsync script (waited 5 seconds)
Here is the exact setting I am using.
c:\Windows\System32\cmd.exe c:\postsync.cmd
Tried moving the postsync.cmd script to another folder, C:\Scripts - same error
Tried using a new empty script test.cmd under both C: and C:\Scripts - same error
As an aside, the UI will not allow a double or single quote in the post-synchronization name field (or other fields).
Current SR# for reference is 20119373304
So this is what worked for me as a workaround. Hope this can help anyone else out.
I had to create the VMware folder under C:\Windows\Temp and copy our postsync script (postsync.cmd) into this location (C:\Windows\Temp\VMware). Once the script was there the desktop build completed successfully. To add I kept the desktop pool Guest Customization post sync setting pointed to c:\postsync.cmd (although I'm guessing I could have just pointed directly to Windows\Temp\VMware).
Seems like a bug to me where it's not moving the script to C:\Windows\Temp\VMware as it has done previously.
Hi,
Looks like this needs some engineering clarification, so I am here to help.
The issue is not caused by customers adding quotes, but rather something adding them internally in the VMware product. This matter has been fully resolved in 7.12 and later. If you are transitioning from Composer to Instant Clones and have previously configured scripts, you may still find issues in 7.12 and earlier depending on what you have configured. To clarify this further, Composer supports the following scenario, which is not yet supported in Instant Clones 7.12:
<interpreter path> <script path>
e,g, C:\Windows\System32\cscript.exe C:\Temp\Script.vbs
You can very easily work-around this by creating either a cmd or bat file, e.g. C:\Temp\Script.bat, and within it you can use the above scenario. Please be sure to use absolute paths inside your scripts.
Erik