Download: Using vmrun to Control Virtual Machines

Using vmrun to Control Virtual Machines VMware Workstation 7.0 VMware Fusion 3.0 VMware vSphere 4 VMware Server 2.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000222-2 You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your ...
Author: Arcel1973 Shared: 7/30/19
Downloads: 1635 Views: 4080

Content

Using vmrun to Control Virtual Machines

VMware Workstation 7.0 VMware Fusion 3.0 VMware vSphere 4 VMware Server 2.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000222-2, You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: email is hidden  Copyright © 2008, 2009 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com 2 VMware, Inc.,

Contents

About This Book 5 Using vmrun to Control Virtual Machines 7 About the vmrun Utility 7 Power Commands 7 Snapshot Commands 7 Record and Replay Commands 7 Guest Operating System Commands 8 Maintenance Commands 8 VProbes Commands 8 Limitations 8 Setting Up vmrun 8 How to Get vmrun 8 Linux Setup 8 Windows Setup 9 Mac OS X Setup  9 Specifying the VMware Product Platform 9 Encrypted Virtual Machines 9 Guest Operations 9 Running Hosted Platforms Locally 9 Running VMware vSphere Remotely 10 Running VMware Server Remotely 10 Virtual Machine Run Reference 10 Path to VMX File 10 Disabling Dialog Boxes 10 Syntax of vmrun Commands 11 Examples of Using vmrun 15 Reboot Commands 15 Power Commands 15 Snapshot Commands 16 Record and Replay Commands 16 Running Guest Applications 16 Guest to Host File Operations 17 Maintenance Commands 18 Index 19 VMware, Inc. 3, 4 VMware, Inc.,

About This Book

This manual, Using vmrun to Control Virtual Machines, documents the vmrun utility, which helps you manage a  collection of virtual machines on a VMware® host.

Revision History

This book is revised with each release of the product or when necessary. A revised version can contain minor  or major changes. Table 1 summarizes the significant changes in each version of this guide. Table 1. Revision History Revision Description 2009‐10‐20 For VMware Workstation 7.0, VMware Player 3.0, and VMware Fusion 3.0. 2009‐09‐09 For the VIX API 1.7 release, which provided support for ESX/ESXi hosts and VMware vSphere 4. 2008‐12‐31 New information about null interpreter for RunScriptInGuest on Windows. 2008‐08‐15 More examples for VMware Server 2.0 RC2 and Workstation 6.5 RC. 2008‐07‐24 Initial release, including support for VMware Fusion on Intel‐based Macintosh OS X hosts. 2008‐06‐23 Initial draft for the VMware Server 2.0 RC1 and Workstation 6.5 Beta2 releases.

Intended Audience

This book is intended for developers and system administrators who want to control guest virtual machines  on various VMware product platforms. Supported platforms include Workstation, Player, VMware Fusion®,  VMware Server, and VMware vSphere™ (ESX™/ESXi hosts with vCenter™ Server).

Document Feedback

VMware welcomes your suggestions for improving our documentation. Send your feedback to  email is hidden.

Technical Support and Education Resources

The following sections describe the technical support resources available to you. To access the current versions  of other VMware books, go to http://www.vmware.com/support/pubs.

Online and Telephone Support

To use online support to submit technical support requests, view your product and contract information, and  register your products, go to http://www.vmware.com/support. VMware, Inc. 5,

Support Offerings

To find out how VMware support offerings can help meet your business needs, go to  http://www.vmware.com/support/services.

VMware Professional Services

VMware Education Services courses offer extensive hands‐on labs, case study examples, and course materials  designed to be used as on‐the‐job reference tools. Courses are available onsite, in the classroom, and live  online. For onsite pilot programs and implementation best practices, VMware Consulting Services provides  offerings to help you assess, plan, build, and manage your virtual environment. To access information about  education classes, certification programs, and consulting services, go to http://www.vmware.com/services.  6 VMware, Inc.,

Using vmrun to Control Virtual Machines

This document contains the following sections:  “About the vmrun Utility” on page 7 “Setting Up vmrun” on page 8 “Specifying the VMware Product Platform” on page 9 “Virtual Machine Run Reference” on page 10 “Examples of Using vmrun” on page 15

About the vmrun Utility

You can use the vmrun command‐line utility to control virtual machines and automate guest operations on  VMware virtual machines. The vmrun utility is included with the VIX API libraries. The vmrun utility runs on most VMware product platforms, including Workstation, Player, VMware Fusion,  VMware vSphere (ESX/ESXi hosts managed by vCenter Server), and VMware Server. On these platforms, the  VIX API libraries and the vmrun utility are often the best way to automate guest operations. Capabilities of vmrun are summarized in the sections below.

Power Commands

Power commands control these virtual machine operations: start (power on), stop (power off), reset (reboot),  suspend (but allow local work to resume), pause (without interrupting), and unpause (continue).  Workstation can group virtual machines in teams and apply power operations to the whole team.

Snapshot Commands

A snapshot captures the state of a virtual machine at the time of the snapshot, including all data on virtual  disks. You can then use the snapshot to revert the virtual machine to its previous state. Snapshots are useful  for data backup, and as a placeholder for development and testing.  Snapshot commands list existing snapshots of a virtual machine, create a snapshot, delete a snapshot, and  revert a virtual machine to its state at the time of a snapshot. VMware Server limits each virtual machine to one snapshot. VMware Fusion supports snapshots in a line only.

Record and Replay Commands

You can record virtual machine events for later replay. The recording is called a replay snapshot. It is similar  to a movie. Currently, only Workstation supports record and replay.  These commands begin or end the recording of events, and begin or end the replay of a recording. VMware, Inc. 7,

Guest Operating System Commands

