Hi,
Is there a way to read any ESX file I want through any of the API provided. As far as my research I could not find any api to get read only access to any of the ESX file I want.
What I'm looking at is -
An ability to access the ESX files to read some of the configurations, specifically I'm looking to read pam settings and ssh configuration of a ESX host. This I want to achieve by connecting to Virtual Center Server managing the ESX host.
I looked at the vifs and web based access list for the ESX host, they dont seem to provide what I want to achieve. Please advice if there are any approaches to get access to esx files. I also checked the vCli, power cli and esxcli, let me if I had missed something.
Thanks for any pointers.
Regards,
Parash
You will need to restart the hostd service for the changes to go into effect. Run the following command "/etc/init.d/hostd restart" and then when you refresh the page, you should now see the new file
Take a look at this article towards the bottom http://blogs.vmware.com/vsphere/2012/06/using-vclis-vifs-for-more-than-just-datastore-file-managemen... which provides a method you could leverage to read additonal configuration file. Note that modifying these files from their original default is not supported but there's a way other than SSH.
Thanks for the reply Lam.
I have checked this link, it limits access to files listed here - http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.pg.doc_50%2FPG_ChC_Http_Access.... If I want to access any additional file which is not listed in the link, is it possible? I tried to add a entry in the web configuration for the file I wanted to access, however I could not get a access? Am I missing something here?
Yes, there is a default set of files that's offiically supported but you can override these and add your own. I've not extensively tested this out, but I was able to exposed other files from within the /etc/* directory, YMMV & ensure you're using the correcte syntax (recommend just taking an existing one and modifying the path)
Thanks again Lam.
I will give it a try one more time and let you know. vifs can be used to access files under /etc/* only?
It's more than just /etc, that was just an example. Recommend you take a look at the config file to see examples
I tried to play around with the entries in the webAccessibleConfigFiles.xml on ESX host. I checked 2 cases
1. Deleted the entry for one of the files
2. Added new entry for the new file
In both cases I was not able to see either first file getting removed or the second file getting listed when I browsed the url https://<Esx Host Name>/host. Is there action that needs to performed to effect the changes done to web config file? Any idea ? Appreciate the help.
Thanks,
Parash
You will need to restart the hostd service for the changes to go into effect. Run the following command "/etc/init.d/hostd restart" and then when you refresh the page, you should now see the new file
Thanks Lam, the restart made the things work