9.0
Table Of Contents
VMware, Inc. 7
l
Thisdocumentcontainsthefollowingsections:
“A b o u t thevmrunUtility”onpage 7
“SettingUpvmrun”onpage 8
“SpecifyingtheVMwareProductPlatform”onpage 9
“VirtualMachineRunReference”onpage 10
“ExamplesofUsingvmrun”onpage 15
About the vmrun Utility
Youcanusethevmruncommand‐lineutilitytocontrolvirtualmachinesandautomateguestoperationson
VMwarevirtualmachines.ThevmrunutilityisincludedwiththeVIXAPIlibraries.
ThevmrunutilityrunsonmostVMwareproductplatforms,includingWorkstation,Player,VMwareFusion,
andVMwarevSphere(ESX/ESXihostsmanagedbyvCenterSe
rver).Ontheseplatforms,theVIXAPIlibraries
andthevmrunutilityareoftenthebestwaytoautomateguestoperations.
Capabilitiesofvmrunaresummarizedinthesectionsbelow.
Power Commands
Powercommandscontrolthesevirtualmachineoperations:start(poweron),stop(poweroff),reset(reboot),
suspend(butallowlocalworktoresume),pause(withoutinterrupting),andunpause(continue).
Workstationcangroupvirtualmachinesinteamsandapplypoweroperationstothewholeteam.
Snapshot Commands
Asnapshotcapturesthestateofavirtualmachineatthetimeofthesnapshot,includingalldataonvirtual
disks.Youcanthenusethesnapshottorevertthevirtualmachinetoitspreviousstate.Snapshotsareuseful
fordatabackup,andasaplaceholderfordevelopmentandtesting.
Snapshotc
ommandslistexistingsnapshotsofavirtualmachine,createasnapshot,deleteasnapshot,and
revertavirtualmachinetoitsstateatthetimeofasnapshot.Reverttosnapshotdoesnotresumerunninga
virtualmachine,evenifitwasrunningatthetimeofasnapshot.
VMwareFusionsuppor
tssnapshotsinalineonly.VMwareServer(discontinued)limitseachvirtualmachine
toonesnapshot.
Guest Operating System Commands
Youcanusethevmrunutilitytointeractwithaguestoperatingsysteminthefollowingways:
Runanexecutableprogramintheguestoperatingsystem,orrunaninterpretedscriptthatyouprovide.
Using vmrun to Control Virtual Machines