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.
- Navigate to the location of thehostd.logfile:cd /var/log/vmware
- Run thetailcommand, passing a filename in which to capture output:tail -f hostd.log > yourfilenamehere
- 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 thetailprocess with Ctrl-C when the operation completes.
The file contains the SOAP message content and
other log messages sent and received by
hostd
during the execution.