I don't see a way to get the contents of hostd.log from the VI SDK. I notice that some way the VI Client software has access to it (hostd.log) as well as other logs. I assume that VI Client is using same API (may be bad assumption), so I figure it is possible.
Can anyone tell me if it is possible to get logs from VI SDK and how to do it?
Yes, you can.
The DiagnosticManager (from the ServiceContent) has a BrowseDiagnosticLog method. The key value of hostd is "hostd".
You can use this to cycle through hostd for any host.
Hope this helps..
Henry
Yes, you can.
The DiagnosticManager (from the ServiceContent) has a BrowseDiagnosticLog method. The key value of hostd is "hostd".
You can use this to cycle through hostd for any host.
Hope this helps..
Henry
Yes, you are correct in assuming that one should be able to browse through the logs for both the VC as well as ESX using the VI SDK . If you are connecting to VC then VC logs would be available and by directly connecting to ESX you would be able to view the hostd logs.
In the SDK you might want to look at the following object:
Managed Object - DiagnosticManager and the BrowseDiagnosticLog method.
http://pubs.vmware.com/vi301/sdk/ReferenceGuide/vim.DiagnosticManager.html
I hope the above information helps
~ Sidharth