Support > Knowledge Base
Knowledge Base

Search the Knowledge Base: |
Search the Knowledge Base: |
Debugging a Request Sent to the Server to Create a New Virtual Machine
Details
I am trying to write a request to create a new virtual machine directly through the Virtual Infrastructure API Web service. How do I debug my request?
Solution
Verify that you are able to log in, query your existing virtual machines, and log off. If you are still are unable to create new virtual machines, debug your SOAP request by improving the error messages that are generated:
- Set logging on the ESX Server to trivia.
- Generate the debug logs.
- Review the debug files.
Setting ESX Server Logging to Trivia
- Log in to your ESX Server system.
- Change to the hostd directory.
cd /etc/vmware/hostd
- Open the config.xml file and change the log level to trivia. (Typically, the level is set to info.) The entry is similar to the following example:
<log>
....
<level>trivia</level>
....
</log>
Optionally, set the log level to verbose and note if the XML call is recorded.
- Change to the /init.d directory.
cd /etc/init.d
- Restart the host agent.
./mgmt-vmware restart
This command restarts the host agent and logs off all API connected clients. It does not affect current running virtual machines. It "blinks" the management connection.
Generating the Debug Logs
- Initiate the logs on the ESX Server system. At the /var/log/vmware directory, execute:
run tail -f hostd.log > debug
- Create a virtual machine through the VI Client.
- Stop the tail process on the ESX Server system, after the virtual machine is created. Press CTL-C .
Reviewing the Debug Files
The debug file should contain the XML syntax for a successful run. The debug file is created in the same directory where the host.d log command is issued, /var/log/vmware .
Keywords
Feedback
Actions
- KB Article: 1002263
- Updated: Aug 14, 2009
- Products:
VMware Infrastructure SDK - Product Versions:
VMware Infrastructure SDK 1.x
VMware Infrastructure SDK 2.0.x

