9.0
Table Of Contents
VMware, Inc. 15
Using vmrun to Control Virtual Machines
Examples of Using vmrun
Thefollowingcommand‐lineexamplesworkonWorkstation(-Tws),VMwareFusion(-Tfusion),or
VMwareESX/ESXihosts(-Tesx).
Youcanderivetheguestoperatingsystemtypeinexamplesbydistinguishing/forLinuxand\forWindows.
Reboot Commands
RebootavirtualmachinerunningonWorkstationforLinux:
vmrun -T ws reset /path/to/vm/RHEL4/RHEL4.vmx soft
RebootavirtualmachinerunningonWorkstationforWindows:
cd "C:\Documents and Settings\<user>\My Documents\My Virtual Machines"
vmrun -T ws reset "WindowsXP\WindowsXP.vmx" soft
RebootavirtualmachinerunningonVMwareFusion:
vmrun -T fusion reset ~/Documents/VirtualMachines.localized/WindowsXP.vmwarevm/WindowsXP.vmx soft
RebootavirtualmachinerunningonanESX/ESXihost:
vmrun -T esx -h 10.0.1.8 -u root reset "[datastore1] WinXP/WinXP.vmx" soft
Host password: <pass>
Power Commands
PoweronavirtualmachinewithWorkstationonaWindowshost:
vmrun start "C:\Documents and Settings\<user>\My Documents\My Virtual Machines\WinXP\WinXP.vmx"
ThiserrormessagefollowingthiscommandindicatesthattheVIXpackageyouinstalleddoesnotsupport
VMwareServer:
vmrun -T server start "My Virtual Machines\WinXP\WinXP.vmx"
Error: The specified service provider was not found
PoweroffavirtualmachinewithWorkstationonaWindowshost:
vmrun stop "C:\Documents and Settings\<user>\My Documents\My Virtual Machines\WinXP\WinXP.vmx"
OntheremoteESX/ESXihostwithIPaddress10.0.1.8,poweronavirtualmachine:
clone
(Cloningnotsupportedon
VMwareServeroron
VMwareFusion.)
Createsacopyofthevirtualmachineandguest.Provide
boththesourceandthedestination.vmxfilepathname.
Youcancreateeitherafullcloneoralinkedclone.To
createtheclonefromasnapshot,ratherthanfromthe
cu
rrentvirtualmachinestate,specifyasnapshotname.
<pathto.vmxfile>
<destination.vmxfilepath>
full |linked
[<snapshotname>]
VProbes Commands
(VProbespermittedonlyonWorkstationandVMwareFusion.)
vprobeVersion ShowstheVProbesversiononthevirtualmachine. <pathto.vmxfile>
vprobeLoad LoadsaVPscriptontothevirtualmachine. <pathto.vmxfile>
<textofth
eVPscript>
vprobeLoadFile LoadsaVPscriptfileontothevirtualmachine. <pathto.vmxfile>
<pathtoVPscript>
vprobeReset DisablesallVProbesonthevirtualmachine. <pathto.vmxfile>
vprobeListProbes ListsactiveVProbesonthevirtualmachine. <pathto.vmxfile>
vprobeListGlobals ListsVProbesglobalvariablesonthevirtualmachine. <pathto.vmxfile>
Table 2. vmrun Commands and Parameters (Continued)
Command Description Parameters