9.0

VMware, Inc. 11
Using vmrun to Control Virtual Machines
Disabling Dialog Boxes
Withvirtualmachinesthatrequireuserinputthroughadialogbox,thevmrunutilitymighttimeoutandfail.
Todisabledialogboxes,insertthefollowinglineinthevirtualmachineconfigurationfile(.vmx):
msg.autoAnswer = TRUE
Syntax of vmrun Commands
Table 2listsvmruncommandsandparametersaccordingtotheirfunction.Parametersarelistedoneperline.
Parametersenclosedinsquarebracketsareoptional.Theverticalbarindicatesakeywordchoice.
Table 2. vmrun Commands and Parameters
Command Description Parameters
Power Commands
start
(Teamssupportedonlyon
Workstation.)
Startsavirtualmachine(.vmxfile)orteam(.vmtmfile).
Thedefaultguioptionstartsthemachineinteractively,
whichisrequiredtodisplayaVMwareuserinterface.
Thenoguioptionsuppressestheuserinterface,
includingthestartupdialogbox,toallownoninteractive
scripting.
<pathto.v
mxor.vmtmfile>
[ gui | nogui ]
stop
(Teamssupportedonlyon
Workstation.)
Stopsavirtualmachine(.vmxfile)orteam(.vmtmfile).
Usethesoftoptiontopowerofftheguestafterrunning
shutdownscripts.Usethehardoptiontopoweroffthe
guestwithoutrunningscripts,asifyoupressedthe
pow
erbutton.ThedefaultistousethepowerTypevalue
specifiedinthe.vmxfile,ifpresent.
<pathto.vmxor.vmtmfile>
[ hard | soft ]
reset
(Teamssupportedonlyon
Workstation.)
Resetsavirtualmachine(.vmxfile)orteam(.vmtmfile).
Usethesoftoptiontorunshutdownscriptsbefore
rebootingtheguest.Us
ethehardoptiontorebootthe
guestwithoutrunningscripts,asifyoupressedthereset
button.ThedefaultistousethepowerTypevalue
specifiedinthe.vmxfile,ifpresent.
<pathto.vmxor.vmtmfile>
[ hard | soft ]
suspend
(Teamssupportedonlyon
Workstation.)
Suspendsavirtualmachine(.vmxfile)ortea
m(.vmtm)
withoutshuttingdown,solocalworkcanresumelater.
Thesoftoptionsuspendstheguestafterrunning
systemscripts.OnWindowsguests,thesescriptsrelease
theIPaddress.OnLinuxguests,thescriptssuspend
networking.Thehardoptionsuspendstheguest
withoutrunningthescripts.Thedefaultistouseth
e
powerTypevaluespecifiedinthe.vmxfile,ifpresent.
Toresumevirtualmachineoperationaftersuspend,use
thestartcommand.OnWindows,theIPaddressis
retrieved.OnLinux,networkingisrestarted.
<pathto.vmxor.vmtmfile>
[ hard | soft ]
pause
(Pausesupportedonlyon
Workstation.)
Pausesavirtualmachine(.vmxfile
).Youcanusethisto
suspendvirtualmachineoperation.
<pathto.vmxfile>
unpause
(Unpausesupportedonlyon
Workstation.)
Resumesoperationofavirtualmachine(.vmxfile)from
whereyoupausednormaloperation.
<pathto.vmxfile>
Snapshot Commands
listSnapshots Listsallsnapshotsinavirtualmachine(.vmxfile).
Theshowtreeoptiondisplayssn
apshotsintreeformat,
withchildrenindentedundertheirparent.
<pathto.vmxfile>
[ showtree ]
snapshot
(VMwareServerdoesnot
supportmultiplesnapshots.
VMwareFusiondoesnot
supportsnapshottrees.)
Createsasnapshotofavirtualmachine(.vmxfile).For
productsthatsupportmultiplesnapshots,youmust
providethesnapshotname.
Becausethefor
wardslashdefinespathnames,donot
usetheslashcharacterinasnapshotname,becausethat
makesitdifficulttospecifythesnapshotpathlater.
<pathto.vmxfile>
<snapshotname>