9.0
Table Of Contents
VMware, Inc. 13
Using vmrun to Control Virtual Machines
renameFileInGuest Renamesormovesafileintheguestoperatingsystem.
VMwareToolsandavalidguestloginarerequired.
Specifythesourcename(original)beforethedestination
(new).
<pathto.vmxfile>
<originalfilename>
<newfilename>
deleteFileInGuest Deletesthegivefilefromtheguestoperatingsystem.
VMwareToolsandavalidguestloginarere
quired.
ForVistaandWindows7restrictionsonthiscommand,
seenotein“GuesttoHostFileOperations”onpage 17.
<pathto.vmxfile>
<pathtofileonguest>
directoryExistsInGuest Checkswhetherthespecifieddirectoryexistsinthe
guestoperatingsystem.VMwareToolsandavalidguest
loginarerequired.
<pathto.vmxfile>
<direct
orypathonguest>
createDirectoryInGuest Createsthespecifieddirectoryintheguestoperating
system.VMwareToolsandavalidguestloginare
required.
ForVistaandWindows7restrictionsonthiscommand,
seenotein“GuesttoHostFileOperations”onpage 17.
<pathto.vmxfile>
<directorypathonguest>
listDirectoryInGuest Listscontentsofth
especifieddirectoryintheguest
operatingsystem.VMwareToolsandavalidguestlogin
arerequired.
<pathto.vmxfile>
<directorypathonguest>
deleteDirectoryInGuest Deletesthespecifieddirectoryfromtheguestoperating
system.VMwareToolsandavalidguestloginare
required.
ForVistaandWindows7restrictionsonthiscommand,
seeno
tein“GuesttoHostFileOperations”onpage 17.
<pathto.vmxfile>
<directorypathonguest>
copyFileFromHostToGuest Copiesafilefromthehosttotheguestoperatingsystem.
VMwareToolsandavalidguestloginarerequired.
Specifythesourcefile(host)beforethedestinationfile
(guest).
ForVistaandWindows7res
trictionsonthiscommand,
seenotein“GuesttoHostFileOperations”onpage 17.
<pathto.vmxfile>
<filepathonhost>
<filepathinguest>
copyFileFromGuestToHost Copiesafilefromtheguestoperatingsystemtothehost.
VMwareToolsandavalidguestloginarerequired.
Specifythesourcefile(guest)beforeth
edestinationfile
(host).
<pathto.vmxfile>
<filepathinguest>
<filepathonhost>
createTempfileInGuest Createsatemporaryfileintheguestoperatingsystem,
andreturnsthepathnameofthetemporaryfilecreated.
Pathnamevariesaccordingtotheoperatingsystem.You
canrundeleteFileInGuesttoremovethefile.
VMwareToolsandav
alidguestloginarerequired.
<pathto.vmxfile>
enableSharedFolders
(VMwarevSphereand
VMwareServerdonot
supportsharedfolders.)
Allowstheguestvirtualmachine,specifiedby.vmxfile,
tosharefolderswithitshost.Afterenabling,run
addSharedFoldertospecifyeachhostfoldertoshare.
Theoptionalruntimeargumentmeanstosh
arefolders
onlyuntilthevirtualmachineispoweredoff.Otherwise,
thesettingpersistsatnextpoweron.
<pathto.vmxfile>
[runtime]
disableSharedFolders
(VMwarevSphereand
VMwareServerdonot
supportsharedfolders.)
Stopstheguestvirtualmachine,specifiedby.vmxfile,
fromsharingfolderswith itshost.
Theoptionalruntimeargumentmeanstost
opsharing
foldersonlyuntilthevirtualmachineispoweredoff.
Otherwise,thesettingpersistsatnextpoweron.
<pathto.vmxfile>
[runtime]
addSharedFolder
(VMwarevSphereand
VMwareServerdonot
supportsharedfolders.)
Addsafoldertobesharedbetweenthehostandguest.
Thesharenameisamountpointinth
egu estfilesystem.
Thepathtofolderistheexporteddirectoryonthehost.
OnWindowsguests,theremightbeadelaybefore
sharedfoldersarevisibletotheInGuestcommands.
<pathto.vmxfile>
<sharename>
<pathtofolderonhost>
Table 2. vmrun Commands and Parameters (Continued)
Command Description Parameters