Generating Logs

If you are connected to ESXi by SSH, you can use the tail command to explicitly create a log file that captures detail about actions that follow. For example, you can use the vSphere Client to create a new virtual machine and then use the content from the log as a model for how to create your own code.

To start the logging process and capture content to a file, use the following steps.

Procedure

  1. Navigate to the location of the hostd.log file:

    cd /var/log/vmware

  2. Run the tail command, passing a filename in which to capture output:

    tail -f hostd.log > yourfilenamehere

  3. Use the vSphere Client to perform whatever action you are having difficulty modeling in your own code. For example, create a new virtual machine and stop the tail process with Ctrl-C when the operation completes.

Results

The file contains the SOAP message content and other log messages sent and received by hostd during the execution.