| 1 | [[PageOutline]] |
| 2 | |
| 3 | = vmrun = |
| 4 | * VMware Server 2.0.1 on Ubuntu Hardy x64 |
| 5 | {{{ |
| 6 | vmrun version 2.0.1 build-156745 |
| 7 | |
| 8 | Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS] |
| 9 | |
| 10 | |
| 11 | |
| 12 | AUTHENTICATION-FLAGS |
| 13 | -------------------- |
| 14 | These must appear before the command and any command parameters. |
| 15 | |
| 16 | -h <hostName> (not needed for Workstation) |
| 17 | -P <hostPort> (not needed for Workstation) |
| 18 | -T <hostType> (ws|server|server1) |
| 19 | for example, use '-T server' for Server 2.0 |
| 20 | use '-T server1' for Server 1.0 |
| 21 | -u <userName in host OS> (not needed for Workstation) |
| 22 | -p <password in host OS> (not needed for Workstation) |
| 23 | -gu <userName in guest OS> |
| 24 | -gp <password in guest OS> |
| 25 | |
| 26 | |
| 27 | |
| 28 | POWER COMMANDS PARAMETERS DESCRIPTION |
| 29 | -------------- ---------- ----------- |
| 30 | start Path to vmx file Start a VM |
| 31 | [gui|nogui] |
| 32 | |
| 33 | stop Path to vmx file Stop a VM |
| 34 | [hard|soft] |
| 35 | |
| 36 | reset Path to vmx file Reset a VM |
| 37 | [hard|soft] |
| 38 | |
| 39 | suspend Path to vmx file Suspend a VM |
| 40 | [hard|soft] |
| 41 | |
| 42 | pause Path to vmx file Pause a VM |
| 43 | |
| 44 | unpause Path to vmx file Unpause a VM |
| 45 | |
| 46 | |
| 47 | |
| 48 | SNAPSHOT COMMANDS PARAMETERS DESCRIPTION |
| 49 | ----------------- ---------- ----------- |
| 50 | snapshot Path to vmx file Create a snapshot of a VM |
| 51 | Snapshot name |
| 52 | |
| 53 | deleteSnapshot Path to vmx file Remove a snapshot from a VM |
| 54 | Snapshot name |
| 55 | |
| 56 | revertToSnapshot Path to vmx file Set VM state to a snapshot |
| 57 | Snapshot name |
| 58 | |
| 59 | |
| 60 | |
| 61 | RECORD/REPLAY COMMANDS PARAMETERS DESCRIPTION |
| 62 | ---------------------- ---------- ----------- |
| 63 | beginRecording Path to vmx file Begin recording a VM |
| 64 | Snapshot name |
| 65 | |
| 66 | endRecording Path to vmx file End recording a VM |
| 67 | |
| 68 | beginReplay Path to vmx file Begin replaying a VM |
| 69 | Snapshot name |
| 70 | |
| 71 | endReplay Path to vmx file End replaying a VM |
| 72 | |
| 73 | |
| 74 | |
| 75 | GUEST OS COMMANDS PARAMETERS DESCRIPTION |
| 76 | ----------------- ---------- ----------- |
| 77 | runProgramInGuest Path to vmx file Run a program in Guest OS |
| 78 | [-noWait] |
| 79 | [-activeWindow] |
| 80 | [-interactive] |
| 81 | Complete-Path-To-Program |
| 82 | [Program arguments] |
| 83 | |
| 84 | fileExistsInGuest Path to vmx file Check if a file exists in Guest OS |
| 85 | Path to file in guest |
| 86 | |
| 87 | setSharedFolderState Path to vmx file Modify a Host-Guest shared folder |
| 88 | Share name |
| 89 | Host path |
| 90 | writable | readonly |
| 91 | |
| 92 | addSharedFolder Path to vmx file Add a Host-Guest shared folder |
| 93 | Share name |
| 94 | New host path |
| 95 | |
| 96 | removeSharedFolder Path to vmx file Remove a Host-Guest shared folder |
| 97 | Share name |
| 98 | |
| 99 | listProcessesInGuest Path to vmx file List running processes in Guest OS |
| 100 | |
| 101 | killProcessInGuest Path to vmx file Kill a process in Guest OS |
| 102 | process id |
| 103 | |
| 104 | runScriptInGuest Path to vmx file Run a script in Guest OS |
| 105 | Interpreter path |
| 106 | script_text |
| 107 | |
| 108 | deleteFileInGuest Path to vmx file Delete a file in Guest OS |
| 109 | Path in guest |
| 110 | |
| 111 | createDirectoryInGuest Path to vmx file Create a directory in Guest OS |
| 112 | Directory path in guest |
| 113 | |
| 114 | deleteDirectoryInGuest Path to vmx file Delete a directory in Guest OS |
| 115 | Directory path in guest |
| 116 | |
| 117 | listDirectoryInGuest Path to vmx file List a directory in Guest OS |
| 118 | Directory path in guest |
| 119 | |
| 120 | copyFileFromHostToGuest Path to vmx file Copy a file from host OS to guest OS |
| 121 | Path on host |
| 122 | Path in guest |
| 123 | |
| 124 | copyFileFromGuestToHost Path to vmx file Copy a file from guest OS to host OS |
| 125 | Path in guest |
| 126 | Path on host |
| 127 | |
| 128 | renameFileInGuest Path to vmx file Rename a file in Guest OS |
| 129 | Original name |
| 130 | New name |
| 131 | |
| 132 | captureScreen Path to vmx file Capture the screen of the VM to a local file |
| 133 | Path on host |
| 134 | |
| 135 | writeVariable Path to vmx file Write a variable in the VM state |
| 136 | [runtimeConfig|guestEnv] |
| 137 | variable name |
| 138 | variable value |
| 139 | |
| 140 | readVariable Path to vmx file Read a variable in the VM state |
| 141 | [runtimeConfig|guestEnv] |
| 142 | variable name |
| 143 | |
| 144 | |
| 145 | |
| 146 | VPROBE COMMANDS PARAMETERS DESCRIPTION |
| 147 | --------------- ---------- ----------- |
| 148 | vprobeVersion Path to vmx file List VP version |
| 149 | |
| 150 | vprobeLoad Path to vmx file Load VP script |
| 151 | 'VP script text' |
| 152 | |
| 153 | vprobeReset Path to vmx file Disable all vprobes |
| 154 | |
| 155 | vprobeListProbes Path to vmx file List probes |
| 156 | |
| 157 | vprobeListGlobals Path to vmx file List global variables |
| 158 | |
| 159 | |
| 160 | |
| 161 | GENERAL COMMANDS PARAMETERS DESCRIPTION |
| 162 | ---------------- ---------- ----------- |
| 163 | list List all running VMs |
| 164 | |
| 165 | upgradevm Path to vmx file Upgrade VM file format, virtual hw |
| 166 | |
| 167 | installtools Path to vmx file Install Tools in Guest |
| 168 | |
| 169 | register Path to vmx file Register a VM |
| 170 | |
| 171 | unregister Path to vmx file Unregister a VM |
| 172 | |
| 173 | listRegisteredVM List registered VMs |
| 174 | |
| 175 | clone Path to vmx file Create a copy of the VM |
| 176 | Path to destination vmx file |
| 177 | full|linked |
| 178 | [Snapshot name] |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | Examples: |
| 184 | |
| 185 | |
| 186 | Starting a virtual machine with Workstation on a Windows host |
| 187 | vmrun -T ws start "c:\my VMs\myVM.vmx" |
| 188 | |
| 189 | |
| 190 | Stopping a virtual machine with Server on a linux host |
| 191 | vmrun -T server -h https://myHost.com/sdk -u hostUser -p hostPassword stop "[storage1] vm/myVM.vmx" |
| 192 | |
| 193 | |
| 194 | Running a program in a virtual machine with Workstation on a Windows host with Windows guest |
| 195 | vmrun -T ws -gu guestUser -gp guestPassword runProgramInGuest "c:\my VMs\myVM.vmx" "c:\Program Files\myProgram.exe" |
| 196 | |
| 197 | |
| 198 | Running a program in a virtual machine with Server on a linux host with linux guest |
| 199 | vmrun -T server -h https://myHost.com/sdk -u hostUser -p hostPassword -gu guestUser -gp guestPassword runProgramInGuest "[storage1] vm/myVM.vmx" /usr/bin/X11/xclock -display :0 |
| 200 | |
| 201 | |
| 202 | Creating a snapshot of a virtual machine with Workstation on a Windows host |
| 203 | vmrun -T ws snapshot "c:\my VMs\myVM.vmx" mySnapshot |
| 204 | |
| 205 | |
| 206 | Reverting to a snapshot with Workstation on a Windows host |
| 207 | vmrun -T ws revertToSnapshot "c:\my VMs\myVM.vmx" mySnapshot |
| 208 | |
| 209 | |
| 210 | Deleting a snapshot with Workstation on a Windows host |
| 211 | vmrun -T ws deleteSnapshot "c:\my VMs\myVM.vmx" mySnapshot |
| 212 | }}} |