Specifications

CHAPTER 3 Using VMware Tools
93
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
ide0:0.fileName = "my_common_virtual_hard_drive.vmdk"
machine.id = "the_string_for_my_first_vm"
<config_file_2>.vmx contains:
ide0:0.present = TRUE
ide0:0.fileName = "my_common_virtual_hard_drive.vmdk"
machine.id = "the_string_for_my_second_vm"
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
filename with another virtual machine disk file.
The following example uses a Windows host and guest to illustrate how you can use
the service to retrieve a string containing what will become the virtual machine's
machine name and IP address. In this example, W2K-VM is the machine name and
148.30.16.24 is the IP address.
1. Define a string. Do this by either:
Adding the following line to your virtual machine's configuration file:
machine.id = "W2K-VM 148.30.16.24"
then launching a virtual machine using this configuration file.
Launching a virtual machine from the command line. At the command line,
type:
“C:\Program Files\VMware\VMware GSX Server\vmware
-s 'machine.id=W2K-VM 148.30.16.24' C:\Virtual
Machines\win2000\win2000.vmx”