VMware
 

Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

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:

  1. Set logging on the ESX Server to trivia.
  2. Generate the debug logs.
  3. Review the debug files.

Setting ESX Server Logging to Trivia

  1. Log in to your ESX Server system.

  2. Change to the hostd directory.

cd /etc/vmware/hostd

  1. 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.

  1. Change to the /init.d directory.

cd /etc/init.d

  1. 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

  1. Initiate the logs on the ESX Server system. At the /var/log/vmware directory, execute:

    run tail -f hostd.log > debug

  2. Create a virtual machine through the VI Client.

  3. 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

Virtual Center, ESX, SDK, VI, Web service, API, SOAP

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (0 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (0 Ratings)   
Actions