When Guest OS customization is not successful, it can sometimes be difficult to determine where the issue originates. By following the steps in this article, you can collect all the relevant information Embotics® needs to perform an audit of what’s occurring when services are being deployed. This audit will attempt to match up the events published in vCenter with the activity in vCommander, and as well look for other evidence of problems with the actual customization itself.
The first thing to understand is where the customization action is being introduced. In vCommander, you can apply customization specifications either to a component in the Service Catalog:
or during a workflow step in a Completion Workflow:
Only one of these two methods should be used for any service, to ensure there is no collision between them. If you suspect a collision, share your configuration with Embotics Technical Support or request a remote session to review your configuration.
vCommander Debug Diagnostics
By default, vCommander diagnostics collect only the information that’s going to be most useful, most often. This prevents excessive logging, which otherwise could impact performance or make the log files more difficult to parse. However, sometimes lower-level information is required, and you have to update the debug level of the logging to capture it.
In this case, the line to use to get low-level information about customization is: log4j.logger.com.embotics.vlm.service.mediator=DEBUG.
- Add the debug line above to the log4j.properties file.
- Create a new request for the service that has been failing to customize properly. Allow it to complete unsuccessfully.
- Send a copy of the diagnostics to Embotics Technical Support.
- Remove the debug line from the log4j.properties file. Alternatively, precede the line with an octothorpe (#) to comment it out.
The next step is to to check the vCenter events for the deployed VM which failed to customize. You can do this with either the web client or the legacy client.
To get the logs with the web client:
- Browse to the VM under scrutiny and switch to the Monitor tab.
- Click Events.
- Leave the default options selected and click Generate CSV Report.
- Click Save.
To get the logs with the legacy client:
- Browse to the VM under scrutiny and switch to the Tasks & Events tab.
- Click Events to define the view.
- Click the first row, hold [SHIFT] and click the last row to select all. Right-click the highlighted rows and choose Copy to Clipboard.
- Paste into a text file, and save.
Guest Customization Log
The guest OS itself will also have a customization log which can be useful for investigations. You can refer to the events from the previous section to confirm where you’ll find the log file on the deployed VM:
The configuration of the source template is vital for ensuring customization success. In particular, not the following:
- Customization Limit Modern versions of Windows allow you to run sysprep 3 times only, to help manage how often Windows Activation is reset. Refer to Microsoft’s Sysprep, Skip Rearm, and Image Build Best Practices for more information. Alternatively, you can use the Windows Registry Editor to set HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to the value 7. Changes to Windows registry settings are performed at your own risk.
- Security AgentsSome Antivirus and security agents will prevent successful customization as the activity is detected as disallowed changes to the operating system. Avoid the presence of running agents on your templates by using customization to run the installers, or doing so as part of a completion workflow after waiting for customization to complete. Alternatively, you can also use Chef, Puppet, or scripting to install the security software.
Where it’s not obvious from other information being provided, it’s also a good idea to answer the following questions when providing this information to Embotics Technical Support.
- Do any customizations work for deployments in vCommander?
- Do any customizations work when the same options are used in vCenter directly?
- What version of vCenter and the ESX hosts are you running?
- Is anyone logging into the VM while customization may still be occurring?