Changes

Jump to: navigation, search
The Basics and Syntax of vmrun
The ''vmrun'' tool is installed by default with the VMware Server and VMware Workstation products. Assuming that a standard installation is performed, the ''vmrun'' executable is located in ''\Program Files\VMware\VMware Server'' on Windows hosts and ''/usr/bin'' on Linux.
The basic command line syntax for using ''vmrun'' varies between host platforms and VMware product, can be gnerally generally summarized as follows:
vmrun ''<host authentication flags> <guest authentication flags> <command> <parameters>''
The ''command'' argument instructs ''vmrun'' on the task to be performed. For example, ''start'', ''stop'' and ''reset'' are all valid commands. As are the commands to perform tasks within a guest operating system, such as ''runProgramInGuest'' and ''deleteFileInGuest''.
The ''parameters'' arguments specify additional information required for a specific command. If, for example, the ''start'' command is specified, the parameters argument is used to reference the .vmx file of the virtual machine which is to be started. In the case of running guest commands, both the .vmx file of the taregt target virtual machine and the path to the program to be executed must be provided as parameters.
When specifying the virtual machine on which a command is to be executed, the location of the virtual machine ''.vmx'' configuration file must be provided. For VMware Workstation, this involves specifying the full path of the file. For example:
<tt>"C:\VMware\VMachines\win2008.vmx"</tt>
In the case of VMware Server 2.0, which introduced the concept of ''datastores'', the name of the datastore in which the virtual machines resides must be provided together with the path of the .vmx file which within that storedatastore. For example, to reference a virtual machine stored in the ''win2008'' sub-directory of the ''Vol1'' datastore, the vmrun path parameter would be defined as follows (note that the datastore name is enclosed in square brackets and separated from the sub-directory by a space character):
<tt>"[Vol1] win2008/win2008.vmx"</tt>
1,798
edits

Navigation menu