Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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-000302-00
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: docfeedback@vmware.com
Copyright 2009, 2010 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.
Contents
AboutThisBook
1 RemoteSerialPortAccesswithaVirtualSerialPortProxy 7
VirtualSerialPortProxyCapabilities 8 ProxyasaVirtualSerialPortConcentrator 8 NetworkSerialPorts 9 BackingOptionsandBackingInformationforNetworkSerialPorts 9 NetworkConnectionsBetweenaVirtualMachine,aProxy,andaRemoteSystem 10 DeterminingBackingOptions 11 CreatingaVirtualMachinewithaNetworkSerialPort 11 VMwareTelnetSession 12 EstablishingaVMwareTelnetExtensionSession 13 vMotionandPersistentSerialPortConnections 13
2 VMwareTelnetExtensionCommandsforProxyCommunication 17
CommandSyntax 17 VMwareTelnetExtensionOption 18 OptionSubnegotiation 18 UnknownCommandResponse 19 ProxyOperation 20 vMotionNotification 20 VirtualMachineIdentification 22
Index 23
VMware, Inc.
VMware, Inc.
Revision History
Thisbookisrevisedwitheachreleaseoftheproductorwhennecessary.Arevisedversioncancontainminor ormajorchanges.Table 1summarizesthesignificantchangesineachversionofthisbook. Table 1. Revision History
Revision Date 13JUL2010 Description Initialrelease,supportedinVMwarevSphere4.1.
Intended Audience
ThisbookisintendedforanyonedevelopingavirtualserialportproxyforthevSphereenvironment.Proxy developersshouldhaveexperiencewiththetelnetprotocolandnetworkcommunication.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Sendyourfeedbackto docfeedback@vmware.com.
VMware, Inc.
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.
VMware, Inc.
TheVMwarevSphereAPIsupportstheuseofvirtualserialportsonvirtualmachinesthatrunonESX hosts.Avirtualserialportrepresentsaserialportonavirtualmachine.Avirtualserialportcanoperateasa networkserialportbyusinganetworksocketonthehosttoprovideaccesstoremotesystems.Aremote systemisanysystemonthenetworkthatsupportsaserialportconnectionwithavirtualmachine.Thisfeature supportsremoteconsoleloginforsystemmanagementusinganoutofbandconnectionthatbypassesthe vSphereClient. Youcanalsouseavirtualserialportforcommunicationthroughasoftwarepipe,foroutputtoafile,andfor communicationthroughaphysicalserialportonthehost.ForinformationaboutthevSphereAPIsupportfor theseapplications,seethedescriptionoftheVirtualSerialPortobjectinthevSphereAPIReference. InaVMwaredatacenter,avCenterServerusesvMotiontomovevirtualmachinesacrosshostsaspartof resourcemanagement.vSpheredoesnotsupportvMotionoperationsonavirtualmachinethathasadirect networkserialportconnectionwitharemotesystem.NetworkserialportsusethehostIPaddress.IftheServer attemptstomoveavirtualmachinewithanetworkserialportconnection,thehostrejectsthevMotionrequest tomaintaintheconnection. TosupportvMotionforvirtualmachinesthatusenetworkserialports,youcandevelopaproxythatoperates betweenavirtualmachineandaremotesystem.ThevSphereAPIsupportstheuseofathirdpartyvirtual serialportconcentratorinthedatacenterenvironment.Avirtualserialportconcentratoractsasaproxyoran accessserverbetweenvirtualmachinesandremotesystems.Theproxymaintainscommunicationwithvirtual machinesthatareusingnetworkserialports.WhenavMotioneventoccurs,thevirtualmachineconnectsto theproxyfromitsnewhostsothattheconnectionwiththeremotesystempersists. Virtualmachinesusethetelnetprotocolforvirtualserialportproxyconnections.VMwaredefinesatelnet extensionthatincludescommandsforproxynotificationofvMotionevents. Thischapterprovidesthefollowinginformation:
VMware, Inc.
remote system
Figure 11showstheconcentratoraspartofthevSpheredatacenter.Forthiskindofapplication,youcan deploytheconcentratorasavirtualappliance.Avirtualapplianceissoftwareonaplatformofoneormore virtualmachines(inthiscase,asinglevirtualmachine).Avirtualapplianceimplementationallowsyoutotake advantageofresourcemanagementthatvCenterServerprovides.ThevCenterserverusesvMotion technologytomigratethevirtualapplianceproxythroughthedatacenterwithoutinterruptingremoteserial portservice.ThevirtualapplianceusesvirtualmachineIPaddressesthatpersistacrossvMotionevents. AlthoughtheprimarypurposeoftheproxyistopreserveconnectionsduringvMotionevents,italsocan provideagatewayorfirewalltoenforcesecurity.Theproxyservesasthepointofauthenticationforremote systemsthatusevirtualserialportstoaccessvirtualmachines.
VMware, Inc.
Chapter 1 Remote Serial Port Access with a Virtual Serial Port Proxy
Directiondefinestherolethatthevirtualmachineplaysinaconnectionwitharemotesystem(clientor server).Whenavirtualmachineactsasaserialportclient,itinitiatestheconnectionwiththeremote system.Whenavirtualmachineactsasaserialportserver,itlistensforconnectionsthatareinitiatedby remoteclients. ServiceURIidentifiesthetargetofconnections.Whenthevirtualmachineactsasaclient,theservice URIidentifiestheremotesystem.Whenthevirtualmachineactsasaserver,theserviceURIidentifies proxyaccesstothehostonwhichthevirtualmachineruns.SeeRFC3986forinformationaboutURI syntax. ProxyURIidentifiesthevirtualserialportproxy.ThepresenceoftheproxyURIdirectsthevirtual machinetoestablishaconnectionwiththeproxy.Thevirtualmachinealwaysinitiatestheconnectionwith theproxy. Youcanuseeithertelnetorsecuretelnet(telnets)fortheproxyconnection.TheproxyURIspecification mustuseoneofthefollowingformats.SeeRFC3986forinformationaboutURIsyntax.
telnet://<host>:<port> telnets://<host>:<port>
VMware, Inc.
Theproxyhastwonetworksockets.Itusesonesocket(proxyURI)forthetelnetconnectionswiththevirtual machineandtheotherfortheconnectionwiththeremotesystem.Theexternalconnectionbetweentheproxy andaremotesystemusesthemutuallyagreeduponprotocol.Foraconnectioninitiatedbytheremotesystem, thepersonoperatingtheremotesystemmustobtaintheserviceURIbyemailorotherindependent communication. Figure 1-2. Virtual Serial Port Connections to a Remote System Through a Proxy
Virtual machine as virtual serial port server ESX Server virtual machine Virtual machine as virtual serial port client ESX Server virtual machine connection request virtual serial port network socket IP address: port number virtual serial port network socket IP address: port number
telnet
telnet
service URI
remote system
connection request
remote system
10
VMware, Inc.
Chapter 1 Remote Serial Port Access with a Virtual Serial Port Proxy
Usethebackinginformationobjecttosupplythefollowinginformation:
VMware, Inc.
11
Table 11liststheVMwaretelnetextensioncommandsalongwithbriefdescriptions.Commandsinthetable aregroupedbypurpose:VMwaretelnetextensionandsuboptions,proxy,vMotion,andidentification.The tableusescommandsymbols.AVMwaretelnetextensioncommandisatwoorthreebytecodeembeddedin atelnetcommandsequence.Formoreinformationaboutcommandsandthecodeequivalents,seeChapter 2, VMwareTelnetExtensionCommandsforProxyCommunication,onpage 17. Table 1-1. VMware Telnet Extension Commands
Command VMWARE-TELNET-EXT KNOWN-SUBOPTIONS-1 KNOWN-SUBOPTIONS-2 UNKNOWN-SUBOPTION-RCVD-1 UNKNOWN-SUBOPTION-RCVD-2 DO-PROXY WILL-PROXY WONT-PROXY VMOTION-BEGIN VMOTION-GOAHEAD VMOTION-NOTNOW VMOTION-PEER VMOTION-PEER-OK VMOTION-COMPLETE VMOTION-ABORT GET-VM-VC-UUID VM-VC-UUID GET-VM-NAME VM-NAME GET-VM-BIOS-UUID VM-BIOS-UUID Source virtualmachine,proxy virtualmachine proxy virtualmachine proxy virtualmachine proxy proxy virtualmachine proxy proxy virtualmachine proxy virtualmachine virtualmachine proxy virtualmachine proxy virtualmachine proxy virtualmachine Description TheVMwaretelnetextensionoptioncommand Suboptionssupportedbythevirtualmachine Suboptionssupportedbytheproxy Unknownsuboptionreceivedbythevirtual machine Unknownsuboptionreceivedbytheproxy Virtualmachinerequestforproxysupport Positiveproxyresponse Negativeproxyresponse NotificationofapendingvMotionoperationfora virtualmachine Positiveproxyresponse Negativeproxyresponse Virtualmachinerequestidentifyingthenewvirtual machineinstance Proxyresponseacceptingthenewvirtualmachine instance NotificationthatvMotionoperationiscomplete NotificationthatvMotionoperationwasaborted Proxyrequestforthevirtualcenterrepresentation ofvirtualmachineUUID Virtualmachineresponse Proxyrequestforthevirtualmachinename Virtualmachineresponse ProxyrequestforthevirtualmachineBIOSUUID Virtualmachineresponse
VMware, Inc.
12
Chapter 1 Remote Serial Port Access with a Virtual Serial Port Proxy
VirtualMachineSendsamessagethatindicatesitwillsendVMwaretelnetextensioncommands totheproxy.
IAC WILL VMWARE-TELNET-EXT
ProxyResponds,indicatingthatitwillreceiveVMwaretelnetextensioncommands.
IAC DO VMWARE-TELNET-EXT
Identifyknownsuboptions.
ProxyResponds,sendingamessagethatindicatesthesetofsuboptioncommandsthatitcansend andreceive.
IAC SB VMWARE-TELNET-EXT KNOWN-SUBOPTIONS-2 suboptions IAC SE
Negotiateproxysupport.
ProxyResponds,indicatingthatitwillperformproxyoperations.
IAC SB VMWARE-TELNET-EXT WILL-PROXY IAC SE
VMware, Inc.
13
VMOTION-BEGIN VMOTION-GOAHEAD
AftertheproxyreplieswithaVMOTION-GOAHEADresponse,thevMotionoperationbegins.Atthispoint,there isasingleconnectionbetweenthevirtualmachineandtheproxy. ThevCenterservercreatesasecondinstanceofthevirtualmachineonHostB.Whenthevirtualmachineboots ontheHostB,itconfiguresnetworkbackingforthevirtualserialportandestablishesasecondtelnet connectionwiththeproxy.BeforecontinuingwiththevMotionoperation,thenewvirtualmachineandthe proxyrenegotiatethetelnetCOM-PORT-OPTION.TheydonotrenegotiatetheComPortconfiguration.The proxyshouldbepreparedtosupportthesameComPortconfigurationthatwasestablishedfortheoriginal telnetconnection.SeeRFC2217forinformationaboutthetelnetcomportcontroloption.Theproxynow maintainsonetelnetconnectionforeachinstanceofthevirtualmachine. TostarttheVMwaretelnetextensionsessionforthenewconnection,thenewvirtualmachineinstance negotiatestheVMwaretelnetextensionoption(VMWARE-TELNET-EXT). Figure 14showsthesystemsduringthevMotionoperation.
Proxy:TheproxyreplieswithaVMOTION-PEER-OKmessagetoindicatethatitacceptsthepeerconnection.
IAC SB VMWARE-TELNET-EXT VMOTION-PEER-OK sequence IAC SE
14
VMware, Inc.
Chapter 1 Remote Serial Port Access with a Virtual Serial Port Proxy
VMOTION-PEER VMOTION-PEER-OK
VMOTION-COMPLETE
VMware, Inc.
15
16
VMware, Inc.
Thischapterincludesthefollowingsections:
Command Syntax
TheVMwaretelnetextensiondefinesatelnetproxyoptionforsendingnotificationofvSpherevMotionevents toavirtualserialportproxy.AVMwaretelnetextensioncommandsequenceusesthefollowinggeneral format:
IAC telnet-command VMWARE-TELNET-EXT [ext-command [parameters] IAC SE]
Where
IACisthetelnetescapecharacterprefix(InterpretasCommand).
telnet-commandisoneofthefollowingtelnetcommands:WILL,WONT,DO,DONT,andSB.
VMWARE-TELNET-EXTistheVMwaretelnetextensioncommand.
VMware, Inc.
17
Forexample,theDO-PROXYcommandrequiresthefollowingcodesequencewithembeddedargumentsfor direction(Sforserver)andURI:
IAC SB VMWARE-TELNET-EXT DO-PROXY direction uri IAC SE 255 250 232 70 "S" "telnet://example.com" 255 240
Option Subnegotiation
TheVMWARE-TELNET-EXTtelnetoptionrequiresvarioussuboptionstosupportremoteserialportaccess.The virtualmachineandproxyusesubnegotiationtoindicatethecommandsetsthattheycansupport. Subnegotiationidentifiesallcommandsfornegotiationaswellascommandsforproxysupport,vMotion notification,andvirtualmachineidentification.Table 22liststhecommandsforoptionsubnegotiation.
18
VMware, Inc.
VMware, Inc.
19
Proxy Operation
Table 24liststheextensioncommandstonegotiateproxysupport. Table 2-4. VMware Telnet Extension Command Negotiation
Command DO-PROXY direction serviceUri Avirtualmachinerequestfortheproxytodoforwardingoperationsovertheconnection.Thevirtual machinesendsaDO-PROXYrequestbeforeanycontentisexchangedbetweenthevirtualmachineandthe remotesystem. Code 70
directionandserviceURIcorrespondtotheVirtualSerialPortURIBackingInfopropertiesinthe
virtualserialportconfiguration.(SeethevSphereAPIReferenceforinformationaboutthe VirtualSerialPortURIBackingInfodataobject.)
vMotion Notification
Table 25liststhecommandsthathostsandproxyuseduringavMotionoperation.Inthefollowing descriptions,thesourcehostcontainstheoriginalvirtualmachineinstance,andthetargethostisthehoston whichthenewinstanceiscreated.Ahostusesthevirtualmachineserialportconnectionwiththeproxyto sendvMotionmessages.
20
VMware, Inc.
VMware, Inc.
21
22
VMware, Inc.
Index
A
accepting a connection 11 access server 7 access, virtual machine 8 appliance, virtual 8 authentication 8
D
data object, configuration 11 direction 11, 20 connection 9 server 11 DO-PROXY 20
B
backing info object 11 backing options 9, 11
E
establishing a VMware telnet extension session 13
F
forwarding traffic 8
C
command syntax 17 commands DO-PROXY 20 GET-VM-BIOS-UUID 22 GET-VM-LOCATION-UUID 22 GET-VM-NAME 22 GET-VM-VC-UUID 22 KNOWN-SUBOPTIONS-1 19 KNOWN-SUBOPTIONS-2 19 UNKNOWN-SUBOPTIONS-RCVD-1 19 UNKNOWN-SUBOPTIONS-RCVD-2 19 VM-BIOS-UUID 22 VM-LOCATION-UUID 22 VM-NAME 22 VMOTION-ABORT 21 VMOTION-BEGIN 21 VMOTION-COMPLETE 21 VMOTION-GOAHEAD 21 VMOTION-NOTNOW 21 VMOTION-PEER 21 VMOTION-PEER-OK 21 VM-VC-UUID 22 VMware telnet code 17 VMware telnet extension 12 VMWARE-TELNET-EXT 18 WILL-PROXY 20 WONT-PROXY 20 COM-PORT-OPTION (telnet) 14 concentrator 7 configuring a network serial port 11 connection behavior 11 direction 11
G
GET-VM-BIOS-UUID 22 GET-VM-LOCATION-UUID 22 GET-VM-NAME 22 GET-VM-VC-UUID 22
H
host IP address 7
I
IAC (interpret as command) 17 IP address host 7 virtual machine 8
K
KNOWN-SUBOPTIONS-1 19 KNOWN-SUBOPTIONS-2 19
M
method, configuration 11
N
negotiation, VMware telnet session 12
O
option backing (configuration) 11 subnegotiation (telnet) 18
VMware, Inc.
23
P
proxy 7, 9 connection behavior 11 third party 7 URI 11 virtual appliance 8
V
virtual appliance 8 virtual machine identification 22 IP address 8 serial port client 9 serial port server 8, 9 virtual serial port concentrator 7 VirtualDeviceConfigSpec data object 11 VirtualDeviceConnectInfo data object 11 VirtualDeviceURIBackingInfo data object 11 VirtualDeviceURIBackingOption data object 11 VirtualMachineConfigOption data object 11 VirtualMachineConfigSpec data object 11 VirtualSerialPort data object 11 VM-BIOS-UUID 22 VM-LOCATION-UUID 22 VM-NAME 22 vMotion 8 persistent serial port connections 13 VMOTION-ABORT 21 VMOTION-BEGIN 21 VMOTION-COMPLETE 21 VMOTION-GOAHEAD 21 VMOTION-NOTNOW 21 VMOTION-PEER 21 VM-VC-UUID 22 VMware telnet extension command code 17 extension commands 12 session negotiation 12 VMWARE-TELNET-EXT 18
Q
QueryConfigOption method 11
R
ReconfigVM_Task method 11 RFC 2217 8, 20 3986 9 role of the virtual serial port proxy 8
S
secret (VMOTION-GOAHEAD) 21 security 8 sequence (VMOTION-BEGIN) 21 server direction 11 serviceURI 9 backing info 11 DO-PROXY 20 session negotiation 12 syntax,command 17
T
technical support resources 5 telnet COM-PORT-OPTION 14 connections for vMotion 13 extension 7, 12 option subnegotiation 18 session 13 session negotiation 12 third party proxy 7
W
WILL-PROXY 20 WONT-PROXY 20
U
UNKNOWN-SUBOPTIONS-RCVD-1 19 UNKNOWN-SUBOPTIONS-RCVD-2 19 URI backing option 9 proxy 9, 11 service 9, 11
24
VMware, Inc.