Common Tasks :Installing VMware Tools in a Virtual Machine

Installing VMware Tools in a Virtual Machine

VMware Tools is a suite of utilities and drivers that enhances the performance and functionality of your guest operating system. For instance, VMware Tools provides a mouse driver and an SVGA driver for the virtual machine.

VMware Tools also implements some of the functionality required for doing Vix functions that affect the guest operating system, such as VixVM_RunProgramInGuest(). You need to install the VMware Tools before calling guest functions in the VIX API.

You can install VMware Tools manually by following the procedure described in the documentation for your VMware platform product. Or you can use the VIX API to do some or all of the installation steps from the host.

To begin the Tools installation process, you call the Vix function VixVM_InstallTools(). This function mounts a CD image containing the VMware Tools installer.

If the guest operating system has the autorun feature enabled, the installer starts automatically. Many guest operating systems require manual intervention to complete the Tools installation. You can connect a console window to the virtual machine and use the mouse or keyboard to complete the procedure as described in the documentation for your VMware platform product.

The VixVM_InstallTools() function is also useful for updating the version of VMware Tools installed in a virtual machine. When a newer version of the API is available, VMware recommends that you run the Tools installation on your virtual machines to make sure you are working with the latest version.

VixVM_InstallTools() is an asynchronous function, so the function call must be completed with a callback function or a call toVixJob_Wait().

To install VMware Tools:

  1. Connect to the host on which the virtual machine is located. See Connecting to a Host.
  2. Get a handle to the virtual machine. See Getting a Handle to a Virtual Machine.
  3. Power on the virtual machine. See Starting or Resuming a Virtual Machine.
  4. Use the virtual machine handle to call VixVM_InstallTools(), which mounts the VMware Tools CD image.
  5.  Using a console connected to the virtual machine, perform any remaining steps in the installation procedure documented for your VMware platform product.
    Example 3-9.
    C code below. Click here for PerlClick here for COM.
VixError err = VIX_OK;
VixHandle jobHandle = VIX_INVALID_HANDLE;
 
// Mount virtual CD-ROM with VMware Tools installer.
jobHandle = VixVM_InstallTools(vmHandle,
                               0, // options
                               NULL, // commandLineArgs
                               NULL, // callbackProc
                               NULL); // clientData
err = VixJob_Wait(jobHandle, VIX_PROPERTY_NONE);
if (VIX_OK != err) {
   // Handle the error...
   goto abort;
}
Vix_ReleaseHandle(jobHandle);
jobHandle = VIX_INVALID_HANDLE;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值