A network serial port is a virtual serial port that uses a network socket on the host computer. A network socket is the endpoint of a network connection and is represented by an IP address and a port number. The vSphere API uses Uniform Resource Identifiers (URI) to identify the protocol, IP address, and port number for endpoints of network serial port connections. See
RFC3986 for information about Uniform Resource Identifiers.
To use a network serial port, you must verify that the ESX host supports the feature and then create or reconfigure a virtual machine to configure the port. For information about writing an application that uses the vSphere API, see the
vSphere Web Services SDK Programming Guide. As an alternative, you can use the vSphere Client to configure a network serial port. For more information, see the online help for the VMware vSphere Client.
Backing option objects identify host device support for virtual machines. An ESX host defines the set of virtual device backing options that are available for virtual machines. To use a network serial port, the ESX host must provide the virtual serial port URI backing option, which is represented by the
VirtualSerialPortURIBackingOption object. For information about how to find out if the host supports the URI backing option, see
Determining Backing Options.
Backing information objects supply data for virtual device configuration. Use a VirtualSerialPortURIBackingInfo object to bind a virtual serial port to a network socket. You can configure a virtual serial port to use URI backing when you create or reconfigure a virtual machine. For a description of how to configure URI backing for a network serial port, see
Creating a Virtual Machine with a Network Serial Port.
You can use either telnet or secure telnet (telnets) for the proxy connection. The proxy URI specification must use one of the following formats. See
RFC3986 for information about URI syntax. See the description of the
VirtualSerialPortURIBackingInfo data object in the
vSphere API Reference for information about URI schemes and authentication parameters for network serial port configuration.
Virtual Serial Port Connections to a Remote System Through a Proxy shows two virtual machines. Each machine uses a proxy for its connection to a remote system.
The proxy has two network sockets. It uses one socket (proxy URI) for the telnet connections with the virtual machine and the other for the connection with the remote system. The external connection between the proxy and a remote system uses the mutually agreed upon protocol. For a connection initiated by the remote system, the person operating the remote system must obtain the service URI by email or other independent communication.
You use the QueryConfigOption method to determine the backing options that are available on the host on which you will create the virtual machine. The method returns a
VirtualMachineConfigOption data object. The virtual machine configuration data includes a a list of virtual device options and a list of backing options. The following pseudocode shows the path to the backing options.
The virtual device option array must include the VirtualSerialPortOption data object. For network backing, the array of serial port backing options must include the
VirtualDeviceURIBackingOption data object. The
VirtualDeviceURIBackingOption.type property specifies the name of the backing object you should create when you configure network backing.
You can use the CreateVM_Task method to create a virtual machine and configure a network serial port. The virtual machine uses the virtual serial port configuration to connect to a proxy and to accept a connection from a remote system.
The startConnected property determines whether the virtual machine will open a connection with the proxy when the virtual machine starts. When the virtual machine powers on, it copies the
startConnected value to the
VirtualDeviceConnectInfo.connected property. While the virtual machine is running, you can use the
ReconfigVM_Task method to set the
connected property to open or close the proxy connection. If you reconfigure a port with
connected set to TRUE, the virtual machine closes the existing connection and opens a new one.