VMware

 

VIX API Version 1.2 (for VMware Server 2.0) Release Notes


Released 12-November-2007

The VIX API allows users to write scripts and programs to automate virtual machine operations. The API is high-level, easy to use, and practical for both script writers and application programmers. API functions allow you to register, power on or off virtual machines, and run programs in the guest operating systems.

The VIX API includes:

  • C API—The VIX API is available in the C language.
  • Perl API—The VIX API functions are also available in a simplified API designed for the Perl language.
  • COM API—The VIX API includes a COM binding. Developers can now use C#, Visual Basic, and VBScript clients.

This document contains the following information:


New Features

  • The Vix function VixVM_UpgradeVirtualHardware() has been implemented. This function upgrades the capabilities of a virtual machine, expanding the set of virtual hardware devices the machine can support.

Resolved Issues Since VMware Server 1.0

  • Wrapper library problem on Linux. When using the VIX API on Linux, the wrapper library had problems with missing symbols, which prevented clients from linking with it. This problem has been corrected.

  • VixVM_PowerOn() failed when multiple VMware products installed. The VixVM_PowerOn() function previously relied on the VMINSTALL environment variable to locate installed VMware executables. If you first installed a VMware product that supports the VIX API, then you later installed a VMware product that does not support the VIX API, VMINSTALL would point to the later installation. This problem has been corrected for the Workstation 6.0.1 release.


