Workstation User’s Manual
128 VMware, Inc.
Run or Disable a Script
Ifyouarecreatingacustomscript,runthescriptbeforeassociatingitwithapower
operation.
To run or disable a script
1OntheScriptstaboftheVMwareToolscontrolpanel,selecttheappropriatescript
event.
2Dooneofthefollowing:
Todisablethescript,cleartheUseScriptcheckboxandclickOK.
Defaultscriptsforsuspendingandresumingworktogether.Ifyoudisablethe
scriptofoneoftheseactions,disablethescriptfortheotheractionaswell.
Torunascriptimmediately,clickRunNow.
YoucansuccessfullyrunascriptbyclickingtheRunNowbuttoninthe
VMwareToolscontrolpanel,butthissamescriptcanfailwhenrunaspartof
aWorkstationpoweroperation.ThisisbecausescriptsrunbyclickingRun
Nowareru
nasthelogged‐inuserandhaveadifferentworkingdirectorythan
whenscriptsarerunbytheVMwareToolsdaemonduringapower
operation.
Execute Commands After You Power Off or Reset a Virtual
Machine
InaLinux,Solaris,orFreeBSDguest,youcanusetheVMwareToolsservicetoexecute
specificcommandswhenyoushutdownorrestarttheguestoperatingsystem.Thisis
inadditiontoanyscriptthatyouspecifiedtorunwhenyoushutdowntheguest
operatingsystem.
1Useatexted
itortoopenthefollowingfile:
/etc/vmware-tools/tools.conf
2Addoneorbothofthefollowingcommandstothefile:
halt-command = <command>
<command>isthecommandtoexecutewhenyoushutdowntheguest
operatingsystem.
reboot-command = <command>
<command>isthecommandtoexecutewhenyourestarttheguestoperating
system.
Comentarios a estos manuales