You can use the vmrun utility to interact with a guest operating system in the following ways:  Run an executable program in the guest operating system, or run an interpreted script that you provide. Check if a file exists in the guest, delete a file, rename a file, list files, and create or delete a directory. Copy a file from the host to the guest, or from the guest to the host. Add a shared folder from the host, make a shared folder writable in the guest, or remove a shared folder. Capture a screen image from the guest (Workstation and VMware Fusion only). List the processes running in the guest operating system, or end a process (with permission). Read or write a variable in the guest operating system’s environment or virtual machine state. The timeout (wait for VMware Tools) is five minutes for all guest‐related commands.

Maintenance Commands

This category includes commands to list all running virtual machines, upgrade the virtual machine hardware  version, and install VMware Tools in the guest operating system.  Additionally, except on VMware Server, you can clone a virtual machine image to another virtual machine. On VMware vSphere and VMware Server, you can register and unregister virtual machines.

VProbes Commands

On Workstation and Fusion, vmrun can interact with VProbes, a facility for instrumenting a powered‐on guest  operating system, its processes, and the virtualization layer. See the VProbes Programming Reference for details. 

Limitations

VMware Fusion does not support snapshot trees, or record and replay. Player does not support pause and unpause, snapshot operations, virtual machine cloning, virtual hardware  upgrade, or record and replay. VMware Server does not support teams, shared folders, cloning, record and replay, or multiple snapshots.  When you try to create a second snapshot, the UI asks you to overwrite your existing snapshot.

Setting Up vmrun

The procedure for setting up vmrun varies based on the operating system of the client computer.

How to Get vmrun

The vmrun utility installs with Workstation and VMware Fusion. For use with remote product platforms, you can obtain vmrun by installing the VIX standalone libraries,  available free of charge on the VMware download site.

Linux Setup

To use the vmrun utility on Linux 1 In a command or terminal window, type vmrun to see command‐line options. 2 If this fails on an old Linux distribution: as root or superuser, edit the /etc/ld.so.conf file, add the  following line with the default location of the VIX library, save the file, and run the ldconfig command. /usr/lib/vmware-vix/lib 8 VMware, Inc.,

Windows Setup

To use the vmrun utility on Windows 1 The vmrun utility is installed in this folder by default: C:\Program Files\VMware\VMware VIX 2 If VMware Workstation is already in your system Path, this step is unnecessary because a copy of vmrun  is installed there. If not, add the VIX folder location to your system path. On Windows XP, click: Computer > Properties > Advanced > Environment Variables > System variables > Path > Edit  With the right arrow key, move the insertion point to the end of line, add a semicolon, add the full path  of the folder where vmrun is located, and click OK three times. 3 In a command window, type vmrun to see command‐line options.

Mac OS X Setup

To use the vmrun utility on Mac OS 1 In a Terminal window, add the VMware Fusion directory to your system path. export PATH="$PATH:/Library/Application Support/VMware Fusion" 2 Type vmrun to see command‐line options.

Specifying the VMware Product Platform

The vmrun utility accepts option flags, commands, and parameters in the following syntax:  vmrun In the following syntax examples, options enclosed in angle brackets indicate variables that you supply.

Encrypted Virtual Machines

Encrypted virtual machines require a password for most operations. -vp

Guest Operations

Guest operations require authentication by the guest operating system, so their command descriptions in  Table 2, “vmrun Commands and Parameters,” on page 11 say that a “valid guest login” is required. Use the  following flags to specify the guest login:  -gu -gp

Running Hosted Platforms Locally

On Workstation and VMware Fusion, vmrun controls guest operating systems on the local host. You do not  need to specify a remote host name or port. For Workstation, Player, and VMware Fusion, use the -T flag:  vmrun -T ws vmrun -T player vmrun -T fusion NOTE   On Workstation, Player, and VMware Fusion, powering on a virtual machine with the default gui  option requires a window system (user interface) to be running on the host. VMware vSphere and VMware  Server do not impose this requirement. VMware, Inc. 9,

Running VMware vSphere Remotely

In VMware vSphere, use the -T flag to connect to an ESX/ESXi 4.0 host.  vmrun -T esx In VMware vSphere, use the -T flag to connect to the vCenter Server. vmrun -T vc VMware vSphere requires additional flags for connections to an ESX/ESXi host or the vCenter Server: -h https:///sdk -P -u -p The port number defaults to 443. You can also specify the port number in the -h option after the host name or  IP address, separated by a colon, in standard URL syntax. For example, the following command lists all  running virtual machines on a remote server: vmrun -T esx -h https://esx.example.com:8333/sdk -u root -p secretpw list

Running VMware Server Remotely

To set the host type for remote access to VMware Server 2.0, use the -T option with -h and other options.  vmrun -T server -h https://vm2.example.com:443/sdk -u root -p secretpw list To set the host type for remote access to VMware Server 1.0.x, use the -T option, the -h option with the host  name instead of the URL, and the -P option with the port number. vmrun -T server1 -h vm1.example.com -P 443 -u root -p secretpw list

Virtual Machine Run Reference

This section documents the syntax of commands in the vmrun utility.

Path to VMX File

VMware stores virtual machines as a package that includes the virtual machine settings file (.vmx)  and the virtual disks. When required, you must provide the complete path to the .vmx file. The .vmtn file is  similar, for teams. Here are examples of where the .vmx file might be located:  Datastore on an ESX/ESXi host [Storage1] Win XP/Win XP.vmx VMware Server datastore [standard] Win XP/Win XP.vmx Workstation for Windows path C:\Documents and Settings\\My Documents\My Virtual Machines\Win XP\Win XP.vmx Workstation for Linux path /home//VirtualMachines/Ubuntu/Ubuntu.vmx VMware Fusion for Mac OS X path ~/Documents/Virtual Machines.localized/Windows XP Home.vmwarevm/Windows XP Home.vmx

Disabling Dialog Boxes

With virtual machines that require user input through a dialog box, the vmrun utility might time out and fail.  To disable dialog boxes, insert the following line in the virtual machine configuration file (.vmx):  msg.autoAnswer = TRUE 10 VMware, Inc.,

