VMware

VMware ACE

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Connecting an Application on the Host to a Virtual Machine

Connecting an Application on the Host to a Virtual Machine

You can set up the virtual serial port in a virtual machine to connect to an application on the host computer. This is useful, for example, if you want to use an application on the host to capture debugging information sent from the virtual machine's serial port.

To install a direct serial connection between an application on the host and a virtual machine, take the following steps:

  1. Open the virtual machine settings editor (VM > Settings).
  2. Click Add to start the Add Hardware Wizard.
  3. Select Serial Port, then click Next.
  4. Select Output to named pipe, then click Next.
  5. Use the default pipe name, or enter another pipe name of your choice. The pipe name must follow the form \\.\pipe\<namedpipe> — that is, it must begin with \\.\pipe\.
  6. Select This end is the server or This end is the client. In general, select This end is the server if you plan to start this end of the connection first.
  7. Select The other end is an application.
  8. By default, the device status setting is Connect at power on. You may deselect this setting if you wish.

    Click Advanced if you want to configure this serial port to use polled mode. This option is of interest primarily to developers who are using debugging tools that communicate over a serial connection. For more information, see Special Configuration Options for Advanced Users.

  9. Click Finish, then click OK to close the virtual machine settings editor.
  10. On your host computer, configure the application that communicates with the virtual machine to use the same pipe name.
  11. Power on the virtual machine.
Connecting Two Virtual Machines

Connecting Two Virtual Machines

You can set up the virtual serial ports in two virtual machines to connect to each other. This is useful, for example, if you want to use an application in one virtual machine to capture debugging information sent from the other virtual machine's serial port.

To install a direct serial connection between two virtual machines (a server and a client), take the following steps:

In the server virtual machine

In the server virtual machine

  1. Open the virtual machine settings editor (VM > Settings).
  2. Click Add to start the Add Hardware Wizard.
  3. Select Serial Port, then click Next.
  4. Select Output to named pipe, then click Next.
  5. Use the default pipe name, or enter another pipe name of your choice. The pipe name must follow the form \\.\pipe\<namedpipe> — that is, it must begin with \\.\pipe\.
  6. Select This end is the server.
  7. Select The other end is a virtual machine.
  8. By default, the device status setting is Connect at power on. You may deselect this setting if you wish.

    Click Advanced if you want to configure this serial port to use polled mode. This option is of interest primarily to developers who are using debugging tools that communicate over a serial connection. For more information, see Special Configuration Options for Advanced Users.

  9. Click Finish, then click OK to close the virtual machine settings editor.
In the client virtual machine

In the client virtual machine

  1. Open the virtual machine settings editor (VM > Settings).
  2. Click Add to start the Add Hardware Wizard.
  3. Select Serial Port, then click Next.
  4. Select Use named pipe.
  5. Use the default name, or enter another pipe name of your choice. The pipe name must follow the form \\.\pipe\<namedpipe> — that is, it must begin with \\.\pipe\. The pipe name must be the same on both the server and the client.
  6. Select This end is the client.
  7. Select The other end is a virtual machine.
  8. By default, the device status setting is Connect at power on. You may deselect this setting if you wish.

    Click Advanced if you want to configure this serial port to use polled mode. This option is of interest primarily to developers who are using debugging tools that communicate over a serial connection. For more information, see Special Configuration Options for Advanced Users.

  9. Click Finish, then click OK to close the virtual machine settings editor.
Special Configuration Options for Advanced Users

Special Configuration Options for Advanced Users

Two special configuration options are available for serial connections between a virtual machine and the host or between two virtual machines. These options are of interest primarily to developers who are using debugging tools that communicate over a serial connection.

Improving CPU Performance when Debugging

Improving CPU Performance when Debugging

The first option must be set in the virtual machine settings editor. This option is useful when the serial port is being used by the guest operating system in polled mode as opposed to interrupt mode. Polled mode causes the virtual machine to consume a disproportionate share of CPU time. This makes the host and other guests run sluggishly.

To restore performance for applications on the host, in the virtual machine settings editor, select the virtual serial port, and check the Yield CPU on poll check box. This configuration option forces the affected virtual machine to yield processor time if the only task it is trying to do is poll the virtual serial port.

Changing the Input Speed of the Serial Connection

Changing the Input Speed of the Serial Connection

To use the second option, power off the virtual machine and close the VMware ACE Manager window, then use a text editor to add the following line to your virtual machine's configuration file:

serial<n>.pipe.charTimePercent = <x>

This option is useful if you want to squeeze every possible bit of speed from your serial connection over a pipe to the virtual machine. In principle, there is no limit on the output speed — the speed at which the virtual machine sends data through the virtual serial port. In practice, the output speed depends on how fast the application at the other end of the pipe reads data coming into it.

<n> is the number of the serial port, starting from 0. So the first serial port is serial0.

<x> is any positive integer. It specifies the time taken to transmit a character, expressed as a percentage of the default speed set for the serial port in the guest operating system. For example, a setting of 200 forces the port to take twice as long per character, or send data at half the default speed. A setting of 50 forces the port to take only half as long per character, or send data at twice the default speed.

You should first use the guest operating system to configure the serial port for the highest setting supported by the application you are running in the virtual machine.

Once the serial port speed is set appropriately in the guest operating system, experiment with this setting. Start with a value of 100 and gradually decrease it until you find the highest speed at which your connection works reliably.

previous Prev   Contents   Last   Next next