VIX API Version 1.6.2 Release Notes
The VIX API allows development of scripts and programs to automate operations in guest virtual machines. The package includes:
Installing VIX 1.6.2
To obtain the VIX 1.6.2 libraries, click the Download link on the VIX API landing page.
When installing on Windows, you are likely to get a dialog box with error message saying “a later version of this library is already installed.” In this event:
New in This Release
The following features are new in VIX release 1.6.2:
See the VIX API 1.6.0 Release Notes for Server 2.0 or the VIX API 1.6.1 Release Notes for Workstation 6.5.1 (on the VIX API landing page) to read about new features in earlier 1.6 releases.
Automating ESX Guest Operations
When VMware Server 2.0 was enhanced so customers could manage it with VMware vCenter (formerly VirtualCenter), VIX 1.6 was also extended to support ESX/ESXi hosts and VMware Infrastructure.
You can use this version of Server-compatible VIX to control guest virtual machines on ESX/ESXi hosts. ESX 3.5 U3 and later are supported. VIX 1.6.2 does not work on versions earlier than ESX 3.5 U2. The ESX version does does not need to match the VIX version, although in earlier ESX versions you might encounter bugs that are fixed in later versions.
Using the VMware Downloads page, you can obtain the VMware-vix-1.6.2 package for Linux 32-bit, Linux 64-bit, or Windows. Install it on your client computer by running vmware-install.pl or by double-clicking the .exe file. By design, Workstation 6.5.x does not include the VIServer-2.0.0 libraries, which are what you need to work with ESX/ESXi and VMware vCenter.
Follow programming documentation for VMware Server 2.0, substituting ESX server. Host type must be VIX_SERVICEPROVIDER_VMWARE_VI_SERVER. Credentials are required for remote connections from your client to the ESX server. For example, this function-call connects to port 443 of an ESX server named esx4, providing user name and password as credentials. Port 443 is encoded in the URL, not in the hostPort argument. The /sdk component at the end of the URL connects to the VIX libraries.
jobHandle = VixHost_Connect(VIX_API_VERSION, VIX_SERVICEPROVIDER_VMWARE_VI_SERVER, "https://esx4.example.com:443/sdk", // URL 0, // hostPort unused "root", // userName "secretpw", // password, 0, // options VIX_INVALID_HANDLE, // propertyListHandle NULL, // callbackProc NULL); // clientData
The vmrun utility is implemented with VIX libraries, covering the most useful range of features. It provides a convenient way to control guest virtual machines without requiring you to write a C, Perl, or COM program. Here is a command that copies a file from a (possibly networkless) guest virtual machine to its ESX host:
vmrun -T esx -h https://esx4.example.com:443/sdk -u root -p secretpw -gu user -gp userpw copyFileFromGuestToHost "[storage1] SUSE/SUSE.vmx" /home/user/img.db /tmp/img.db
The root login and password are required to gain access to the ESX host. The guest user login and password are required for file access on the guest operating system. Most vmrun commands require the inventory path to a virtual machine's VMX file, under [storage1] in this case. The copyFileFromGuestToHost command copies img.db from the user's home directory to /tmp on the ESX host.
Network access and firewalls. When using your client computer to communicate with a remote ESX host, VIX programs require two kinds of connections. To use full VIX API functionality, both the following connection ports must be open between your client and the ESX host:
Issues Resolved for VIX 1.6.2
Issues Discovered in VIX 1.6.2