Specifications

Table Of Contents
VMware, Inc. 71
Chapter 3 Using VMware Tools
There!are!two!ways!of!passing!strings!to!a!virtual!machineʹs!guest!operating!system:
1You!can!place!a!string!in!the!virtual!machineʹs!configuration!file!by!setting!the!
string!to!the!machine.id!parameter.
For!example,!you!can!set!this!string:!
machine.id = "Hello World."
2You!pass!the!string!to!the!guest!operating!system!
from!the!command!line!when!
you!launch!the!virtual!machine.!See!example!1!below.
You!can!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!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
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!