Symptoms:
[YYYY-MM-DDTHH:MM:SS: WindowsOsAbstractionLayer: WARN] Command execution failed with exit code: 1060, output: '[SC] EnumQueryServicesStatus:OpenService FAILED 1060: The specified service does not exist as an installed service. [YYYY-MM-DDTHH:MM:SS: GuestCustUtil: DEBUG] SchedulePostCustomizationActivity: Run Command-'HandleCustomizationCompleted<\|/>' [YYYY-MM-DDTHH:MM:SS: GuestCustUtil: INFO] Scheduling post-customization activity to run after reboot... [YYYY-MM-DDTHH:MM:SS: WindowsOsAbstractionLayer: INFO] Executing command: 'C:\Windows\system32\sc.exe query "VMware Guest OS Customization Task" ' [YYYY-MM-DDTHH:MM:SS: WindowsOsAbstractionLayer: WARN] Command execution failed with exit code: 1060, output: '[SC] EnumQueryServicesStatus:OpenService FAILED 1060: The specified service does not exist as an installed service.As an indicator to a wrong syntax for the applied command and hence, the command is not executed on start upon VM deployment.
MMM DD HH:MM:SS VM vpxd[6359]: Event [-1973926310] [1-1] [YYYY-MM-DDTHH:MM:SS.784808Z] [vim.event.CustomizationStartedEvent] [info] [User] [CSI DataCenter 01] [-1973926310] [Started customization of VM. Customization log located at C:/Windows/TEMP/vmware-imc/guestcust.log in the guest OS.] MMM DD HH:MM:SS VM vpxd[6359]: Event [-1973925463] [1-1] [YYYY-MM-DDTHH:MM:SS.227665Z] [vim.event.CustomizationSucceeded] [info] [User] [CSI DataCenter 01] [-1973925463] [Customization of VM succeeded. Customization log located at C:/Windows/TEMP/vmware-imc/guestcust.log in the guest OS.]
This is because of: Issues in the syntax and format of the command/script.
In order to write an executable command to run once upon a VM creation, the following parameters need to be taken into consideration: