Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

20.16.17. 호스트 물리적 시스템 인터페이스

문자 장치는 호스트 물리적 시스템에 다음 유형 중 하나로 표시됩니다.

표 20.23. 문자 장치 요소

매개변수설명XML 스니펫
도메인 로그 파일문자 장치의 모든 입력을 비활성화하고 가상 시스템의 logfile로 출력을 보냅니다.
      			   	   <devices>
      			   	      <console type='stdio'>
      			   	         <target port='1'/>
                           </console>
                        </devices>
장치 로그 파일파일이 열리고 문자 장치로 전송된 모든 데이터가 파일에 기록됩니다.
      			   	   <devices>
      			   	      <serial type="file">
      			   	         <source path="/var/log/vm/vm-serial.log"/>
      			   	         <target port="1"/>
      			   	      </serial>
      			   	   </devices>
가상 콘솔가상 콘솔의 그래픽 프레임 버퍼에 문자 장치를 연결합니다. 이는 일반적으로 "ctrl+alt+3"과 같은 특수 핫키 시퀀스를 통해 액세스됩니다.
      			   	   <devices>
      			   	      <serial type='vc'>
                              <target port="1"/>
                           </serial>
                        </devices>
null 장치void에 문자 장치를 연결합니다. 입력에 데이터가 제공되지 않습니다. 기록된 모든 데이터는 삭제됩니다.
                        <devices>
                           <serial type='null'>
                              <target port="1"/>
                           </serial>
                        </devices>
의사 TTYPseudo TTY는 /dev/ptmx 를 사용하여 할당됩니다. virsh 콘솔 과 같은 적절한 클라이언트는 직렬 포트와 로컬로 상호 작용하기 위해 연결할 수 있습니다.
                        <devices>
                           <serial type="pty">
                              <source path="/dev/pts/3"/>
                              <target port="1"/>
                           </serial>
                        </devices>
NB 특별 케이스<콘솔 type='pty'> 인 경우 NB 특수 케이스는 TTY 경로도 최상위 <콘솔> 태그의 tty='/dev/pts/3 속성으로 중복됩니다. 이렇게 하면 <콘솔> 태그에 대한 기존 구문이 표시됩니다. 
호스트 물리적 머신 장치 프록시문자 장치는 기본 물리적 문자 장치로 전달됩니다. 장치 유형이 일치해야 합니다. 에뮬레이션된 직렬 포트는 호스트 물리적 시스템 직렬 포트에만 연결해야 합니다. 직렬 포트를 병렬 포트에 연결하지 마십시오.
                        <devices>
                           <serial type="dev">
                              <source path="/dev/ttyS0"/>
                              <target port="1"/>
                           </serial>
                        </devices>
명명된 파이프문자 장치는 명명된 파이프에 출력을 씁니다. 자세한 내용은 pipe(7) 매뉴얼 페이지를 참조하십시오.
                        <devices>
                           <serial type="pipe">
                              <source path="/tmp/mypipe"/>
                              <target port="1"/>
                           </serial>
                        </devices>
TCP 클라이언트/서버문자 장치는 원격 서버에 연결하는 TCP 클라이언트 역할을 합니다.
                        <devices>
                           <serial type="tcp">
                              <source mode="connect" host="0.0.0.0" service="2445"/>
                              <protocol type="raw"/>
                              <target port="1"/>
                           </serial>
                        </devices>
또는 TCP 서버가 클라이언트 연결을 대기 중인 경우.
                        <devices>
                           <serial type="tcp">
                              <source mode="bind" host="127.0.0.1" service="2445"/>
                              <protocol type="raw"/>
                              <target port="1"/>
                           </serial>
                        </devices>
또는 raw TCP 대신 telnet을 사용할 수 있습니다. 또한 telnets(보안 telnet) 및 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>
UDP 네트워크 콘솔문자 장치는 UDP netconsole 서비스 역할을 하며 패킷을 전송 및 수신합니다. 이것은 손실된 서비스입니다.
                        <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>
UNIX 도메인 소켓 클라이언트/서버문자 장치는 로컬 클라이언트의 연결을 수락하는 UNIX 도메인 소켓 서버 역할을 합니다.
                        <devices>
                           <serial type="unix">
                              <source mode="bind" path="/tmp/foo"/>
                              <target port="1"/>
                           </serial>
                           </devices>