The VMware VIX API in my opinion is still one of the most powerful and undervalued API's that is available to customers and partners for Virtual Machine guest operating system Automation. The VIX API allows you to perform guest operations such as starting/stopping an application, file/directory manipulation, uploading/downloading files all within the guest operating system without requiring any network connectivity to the Virtual Machine. This is all made possible through the use of VMware Tools that is running inside of the Virtual Machine and operations are only performed after a user of the guestOS is properly authenticated.
Guest Operations using vSphere API |
The use cases for such an API are endless:
- Network reconfiguration (Re-IP for DR or miss-configuration)
- Operating System configurations
- Application configurations or deployments (example of this)
- Backup/Restore for individual files
- Downloading log files for troubleshooting
- The list goes on ....
The VIX API was first introduced as a separate client API supporting VMware's hosted products such as VMware Fusion, Workstation and Player and later supported VMware vSphere. The API was quite popular for the hosted products and with the release of vSphere 5.0, the VIX API was finally integrated into the vSphere API to provide a single API that could manage all aspects of vSphere as well as these new guest operations APIs for your Virtual Machines. With this integration, these new APIs are now known as the vSphere Guest Operations API.
If you are familiar with the VIX API and would like to move or migrate to using the new Guest Operations API within vSphere, there is a really useful whitepaper that I recently came across called Transporting VIX Guest Operations to the vSphere API that provides a nice mapping of the API methods between the VIX and new vSphere Guest Operations API. The whitepaper also includes various code samples using Java, PowerCLI cmdlets and vSphere SDK for Perl to demonstrate the new Guest Operations APIs.
I think every vSphere administrator or developer should be familiar with the capabilities of the VIX and Guest Operations API and how it can help them further automate and manage your guestOSes and the applications that run inside of them.
Additional Resources:
Anonymous says
What can I do if without vmware tools installed? Is there any API that can be utilized to install vmware tools frist?
Thanks!
William Lam says
Yes, the vSphere API provides a way to install VMware Tools
Anonymous says
That's great! Thanks William!
Camilo Aguilar (@c4milo) says
Would I be able to use the VSphere SDK against a hosted VMware such as Fusion? Your article seems to imply that.
William Lam says
That's correct. There is a VIX SDK for "Hosted" products such as Workstation, Fusion & Player that provides the same set of capabilities
Prasad Subramonia says
Hi William,
Can you please let me know, if there any examples hosted for using vSphere API for Workstation or Fusion?
Thank you in advance.