Known Issues

  • Vix wrapper library forces debug CRT on Windows hosts.

    Workstation 6.0.1 introduced the capability to link a Vix client with a debug version of the C runtime library. This feature allows a user to specify debug or non-debug C runtime with the /MTd or /MT compiler option on Windows. A client compiled with the debug option needs to statically link the debug version of the Vix wrapper (VixAllProductsd.lib), which loads vixd.dll, which in turn loads the debug version of the C runtime.

    However, the Windows Vix wrapper library in this beta release of VMware Server can only link to the debug version of the Vix library (vixd.dll) and the C runtime. You cannot link the non-debug version of the Vix library (vix.dll) even if you link the non-debug version of the Vix wrapper (VixAllProducts.lib) in your client. If your client was not compiled for the debug version of the C runtime, it will not run correctly with the debug version.

    To work around this problem, there are three alternatives:
    • Recompile your client with the debug option, and link the debug version of the Vix wrapper (VixAllProductsd.lib). This will result in linking to the debug version of the C runtime. This workaround is valid if you connect only to VMware Server 2.0 or VMware Workstation 6.0.2 hosts. This workaround does not allow you to connect to VMware Server 1.0 hosts, because there is no debug version of the Vix library available for Server 1.0.
    • Recompile your client to link vix.lib statically, bypassing the Vix wrapper. This allows you to use the non-debug version of the C runtime, but bypassing the wrapper means that your client can only communicate with a single host version. You lose the advantage of the Vix wrapper choosing the correct Vix library when you call VixHost_Connect().
    • If you need to connect only to VMware Server 1.0 hosts, the simplest workaround is not to upgrade to Server 2.0 until this problem is fixed.


    You can find more detailed information on compiling and linking Vix clients in the "Introduction to the VIX API", which is available at http://pubs.vmware.com/vix-api/ReferenceGuide/.

  • The VIX API standalone installer does not create /etc/vmware/config. The Linux standalone installer for the VIX API library files expects to write to the file /etc/vmware/config. This file exists only if you have previously installed a VMware platform product on the Linux client machine. If not, the installer reports the following error message:
    /bin/cp: cannot stat 'etc/vmware/config': No such file or directory
    


    To work around this problem, first create an empty file named /etc/vmware/config, then run the VIX API standalone installer for Linux.

  • VixVM_UpgradeVirtualHardware() requires user confirmation dialog. When a Vix client calls the function VixVM_UpgradeVirtualHardware(), it causes the virtual machine to request user confirmation of the operation. The request is externalized in the UI. To complete the virtual hardware upgrade, answer Yes to the dialog.

  • The VixHost_FindItems() function is not implemented by VMware Server. If your client calls VixHost_FindItems() while connected to a VMware Server host, the function returns the error code VIX_E_NOT_SUPPORTED.

  • The FindRunningVMs() function is not implemented by VMware Server. The Perl function FindRunningVMs() is not implemented. If your client calls FindRunningVMs() while connected to a VMware Server host, the function returns the error code VIX_E_NOT_SUPPORTED.

  • The VixVM_LoginInGuest() function fails when given an empty string as a password. This is a security feature in Windows XP guest operating systems. For more information, visit:

    http://support.microsoft.com/?id=303846
    To workaround this issue, create a new user account with a non-empty password, or change the password for the user account you use to authenticate for guest operating system functions.

  • Timeout range is limited to 2048 seconds. The timeoutInSeconds parameter of VixVM_WaitForTools() is limited to 2048 seconds. Larger values produce unpredictable results.

  • VixVM_ListDirectoryInGuest() failure for outdated Tools. If VMware Tools in the guest operating system is not current, VixVM_ListDirectoryInGuest() may fail with the error code E_INVALID_ARG. To correct the problem, use VixVM_InstallTools() to upgrade to the current version of VMware Tools.

  • Invoking VixVM_RunScriptInGuest() with DOS batch files. The function VixVM_RunScriptInGuest() fails when the user attempts to use cmd.exe to run a Windows batch file. This problem is seen when the interpreter parameter points to cmd.exe and the scriptText parameter points to the name of a batch file.

    Instead, use RunProgramInGuest to run cmd.exe with the /c option, as shown in this example:
    jobHandle = VixVM_RunScriptInGuest(vmHandle,
                                       "c:\\Windows\\System32\\cmd.exe",
                                       "/c c:\\Workarea\\script.bat",
                                       0, // options,
                                       VIX_INVALID_HANDLE, // propertyListHandle,
                                       NULL, // callbackProc,
                                       NULL); // clientData
       


  • Issue with background resume feature. If the background resume feature is enabled for a virtual machine, Vix might report too early that the resume operation is complete. To work around this problem, disable the background resume feature (assuming it has been enabled—by default, background resume is disabled).

  • Microsoft Windows 95 guest operations not supported. Most guest operations, including guest file operations, getting and setting of environment variables, and running programs in the guest, will not work properly for Microsoft Windows 95 guests.

  • Wait before calling VixVM_InstallTools(). The function VixVM_InstallTools() sometimes fails to work correctly if you call it immediately after powering on a virtual machine. VixVM_InstallTools() mounts an ISO image containing the VMware Tools installer, but the guest operating system can fail to recognize the mounted image or to execute the autorun file if the guest operating system has not completed its startup process.
    To work around this problem, you should wait until the guest operating system is fully operational before calling VixVM_InstallTools().

  • Event pumping option can fail to complete. An event pumping loop in a Vix client sometimes fails to complete an operation in a client that alternately calls Vix_PumpEvents() and VixJob_CheckCompletion(). Event pumping is enabled by calling VixHostConnect() with the options parameter set to USE_EVENT_PUMP.
    To work around this problem, do not set the USE_EVENT_PUMP option.

  • Guest processes might not stop immediately after VMKillProcessInGuest(). The VixPerl function VMListProcessesInGuest() sometimes reports a process still running after VMKillProcessInGuest() has stopped the process.
    To work around this problem, introduce a small delay between the time VMKillProcessInGuest() returns and the time you call VMListProcessesInGuest().

  • VixVM_GetNumRootnapshots() might report invalid parameter. The Vix function VixVM_GetNumRootnapshots() occasionally returns an error code reporting an invalid parameter, even when the parameters appear valid. VMware is trying to determine the circumstances that lead to this problem.

  • VixVM_RevertToSnapshot() invalidates guest authentication. A client that has authenticated for guest operations using VixVM_LoginInGuest() will lose its authentication if it calls VixVM_RevertToSnapshot(). When the snapshot activates, the client needs to call VixVM_LoginInGuest() to authenticate with the active snapshot.

  • Windows client compiled for debug requires MSVCR71D.dll. On a Windows machine, when you run a Vix client that was compiled using the debug option in Microsoft Visual Studio, you need the file MSVCR71D.dll in your link path. Otherwise, the application fails to start. This DLL is installed on your machine when you install Visual Studio.

  • vix-perl on Linux needs libgvmomi.so.0 in library path. The vix-perl package has a dependency on libgvmomi.so.0, but the $LD_LIBRARY_PATH does not include a path to the file. To work around this problem, add this path to $LD_LIBRARY_PATH: /usr/lib/vmware-vix/lib/ws_server_esx-4/32bit

  • vix-perl on Windows needs glib-2.0.dll in library path. The vix-perl package has a dependency on glib-2.0.dll, but the %PATH variable does not include a path to the file. To work around this problem, add this path to %PATH: C:\Program Files\VMware\VMware VIX\ws_server_esx-4\32bit

  • VIX API CopyFileFromHostToGuest() and CopyFileFromGuestToHost() reset permission bits (KB 2318633)

  • VIX API returns undefined error code in some situations (KB 3460454)

  • VIX API does not always report failure of VixVM_CopyFileFromGuestToHost() (KB 3656116)

  • VIX API might crash if client uses an invalid host handle (KB 2416845)

Last updated: 19-April-2007 5:00 pm