Syntax of vmrun Commands Table 2 lists vmrun commands and parameters according to their function. Parameters are listed one per line.  Parameters enclosed in square brackets are optional. The vertical bar indicates a keyword choice. Table 2. vmrun Commands and Parameters

Command Description Parameters Power Commands start Starts a virtual machine (.vmx file) or team (.vmtm file).  (Teams supported only on  The default gui option starts the machine interactively,  [ gui | nogui ] Workstation.) which is required to display a VMware user interface.  The nogui option suppresses the user interface,  including the startup dialog box, to allow noninteractive  scripting. stop Stops a virtual machine (.vmx file) or team (.vmtm file).  (Teams supported only on  Use the soft option to power off the guest after running  [ hard | soft ] Workstation.) shutdown scripts. Use the hard option to power off the  guest without running scripts, as if you pressed the  power button. The default is to use the powerType value  specified in the .vmx file, if present. reset Resets a virtual machine (.vmx file) or team (.vmtm file).  (Teams supported only on  Use the soft option to run shutdown scripts before  [ hard | soft ] Workstation.) rebooting the guest. Use the hard option to reboot the  guest without running scripts, as if you pressed the reset  button. The default is to use the powerType value  specified in the .vmx file, if present. suspend Suspends a virtual machine (.vmx file) or team (.vmtm)  (Teams supported only on  without shutting down, so local work can resume later.  [ hard | soft ] Workstation.) The soft option suspends the guest after running  system scripts. On Windows guests, these scripts release  the IP address. On Linux guests, the scripts suspend  networking. The hard option suspends the guest  without running the scripts. The default is to use the  powerType value specified in the .vmx file, if present. To resume virtual machine operation after suspend, use  the start command. On Windows, the IP address is  retrieved. On Linux, networking is restarted. pause Pauses a virtual machine (.vmx file). You can use this  (Pause supported only on  either to pause replay or to pause normal operation. Workstation.) unpause Resumes operation of a virtual machine (.vmx file) from  (Unpause supported only on  where you paused replay or normal operation. Workstation.) Snapshot Commands listSnapshots Lists all snapshots in a virtual machine (.vmx file). The showtree option displays snapshots in tree format,  [ showtree ] with children indented under their parent. snapshot Creates a snapshot of a virtual machine (.vmx file). For  (VMware Server does not  products that support multiple snapshots, you must  support multiple snapshots.  provide the snapshot name. VMware Fusion does not  Because the forward slash defines pathnames, do not  support snapshot trees.) use the slash character in a snapshot name, because that  makes it difficult to specify the snapshot path later. VMware, Inc. 11,

Table 2. vmrun Commands and Parameters (Continued)

Command Description Parameters deleteSnapshot Removes a snapshot from a virtual machine (.vmx file).  (VMware Server always  For products that support multiple snapshots, you must  deletes the root snapshot.) provide the snapshot name. [ andDeleteChildren ] The virtual machine must be powered off or suspended.  If the snapshot has children, they become children of the  deleted snapshot’s parent, and subsequent snapshots  continue as before from the end of the chain. The andDeleteChildren option deletes the specified  snapshot and its children recursively. See revertToSnapshot for solutions to name conflicts. revertToSnapshot Sets the virtual machine to its state at snapshot time.  (VMware Server always  However, if the virtual machine was powered on at the  reverts to the root snapshot.) time of the snapshot, vmrun reverts it to suspended state. If a snapshot has a unique name within a virtual   or machine, revert to that snapshot by specifying the path  to the virtual machine’s configuration file and the  unique snapshot name. If several snapshots have the same name, specify the  snapshot by including a full pathname for the snapshot.  A pathname is a series of snapshot names, separated by  forward slash characters (/). Each name specifies a new  snapshot in the tree. For example, the pathname  Snap1/Snap2 identifies a snapshot named Snap2 that  was taken from the state of a snapshot named Snap1. Record and Replay Commands beginRecording Begins recording a running virtual machine (.vmx file),  (Recording supported only  storing activity in the specified snapshot object, with  on Workstation.) optional description for your convenience. [  ] Only one recording or replay can be active at a time. endRecording Ends the recording of a virtual machine (.vmx file) that  is in progress, and closes its snapshot object. beginReplay Begins replaying the recorded activity of a powered off  (Replay supported only on  virtual machine (.vmx file) from a snapshot object,  Workstation.) powering off the virtual machine if necessary. Only one recording or replay can be active at a time. You can pause replay with the pause command, and  resume replay with the unpause command. endReplay Ends replay of the recorded virtual machine (.vmx file)  that is underway. Guest Operating System Commands The timeout (wait for VMware Tools) is five minutes for all guest‐related commands. runProgramInGuest Runs a specified program in the guest operating system. The -noWait option returns a prompt immediately after  [ -noWait | the program starts in the guest, rather than waiting for it  -activeWindow | to finish. This option is useful for interactive programs. -interactive ] The -activeWindow option ensures that the Windows  GUI is visible, not minimized. It has no effect on Linux. [  ] The -interactive option forces interactive guest login.  It is useful for Windows Vista guests to make the  program visible in the console window. You must provide the full pathname of a program  accessible to the guest. Also provide full accessible  pathnames for any files specified in the program  arguments, according to requirements of the program. VMware Tools and a valid guest login are required. 12 VMware, Inc.,

Table 2. vmrun Commands and Parameters (Continued)

