VMware Telnet Session
To establish a VMware telnet session for remote serial port communication, a virtual machine and a proxy participate in a message exchange that follows the model of a standard telnet protocol sequence. The proxy handles messages from the virtual machine and sends the appropriate responses. Before the proxy can forward content, the virtual machine and the proxy participate in the following progression.
1
Both sides of the connection must agree to use the option before continuing with any additional extension message exchange.
2
The proxy must support the KNOWN-SUBOPTIONS-2 and UNKNOWN-SUBOPTION-RCVD-2 commands. During a session, the proxy can send the UNKNOWN-SUBOPTION-RCVD-2 command as a valid response to virtual machine messages.
3
VMware Telnet Extension Commands lists the VMware telnet extension commands along with brief descriptions. Commands in the table are grouped by purpose: VMware telnet extension and suboptions, proxy, vMotion, and identification. The table uses command symbols. A VMware telnet extension command is a two- or three-byte code embedded in a telnet command sequence. For more information about commands and the code equivalents, see VMware Telnet Extension Commands for Proxy Communication.
Establishing a VMware Telnet Extension Session
If you specify a proxy URI in the virtual serial port configuration, the virtual machine will initiate a telnet connection with the proxy. After the connection is established, the virtual machine initiates a message exchange to establish a VMware telnet extension session. The following progression describes the model for the message exchange and uses symbols to represent the codes. For the code equivalents, see the command descriptions in VMware Telnet Extension Commands for Proxy Communication.
1
Virtual Machine – Sends a message that indicates it will send VMware telnet extension commands to the proxy.
IAC WILL VMWARE-TELNET-EXT
Proxy – Responds, indicating that it will receive VMware telnet extension commands.
IAC DO VMWARE-TELNET-EXT
2
Virtual Machine – Sends a message that indicates the set of suboption commands that it can send and receive. The suboptions are expressed as a sequence of codes that correspond to suboption commands.
IAC SB VMWARE-TELNET-EXT KNOWN-SUBOPTIONS-1 suboptions IAC SE
Proxy – Responds, sending a message that indicates the set of suboption commands that it can send and receive.
IAC SB VMWARE-TELNET-EXT KNOWN-SUBOPTIONS-2 suboptions IAC SE
3
Virtual Machine – Sends a request for the proxy to act as a VMware telnet extension proxy. The proxy request includes direction and URI information from the network backing for the virtual serial port. (For information about using the API to specify this information, see Creating a Virtual Machine with a Network Serial Port.)
IAC SB VMWARE-TELNET-EXT DO-PROXY direction uri IAC SE
Proxy – Responds, indicating that it will perform proxy operations.
IAC SB VMWARE-TELNET-EXT WILL-PROXY IAC SE
Proxy Failure Detection (TCP keepalive)
The ESX Server uses a TCP keepalive timer to determine if a serial port connection between a virtual machine and a virtual serial port proxy is still active. By default, the virtual serial port keepalive time is 300 seconds.
To configure the keepalive time for a serial port connection, set the keepIdle advanced option for the virtual machine. The option name uses the following format:
serialn.keepIdle
n is an integer in a sequence starting with zero, corresponding to the sequence of serial ports on the virtual machine. Examples of keepIdle options include serial0.keepIdle, serial1.keepIdle, and serial2.keepIdle.
The keepIdle value is the duration in seconds on an idle connection, after which the ESX Server sends up to five keepalive probes to the virtual serial port proxy. If there is no response after five probes, the connection is considered inactive. The Server uses a keepalive interval of 1/100th of the keepIdle value, and a retry value of five. Using the default keepIdle value (300 seconds), the Server will detect a proxy failure no later than 315 seconds after the last activity (300 + 5*300/100).