VMware GSX Server 2.5.2Features | Documentation | Knowledge Base | Discussion Forums When you install VMware Tools in a virtual machine, the VMware guest operating system service is one of the primary components installed. The guest service can do the following:
The guest service starts automatically when you boot the guest operating system. In a Windows guest, the guest service program file is called VMwareService.exe. Help is available by right-clicking the VMware Tools icon in the system tray and choosing Help.
In a Linux guest, the guest service is called vmware-guestd. To display help about the guest service, including a list of all options, use the following command: The guest service can synchronize the date and time in the guest operating system with the time in the host operating system once every minute. To enable time synchronization for a Windows guest, see Setting Options with VMware Tools. To enable time synchronization for a Linux or FreeBSD guest, see Setting Options with VMware Tools. To enable time synchronization for a NetWare guest, see Setting Options with VMware Tools. If you want to change the time synchronization setting without using the VMware Tools control panel, you can set the configuration file option tools.syncTime to TRUE or FALSE to enable or disable time synchronization.
In addition, the guest service can synchronize the date and time in the guest with the time in the host in response to various system events; for example, when you resume from disk. You can disable this in the configuration file by setting In a Linux guest, you can have the guest service execute specific commands when you shut down or restart the guest operating system. This is in addition to any script that you may have specified to run when you shut down the guest operating system. In order to execute these commands, you need to modify /etc/vmware-tools/tools.conf. The commands are: halt-command = <command> (where <command> is the command to execute when you shut down the guest operating system) reboot-command = <command> (where <command> is the command to execute when you restart the guest operating system) With GSX Server and knowledge of a scripting language like Perl or NetShell (in a Windows 2000 guest operating system), you can pass a string from your virtual machine's configuration file in the host operating system to the guest operating system when you use the configuration file to launch a virtual machine. What you pass to the guest operating system is up to you. This should only be done if you have a good understanding of a scripting language and know how to modify system startup scripts. There are two ways of passing strings to a virtual machine's guest operating system:
You could pass items like the Windows system ID (SID), a machine name or an IP address. Inside the guest operating system startup script, you have the guest service retrieve this string, which can then be used in another script you write and include in the startup script to set your virtual machine's system ID, machine name or IP address. This way, you can make copies of the same configuration file, add a different string to each (either in the configuration file itself or at the command line), then use these variations of the same configuration file to launch the same virtual disk in nonpersistent mode multiple times in a training or testing environment, for example. This is what portions of two configuration files that point to the same virtual disk might look like. Each configuration file contains its own unique string set for the machine.id parameter. <config_file_1>.vmx contains:
ide0:0.present = TRUE <config_file_2>.vmx contains:
ide0:0.present = TRUE Passing a string is also useful in situations where you want to deploy virtual machines on a network using a common configuration file, while providing each machine with its own unique identity. In this case, you specify the string at the command line (you need to launch each virtual machine with the vmware -s command) when you launch each virtual machine using this configuration file. See example 1 below. Each virtual machine disk file must be copied into its own directory if it shares its file name with another virtual machine disk file. In the following example, we use a Windows host and guest to illustrate how you can use the guest service to retrieve a string containing what will become the virtual machine's machine name and IP address. We use W2K-VM as the machine name and 148.30.16.24 as the IP address.
You need to further customize this startup script so it uses the string the guest service retrieved during startup to set the virtual machine's network name to W2K-VM and its IP address to 148.30.16.24. This should be located in the script before the network services are started. If you're using a Windows 2000 guest operating system, for example, you can call the NetShell utility (netsh) and pass it the contents of the string, which then uses the string accordingly (that is, it can set a new IP address for the virtual machine, if that is what was passed in the string originally). From your host operating system, you can prevent a string from being passed to the guest operating system via the guest service. To do this, set the following line in your virtual machine's configuration file. isolation.tools.machine.id.get.disable = TRUE When the guest operating system is running inside a virtual machine, the VMware guest operating system service allows you to pass information from a VMware Scripting API script you created (that is running in another host machine) to the guest operating system and from the guest operating system to a script. For more information, visit the VMware Web site at www.vmware.com/support/developer/.
|