Command Description Parameters fileExistsInGuest Checks whether the specified file exists in the guest  operating system. VMware Tools and a valid guest login  are required. setSharedFolderState Modifies the writability state of a specified folder shared  (VMware vSphere and  between the host and a guest virtual machine (.vmx file). VMware Server do not  The share name is a mount point in the guest file system.  support shared folders.) The path to folder is the exported directory on the host.  writable | readonly A shared folder can be made writable or read‐only. addSharedFolder Adds a folder to be shared between the host and guest.  (VMware vSphere and  The share name is a mount point in the guest file system.  VMware Server do not  The path to folder is the exported directory on the host. support shared folders.) On Windows guests, there might be a delay before  shared folders are visible to the InGuest commands. removeSharedFolder Removes the guest virtual machine’s access to a shared  (VMware vSphere and  folder on the host. The share name is a mount point in  VMware Server do not  the guest file system. support shared folders.) enableSharedFolders Allows the guest virtual machine, specified by .vmx file,  (VMware vSphere and  to share folders with its host. After enabling, run  [runtime] VMware Server do not  addSharedFolder to specify each host folder to share. support shared folders.) The optional runtime argument means to share folders  only until the virtual machine is powered off. Otherwise,  the setting persists at next power on. disableSharedFolders Stops the guest virtual machine, specified by .vmx file,  (VMware vSphere and  from sharing folders with its host. [runtime] VMware Server do not  The optional runtime argument means to stop sharing  support shared folders.) folders only until the virtual machine is powered off.  Otherwise, the setting persists at next power on. listProcessesInGuest Lists all processes running in the guest operating  system. VMware Tools and a valid guest login are  required. killProcessInGuest Stops a specified process in the guest operating system.  VMware Tools and a valid guest login are required. The process ID can be any number listed after pid= in  the output of listProcessesInGuest. runScriptInGuest Runs the specified command script in the guest  operating system. VMware Tools and a valid guest login  are required. The interpreter path is the command that runs the script.  Provide the complete text of the script, not a filename. deleteFileInGuest Deletes the give file from the guest operating system.  VMware Tools and a valid guest login are required. For Windows Vista restrictions on this command, see  note in “Guest to Host File Operations” on page 17. createDirectoryInGuest Creates the specified directory in the guest operating  system. VMware Tools and a valid guest login are  required. For Windows Vista restrictions on this command, see  note in “Guest to Host File Operations” on page 17. deleteDirectoryInGuest Deletes the specified directory from the guest operating  system. VMware Tools and a valid guest login are  required. For Windows Vista restrictions on this command, see  note in “Guest to Host File Operations” on page 17. VMware, Inc. 13,

Table 2. vmrun Commands and Parameters (Continued)

Command Description Parameters listDirectoryInGuest Lists contents of the specified directory in the guest  operating system. VMware Tools and a valid guest login  are required. copyFileFromHostToGuest Copies a file from the host to the guest operating system.  VMware Tools and a valid guest login are required. Specify the source file (host) before the destination file  (guest). For Windows Vista restrictions on this command, see  note in “Guest to Host File Operations” on page 17. copyFileFromGuestToHost Copies a file from the guest operating system to the host.  VMware Tools and a valid guest login are required. Specify the source file (guest) before the destination file  (host). renameFileInGuest Renames or moves a file in the guest operating system.  VMware Tools and a valid guest login are required. Specify the source name (original) before the destination  (new). captureScreen Captures the screen of the virtual machine to a local file.  The specified output file on the host is in PNG format. A valid guest login is required. writeVariable Writes a variable to the virtual machine state or guest.  You can set either runtime configuration in the .vmx file,  [ runtimeConfig | or environment variables in the guest operating system.  guestEnv ] Environment variables require VMware Tools and valid  guest login. For Linux guests, setting the guestEnv  requires root login. Provide the variable name and its value. readVariable Reads a variable from the virtual machine state or guest.  You can get either runtime configuration in the .vmx file,  [ runtimeConfig | or environment variables in the guest operating system.  guestEnv ] The latter requires a valid guest login. Maintenance Commands list Lists all running virtual machines. None upgradevm Upgrades a virtual machine to the current version of  virtual hardware. Has no effect if the virtual hardware  version is the most recent supported. installTools Prepares to install VMware Tools in the guest operating  system. In Windows guests with autorun enabled, the  VMware Tools installer starts by itself. In Linux guests  without autorun, this command connects the virtual  CD‐ROM drive to the VMware Tools ISO image suitable  for the guest, but the installer does not start. You must  complete the installation with additional manual steps,  as described in the product documentation. register Registers the specified virtual machine, adding it to the  (Registration not supported  host’s inventory. Path format depends on the product.  on Workstation or on  For VMware Server 2.0, "[storage1] vm/vm.vmx"  VMware Fusion.) (starting with the datastore) is typical. unregister Unregisters the specified virtual machine, removing it  (Registration not supported  from the host’s inventory. Path format depends on the  on Workstation or on  product. For Server 2.0, "[storage1] vm/vm.vmx"  VMware Fusion.) (starting with the datastore) is typical. listRegisteredVM Lists all registered virtual machines. None deleteVM Removes the specified virtual machine. 14 VMware, Inc.,

Table 2. vmrun Commands and Parameters (Continued)

Command Description Parameters clone Creates a copy of the virtual machine and guest. Provide  (Cloning not supported on  both the source and the destination .vmx file pathname.  VMware Server or on  You can create either a full clone or a linked clone. To  full | linked VMware Fusion.) create the clone from a snapshot, rather than from the  current virtual machine state, specify a snapshot name. [  ] VProbes Commands (VProbes permitted only on Workstation and VMware Fusion.) vprobeVersion Shows the VProbes version on the virtual machine. vprobeLoad Loads a VP script onto the virtual machine. vprobeLoadFile Loads a VP script file onto the virtual machine. vprobeReset Disables all VProbes on the virtual machine. vprobeListProbes Lists active VProbes on the virtual machine. vprobeListGlobals Lists VProbes global variables on the virtual machine.

Examples of Using vmrun The following command‐line examples work on Workstation (-T ws), VMware Fusion (-T fusion), or  VMware ESX/ESXi hosts (-T esx). You can derive the guest operating system type in examples by distinguishing / for Linux and \ for Windows. Reboot Commands Reboot a virtual machine running on Workstation for Linux:

vmrun -T ws reset /path/to/vm/RHEL4/RHEL4.vmx soft

Reboot a virtual machine running on Workstation for Windows:

