Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

20.16.17. Host Physical Machine Interface


A character device presents itself to the host physical machine as one of the following types:
Expand
Table 20.23. Character device elements
ParameterDescriptionXML snippet
Domain logfileDisables all input on the character device, and sends output into the virtual machine's logfile
      			   	   <devices>
      			   	      <console type='stdio'>
      			   	         <target port='1'/>
                           </console>
                        </devices>
Copy to Clipboard Toggle word wrap
Device logfileA file is opened and all data sent to the character device is written to the file.
      			   	   <devices>
      			   	      <serial type="file">
      			   	         <source path="/var/log/vm/vm-serial.log"/>
      			   	         <target port="1"/>
      			   	      </serial>
      			   	   </devices>
Copy to Clipboard Toggle word wrap
Virtual consoleConnects the character device to the graphical framebuffer in a virtual console. This is typically accessed via a special hotkey sequence such as "ctrl+alt+3"
      			   	   <devices>
      			   	      <serial type='vc'>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
Null deviceConnects the character device to the void. No data is ever provided to the input. All data written is discarded.
                        <devices>
                           <serial type='null'>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
Pseudo TTYA Pseudo TTY is allocated using /dev/ptmx. A suitable client such as virsh console can connect to interact with the serial port locally.
                        <devices>
                           <serial type="pty">
                              <source path="/dev/pts/3"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
NB Special caseNB special case if <console type='pty'>, then the TTY path is also duplicated as an attribute tty='/dev/pts/3' on the top level <console> tag. This provides compat with existing syntax for <console> tags. 
Host physical machine device proxyThe character device is passed through to the underlying physical character device. The device types must match, eg the emulated serial port should only be connected to a host physical machine serial port - do not connect a serial port to a parallel port.
                        <devices>
                           <serial type="dev">
                              <source path="/dev/ttyS0"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
Named pipeThe character device writes output to a named pipe. See pipe(7) man page for more info.
                        <devices>
                           <serial type="pipe">
                              <source path="/tmp/mypipe"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
TCP client/serverThe character device acts as a TCP client connecting to a remote server.
                        <devices>
                           <serial type="tcp">
                              <source mode="connect" host="0.0.0.0" service="2445"/>
                              <protocol type="raw"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
Or as a TCP server waiting for a client connection.
                        <devices>
                           <serial type="tcp">
                              <source mode="bind" host="127.0.0.1" service="2445"/>
                              <protocol type="raw"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
Alternatively you can use telnet instead of raw TCP. In addition, you can also use telnets (secure telnet) and tls.
                        <devices>
                           <serial type="tcp">
                              <source mode="connect" host="0.0.0.0" service="2445"/>
                              <protocol type="telnet"/>
                              <target port="1"/>
                           </serial>
                           <serial type="tcp">
                              <source mode="bind" host="127.0.0.1" service="2445"/>
                              <protocol type="telnet"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
UDP network consoleThe character device acts as a UDP netconsole service, sending and receiving packets. This is a lossy service.
                        <devices>
                           <serial type="udp">
                              <source mode="bind" host="0.0.0.0" service="2445"/>
                              <source mode="connect" host="0.0.0.0" service="2445"/>
                              <target port="1"/>
                           </serial>
                        </devices>
Copy to Clipboard Toggle word wrap
UNIX domain socket client/serverThe character device acts as a UNIX domain socket server, accepting connections from local clients.
                        <devices>
                           <serial type="unix">
                              <source mode="bind" path="/tmp/foo"/>
                              <target port="1"/>
                           </serial>
                           </devices>
Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat