2.0

Table Of Contents
VMware, Inc. 103
Chapter 5 Installing and Using VMware Tools
Launcheachvirtualmachinewiththevmware -scommand.Eachvirtualmachinedisk
filemustbecopiedintoitsowndirectoryifitsharesitsfilenamewithanothervirtual
machinediskfile.
OnaLinuxhost,themachineIDpassedonthecommandlinetakesprecedenceandis
passedtotheguest
operatingsystemifthefollowingconditionsaremet:
AvirtualmachineIDspecifiedinthevirtualmachine’sconfiguration(.vmx)fileis
usedtoopenthevirtualmachine.
YouspecifyamachineIDonthecommandline.
Using a String in a Startup Script to Set a Name and IP Address
ThefollowingexampleusesaWindowshosttoillustratehowyoucanusetheservice
toretrieveastringcontainingwhatbecomesthevirtualmachine’smachinenameand
IPaddress.Inthisexample,W2KVMisthemachinenameand148.30.16.24istheIP
address.
To use a string in a startup script to set a name and IP address
1Definethestringbyusingone
ofthefollowingmethods:
Onthehostmachine,addthefollowinglinetoyourvirtualmachine’s
configuration(.vmx)file:
machine.id = "W2K-VM 148.30.16.24"
Openthevirtualmachineusingthisconfigurationfile.
Openthevirtualmachinefromthecommandlinebyenteringthefollowing
ononeline:
“C:\Program Files\VMware\VMware Server\vmware -s 'machine.id=W2K-VM
148.30.16.24' C:\Virtual Machines\win2000\win2000.vmx”
2Dooneofthefollowingtoretrievethestringinthevirtualmachine:
InaWindowsguest,enterthefollowingcommandtoretrievethestring:
VMwareService --cmd machine.id.get
InaLinuxguest,intheoperatingsystem’sstartupscript,addthefollowing
commandbeforethenetworkstartupsection:
/usr/sbin/vmware-guestd --cmd 'machine.id.get'
Thelocationofvmware-guestddependsonthedirectoryyouspecifyatthe
timeofinstallation.