cd "C:\Documents and Settings\\My Documents\My Virtual Machines" vmrun -T ws reset "WindowsXP\WindowsXP.vmx" soft

Reboot a virtual machine running on VMware Fusion:

vmrun -T fusion reset ~/Documents/VirtualMachines.localized/WindowsXP.vmwarevm/WindowsXP.vmx soft

Reboot a virtual machine running on an ESX/ESXi host:

vmrun -T esx -h https://10.0.1.8/sdk -u root -p reset "[storage1] WinXP/WinXP.vmx" soft

Power Commands Power on a virtual machine with Workstation on a Windows host:

vmrun start "C:\Documents and Settings\\My Documents\My Virtual Machines\WinXP\WinXP.vmx"

This error message following this command indicates that the VIX package you installed does not support  VMware Server:

vmrun -T server start "My Virtual Machines\WinXP\WinXP.vmx" Error: The specified service provider was not found

Power off a virtual machine with Workstation on a Windows host:

vmrun stop "C:\Documents and Settings\\My Documents\My Virtual Machines\WinXP\WinXP.vmx"

On the remote ESX/ESXi host with IP address 10.0.1.8, power on a virtual machine:

vmrun -T esx -h https://10.0.1.8/sdk -u root -p start "[storage1] WinXP/WinXP.vmx" VMware, Inc. 15, If HTTPS service is not configured on port 443, specify the appropriate port after the colon: vmrun -T esx -h https://10.0.1.9:8333/sdk -u root -p start "[storage1] WinXP/WinXP.vmx" On the remote ESX/ESXi host with IP address 10.0.1.8, power off the virtual machine: vmrun -T esx -h https://10.0.1.8/sdk -u root -p start "[storage1] WinXP/WinXP.vmx" For VMware Server installed on Windows hosts, the -u user is usually Administrator, not root. vmrun -T server -h https://10.0.1.8/sdk -u Administrator -p start "[std] WinXP/WinXP.vmx"

Snapshot Commands

Create a snapshot of a virtual machine with Workstation on a Linux host or VMware Fusion: vmrun -T ws snapshot /path/to/vm/Ubuntu/Ubuntu.vmx mySnapshot List snapshots on the virtual machine, showing the one made in the previous command: vmrun -T ws listSnapshots /path/to/vm/Ubuntu/Ubuntu.vmx Total snapshots: 1 mySnapshot Revert to the snapshot you made, which suspends the virtual machine, and restart to resume operation: vmrun -T ws revertToSnapshot /path/to/vm/Ubuntu/Ubuntu.vmx mySnapshot vmrun -T ws start /path/to/vm/Ubuntu/Ubuntu.vmx Delete the snapshot by specifying its name: vmrun -T ws deleteSnapshot /path/to/vm/Ubuntu/Ubuntu.vmx mySnapshot

Record and Replay Commands

Start recording user events on a Windows guest, beginning with a snapshot of the virtual machine state: vmrun -T ws -gu -gp beginRecording WinXP\WinXP.vmx session1 When you stop recording, name the recording session: vmrun -T ws -gu -gp endRecording WinXP\WinXP.vmx Revert to the virtual machine snapshot and start replaying the recording of user events: vmrun -T ws -gu -gp beginReplay WinXP\WinXP.vmx session1 Pause replay: vmrun -T ws -gu -gp pause WinXP\WinXP.vmx Resume replay: vmrun -T ws -gu -gp unpause WinXP\WinXP.vmx End replay: vmrun -T ws -gu -gp endReplay WinXP\WinXP.vmx

Running Guest Applications

Start the command tool, minimized, on a Windows guest: vmrun -T ws -gu -gp runProgramInGuest WinXP\WinXP.vmx cmd.exe Start the command tool on a Windows guest as an active window on the desktop: vmrun -T ws -gu -gp runProgramInGuest WinXP\WinXP.vmx -activeWindow cmd.exe Run a batch script file on a Windows guest, with Perl as the script interpreter: vmrun -T ws -gu -gp runScriptInGuest Win2k\Win2k.vmx C:\perl\perl.exe C:\script.pl 16 VMware, Inc., Run a batch script and keep running afterwards. To use cmd.exe on Windows, you must specify the script  interpreter as null: vmrun -T ws -gu -gp runScriptInGuest WindowsXP\WindowsProfessionalXP.vmx "" "cmd.exe /k \"C:\\Program Files\\Microsoft Visual Studio\\VC\\vcvarsall.bat\" x86" Run a Bash shell script called runit on a Linux guest: vmrun -T ws -gu -gp runScriptInGuest Ubuntu/Ubuntu.vmx /bin/bash /home//runit Start an X clock on a Linux guest (this requires the -display option to appear on the console). Run the same  X clock command, but return control back to the console immediately: vmrun -gu -gp runProgramInGuest SUSE/SUSE.vmx /usr/bin/xclock -display :0 vmrun -gu -gp runProgramInGuest SUSE/SUSE.vmx -noWait /usr/bin/xclock -display :0 For Linux applications that do not accept the -display option, you can set the guest environment for the  vmware-guestd process, which affects subsequent commands (guestEnv requires root permission): vmrun -T ws -gu root -gp writeVariable Ubuntu/Ubuntu.vmx guestEnv DISPLAY :0 vmrun -T ws -gu -gp runProgramInGuest Ubuntu/Ubuntu.vmx /usr/bin/firefox List processes in a Linux guest, and end the process numbered 8192: vmrun -T ws -gu -gp listProcessesInGuest Ubuntu/Ubuntu.vmx vmrun -T ws -gu -gp killProcessInGuest Ubuntu/Ubuntu.vmx 8192 Run a Perl script on a Linux guest to remove DOS‐style carriage returns from a file: vmrun -T ws -gu -gp runProgramInGuest Ubuntu/Ubuntu.vmx /usr/bin/perl -e "open(FILE, '>/tmp/unix.txt'); while (<>) { s/\r\n/\n/ ; print FILE}" /tmp/dos.txt Run a Perl script on a Windows guest to insert DOS‐style carriage returns in a file: vmrun -T ws -gu -gp runProgramInGuest WinXP\WinXP.vmx C:\cygwin\bin\perl.exe -e "open(FILE, ‘>C:\dos.txt’); while (<>) { s/\n/\r\n/ ; print FILE}" C:\unix.txt Run a program in a Linux virtual machine on an ESX/ESXi host: vmrun -T esx -h https://10.0.1.8/sdk -u root -p -gu -gp runProgramInGuest "[storage1] RHEL4/RHEL4.vmx" /usr/X11R6/bin/xclock -display :0

Guest to Host File Operations

To copy a file from the host to a guest, the user must have write permission on the destination: vmrun -gu -gp copyFileFromHostToGuest Ubuntu\Ubuntu.vmx C:\Temp\img.db /tmp/img.db To copy a file from a guest to the host, the user must have read permission on the source file: vmrun -gu -gp copyFileFromGuestToHost Ubuntu\Ubuntu.vmx /home//addr addr.txt Before sharing folders, you must enable them with the enabledSharedFolders command, or by selecting  VM > Settings > Options > Shared Folders > Enabled in the user interface. On Linux guests, the /mnt/hgfs  directory is available for sharing, but you can use a different directory for shared folders. To share a folder on a Windows host with a particular Linux guest: vmrun -T ws addSharedFolder Ubuntu\Ubuntu.vmx C:\Share Shared folders are writable by default. To make a shared folder read‐only or to delete the shared folder: vmrun -T ws setSharedFolderState Ubuntu\Ubuntu.vmx C:\Share readonly vmrun -T ws removeSharedFolder Ubuntu\Ubuntu.vmx NOTE   On Windows Vista, only the Administrator account can perform certain operations. Only the  Administrator account can use copyFileFromHostToGuest and deleteFileInGuest to write and delete  files in C:\ and system directories. Only the Administrator account can use createDirectoryInGuest and  deleteDirectoryInGuest to modify system directories. Regular users, even those with administrator  privilege, cannot perform these operations. VMware, Inc. 17,

Maintenance Commands

List running virtual machines on Workstation: vmrun -T ws list Total running VMs: 2 C:\Documents and Settings\user\My Documents\My Virtual Machines\Ubuntu\Ubuntu.vmx C:\Documents and Settings\user\My Documents\My Virtual Machines\WinXP\WinXP.vmx Prepare to install VMware Tools on VMware Fusion: vmrun -T fusion installTools RedHatEnt5/RedHatEnt5.vmx Register a new virtual machine installed on an ESX/ESXi host: vmrun -T esx -h https://10.0.1.5/sdk -u root -p register "[storage1] RHEL5/RHEL5.vmx" Unregister an old virtual machine going out of service on an ESX/ESXi host: vmrun -T esx -h https://10.0.1.5/sdk -u root -p unregister "[storage1] RHEL3/RHEL3.vmx" On VMware vCenter Server, the vmrun utility supports the same form of path‐to‐VMX specification as  ESX/ESXi hosts. You cannot reach a virtual machine file through its resource pool or vApp. vmrun -T vc -h https://10.0.1.9/sdk -u Administrator -p register "[storage1] RHEL5/RHEL5.vmx" 18 VMware, Inc.,

Index

A listDirectoryInGuest 14 addSharedFolder command 13, 17 listProcessesInGuest 13 readVariable 14 B removeSharedFolder 13 beginRecording command 12, 16 renameFileInGuest 14 beginReplay command 12, 16 runProgramInGuest 12 runScriptInGuest 13 C setSharedFolderState 13 captureScreen command 14 user name and password 9 clone command 15 writeVariable 14 command-line flags 9 copyFileFromGuestToHost command 14, 17 I copyFileFromHostToGuest command 14, 17 installTools command 14, 18 createDirectoryInGuest command 13

K

D killProcessInGuest command 13, 17 deleteDirectoryInGuest command 13 deleteFileInGuest command 13 L deleteSnapshot command 12, 16 Linux setup 8 deleteVM command 14 list command 14, 18 dialog boxes, disabling 10 listDirectoryInGuest command 14 disableSharedFolders command 13 listProcessesInGuest command 13, 17 listRegisteredVM command 14 E listSnapshots command 11, 16 enableSharedFolders 13 endRecording command 12, 16 M endReplay command 12, 16 Mac OS setup 9 ESX/ESXi hosts, flags for 10 maintenance commands 8 clone 15 F deleteVM 14 fileExistsInGuest command 13 installTools 14 flags on command line 9 list 14 Fusion, flags for 9 listRegisteredVM 14 register 14 G unregister 14 guest operations 8 upgradevm 14 addSharedFolder 13 captureScreen 14 P copyFileFromGuestToHost 14 path to VMX file 10 copyFileFromHostToGuest 14 pause command 11, 16 createDirectoryInGuest 13 power commands 7 deleteDirectoryInGuest 13 pause 11 deleteFileInGuest 13 reset 11 disableSharedFolders 13 start 11 enableSharedFolders 13 stop 11 fileExistsInGuest 13 suspend 11 killProcessInGuest 13 unpause 11 VMware, Inc. 19, R W record and replay commands 7 Windows setup 9 beginRecording 12 Workstation, flags for 9 beginReplay 12 writeVariable command 14, 17 endRecording 12 endReplay 12 register command 14, 18 removeSharedFolder command 13, 17 renameFileInGuest command 14 reset command 11, 15 revertToSnapshot command 12, 16 runProgramInGuest command 12, 16 runScriptInGuest command 13, 16

S

Server, flags for 10 setSharedFolderState command 13, 17 setup on Linux 8 setup on Mac OS 9 setup on Windows 9 snapshot command 11, 16 snapshot commands 7 deleteSnapshot 12 listSnapshots 11 revertToSnapshot 12 snapshot 11 start command 11, 15 stop command 11, 15 suspend command 11

T

technical support resources 5

U

unpause command 11, 16 unregister command 14, 18 upgradevm command 14

V

vCenter Server, flags for 10 vmrun utility 7 VMware Fusion, flags for 9 VMware Server, flags for 10 VMware vSphere, flags for 10 VMware Workstation, flags for 9 VMX file, specifying 10 VProbes commands 8 vprobeListGlobals 15 vprobeListProbes 15 vprobeLoad 15 vprobeLoadFile 15 vprobeReset 15 vprobeVersion 15 20 VMware, Inc.]
15

Similar documents

Oracle VM VirtualBox©R User Manual Version 4.3.12 ©c 2004-2014 Oracle Corporation http://www.virtualbox.org
Oracle VM VirtualBox©R User Manual Version 4.3.12 ©c 2004-2014 Oracle Corporation http://www.virtualbox.org Contents 1 First steps 11 1.1 Why is virtualization useful? .12 1.2 Some terminology .12 1.3 Features overview .13 1.4 Supported host operating systems .15 1.5 Installing VirtualBox and extens
Using the FarCry dedicated server (Linux)
Using the FarCry dedicated server (Linux) 2004-09-28 © 2019 Crytek 1 Using the FarCry dedicated server (Linux)...1 Profiles...3 Starting dedicated server...3 Running a server without profiles...4 Mapcycle...5 Running the server on a specific network adapter and port...5 Having your server listed on
UTILITY CD For 8cm 210MB CDR DOS Menu ( Bootable CD )
UTILITY CD For 8cm 210MB CDR DOS Menu ( Bootable CD ) 1) BOOT FROM DRIVE C:\ 2) REBOOT 3) ERD COMMANDER 2005 Designed for WinXP/2000 but gives one a useful GUI in Win9X/ME. (Most components work in Windows VISTA) Includes as standard in ERD Commander : Explorer Disk Commander File Restore Locksmith
…90 shots to thank gravity…
…90 shots to thank gravity… …the end…
Using the Torg Drama Deck with MasterBook Rules
Using the Torg Drama Deck with MasterBook Rules In general, the Torg Drama Deck may be used with the MasterBook game system without modification, just by reading what's on the card. Nonetheless, here are some guidelines to make the Torg Drama Deck more like the MasterDeck. Note that there are more c
ULTRA DARK-POWERED VIRTUAL GUITAR USER MANUAL
ULTRA DARK-POWERED VIRTUAL GUITAR USER MANUAL Table of Contents Table of Contents ...2 License ... 5 Introduction ...6 System Requirements ...9 [IMPORTANT] Preload buffer size configuration ... 10 Tips ... 11 SPM (Super Performance Multi) ... 12 Multi: V_METAL ...1 3 Instrument select key switches .
Vase C B
Vase Copyright 1998-99 Stephen Hecht. All Rights Reserved A 172mm square produces a model 44mm high with a 40mm square base and a 30mm square opening. 1. White side up. 2. Mountain crease in thirds. 3. Valley crease halfway Valley crease all bisectors. between half-lines and third-lines. AACB4. Fold
GAYELLOW PAGESTM INFORMING THE LESBIAN, GAY, BISEXUAL & TRANSGENDER COMMUNITY SINCE 1973 ONLINE UPDATE January 2016 Index page 605 The Index includes page number references to: Names, subject headings, subject cross
GAYELLOW PAGES 1 GAYELLOW PAGES Contents Contents GAYELLOW PAGESTM INFORMING THE LESBIAN, GAY, BISEXUAL & TRANSGENDER COMMUNITY SINCE 1973 ONLINE UPDATE January 2016 Index page 605 The Index includes page number references to: Names, subject headings, subject cross references; Location references (e
Version 1.5 Hardware Manual
Version 1.5 Hardware Manual Release: 21-MAR-2012 VCM II Hardware Manual Trademark Acknowledgements Ford is a registered trademark of Ford Motor Company. Vetronix is a registered trademark of Vetronix Corporation. Copyright Information VCM II Hardware Manual Copyright © 2012 Ford Motor Company. The i
SYBEX Sample Chapter Mastering™ Visual Basic® .NET Database Programming Evangelos Petroutsos; Asli Bilgin Chapter 6: A First Look at ADO.NET
SYBEX Sample Chapter Mastering™ Visual Basic® .NET Database Programming Evangelos Petroutsos; Asli Bilgin Chapter 6: A First Look at ADO.NET Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publication may be stored in a retrieval sy
VIDEO COPILOT END-USER SOFTWARE LICENSE AGREEMENT
VIDEO COPILOT END-USER SOFTWARE LICENSE AGREEMENT IMPORTANT! The Video Copilot software (the “Software”) You seek to download from the Video Copilot website is licensed only on the condition that You agree to the terms and conditions set forth below. PLEASE READ THE TERMS OF THIS SOFTWARE LICENSE AG
VAMPIRE THE MASQUERADE 20th ANNIVERSARY EDITION 1
VAMPIRE THE MASQUERADE 20th ANNIVERSARY EDITION12FOREWORD For twenty years, you’ve been reading and listening to us talk about Vampire: The Masquerade. This time, we thought it was the community’s turn to talk. We approached a number of rabid Vampire fans from all over the world (some of which have
VirtualDJ 8 – Quick Setup Guide 1
VirtualDJ 8 – Quick Setup Guide 1 Table of Contents Welcome to VirtualDJ 8!... 3 Installation ... 4 WINDOWS ... 4 MAC ... 5 Opening VirtualDJ 8 for the first time... 7 Installation Notes ... 9 Application paths ... 9 Upgrading to Version 8 ... 9 Database ... 10 System requirements ... 11 Legal Infor
VisiBone ReadMe File
VisiBone ReadMe File 1. English ... 2 2. Français... 3 3. Deutsch ... 4 4. 日本語... 5 5. Italiano... 6 6. Español ... 7 7. Svenska... 8 8. Nederlands... 9 9. Dansk... 10 10. Suomi ... 11 11. Norsk ... 12 12. Português Brasileiro ... 13 13. 한국어... 14 14. 简体中文 ... 15 15. 繁體中文 ... 16 16. Česky... 17 17.
VirtualDJ 8 - User’s Guide 1
VirtualDJ 8 - User’s Guide 1 Table of Contents A. BASIC FEATURES ... 4 Top Section ... 6 Application Controls & Info ... 6 Waveform Display ... 7 Deck Controls ... 10 Track Info Display ... 10 Basic Deck Controls ... 12 Advanced Deck Controls ... 15 HotCues ... 16 Effects ... 17 Loops... 19 Custom B
Collision SDK
Collision SDK Collision SDK is a set of function calls that allows custom vessels to use some advanced features of Visosad. Example of using CSDK is located in \CollisionSDK\sample That is a stock DeltaGlider code with some modificaions, including gear suport and HUD altitude above terrain indicator
Visosad 1.9
Visosad 1.9 Collision detection for Orbiter space flight simulator.. ( ORBITER is written and maintained by Martin Schweiger http://www.orbitersim.com ) Contents Description...1 Installation/Usage...2 Scenario options...3 Making your terrain collision-aware...3 Making your vessel collision-aware...4
Visual Basic and Databases 1. Introducing Visual Basic and Databases
1-1 Visual Basic and Databases 1. Introducing Visual Basic and Databases Preview • In this first chapter, we will do a quick overview of what the course entails. We will discuss what you need to complete the course. We’ll take a brief look at what databases are, where they are used, and how Visual B
Advances in Social Science Research Using R
Advances in Social Science Research Using R For other titles in this series, go to www.springer.com/series/694 H.D. Vinod Editor Advances in Social Science Research Using R Editor Hrishikesh D. Vinod, Ph. D. Department of Economics Fordham University 441 E. Fordham Road Bronx NY 10458 USA ISBN 978-1
® Precise Selective Photo Editing for Photoshop®, Lightroom®, and ApertureTM
® Getting Started VIVEZA 2 Precise Selective Photo Editing for Photoshop®, Lightroom®, and ApertureTM Getting Started VIVEZA 2 Table of contents 2 What’s new 3 Installation 4 Interface 5 Lesson 1 - Darkening the sky in a photograph 8 Lesson 2 - Removing color casts selectively 9 Lesson 3 - Lightenin
Getting Started Guide
Getting Started Guide VMware Player 3.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000171-00 You can fin
VMware Tools Configuration Utility User's Guide
VMware Tools Configuration Utility User's Guide VMware Fusion 3.0 VMware ACE 2.6 VMware Workstation 7.0 VMware Player 3.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions
Praise for Buddha's Little Finger
Praise for Buddha's Little Finger Televin's fine absurdist mind takes on a bit of his country's dubious history and molds it into a Buddhist retelling, in which the plague of doubt cultivated by Russia's past plays beautifully. All the while, his story works with notions of personal and national ide
Oracle©R VM VirtualBox©R User Manual Version 6.0.0 ©c 2004-2018 Oracle Corporation http://www.virtualbox.org
Oracle©R VM VirtualBox©R User Manual Version 6.0.0 ©c 2004-2018 Oracle Corporation http://www.virtualbox.org Contents Prefacei1First Steps 1 1.1 Why is Virtualization Useful? .2 1.2 Some Terminology .2 1.3 Features Overview .3 1.4 Supported Host Operating Systems .5 1.5 Host CPU Requirements .6 1.6
Van Morrison
Van Morrison Born Aug 31, 1945 in Belfast, Northern Ireland Years Active Genres Rock Celtic Rock, Album Rock, Jazz-Rock, Blue-Eyed Soul, Pop/Rock, Folk- Styles Rock, Soft Rock, Adult Contemporary, Singer/Songwriter Instruments Vocals, Saxophone, Leader, Keyboards, Songwriter, Harmonica Reflective, P
BACH EDITION VOLUME I Orchestral Works / Chamber Music
BACH EDITION VOLUME I Orchestral Works / Chamber Music CD I-1 BRANDENBURG CONCERTOS 1-2-3 The surviving orchestral works of Johann Sebastian Bach provide examples of concertos and suites, the two most important orchestral genres in the late Baroque. Bach dedicated his final versions of the six Brand
BACH EDITION VOLUME VI Organ Works
BACH EDITION VOLUME VI Organ Works CD VI-1 ORGAN WORKS The Choir Organ is an attempt to reconstruct the organ built in Kristine Church in 1742 by Johan Niclas Cahman. Cahman has been called “The Father of Swedish Organ Building”. The famous instruments which he built include the cathedral organs at
VoIP DUMmIES
01_588435 ffirs.qxd 8/1/05 7:15 PM Page i VoIP FOR ‰ DUMmIES 01_588435 ffirs.qxd 8/1/05 7:15 PM Page ii 01_588435 ffirs.qxd 8/1/05 7:15 PM Page iii VoIP FOR ‰ DUMmIES by Timothy Kelly Foreword by Don Peterson Chairman and Chief Executive Officer, Avaya Inc. 01_588435 ffirs.qxd 8/1/05 7:16 PM Page iv
Topic Configuration Maximums VMware® vSphere 4.1 Virtual Machine Maximums
Topic Configuration Maximums VMware® vSphere 4.1 When you select and configure your virtual and physical equipment, you must stay at or below the maximums supported by vSphere 4.1. The limits presented in the following tables represent tested, recommended limits, and they are fully supported by VMwa
W140001XQ Military Topographic Map I
UNITED STATES MARINE CORPS THE BASIC SCHOOL MARINE CORPS TRAINING COMMAND CAMP BARRETT, VIRGINIA 22134-5019 MILITARY TOPOGRAPHIC MAP I W140001XQ STUDENT HANDOUT Warrant Officer Basic Course Military Topographic Map I Introduction Cartography is the art and science of expressing the known physical fe