Red Hat Training

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

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

문자 장치는 다음 유형 중 하나로 호스트 물리적 머신에 자체적으로 제공합니다.

표 23.26. 문자 장치 요소

매개변수 설명 XML 스니펫
도메인 로그 파일 문자 장치의 모든 입력을 비활성화하고 가상 시스템의 로그 파일로 출력을 보냅니다.
<devices>
   <console type='stdio'>
     <target port='1'/>
   </console>
</devices>
장치 로그 파일 파일이 열리고 문자 장치로 전송된 모든 데이터가 파일에 기록됩니다. 대상 디렉토리에 이 설정이 성공적으로 시작되면 게스트의 virt_log_t SELinux 레이블이 있어야 합니다.
<devices>
   <serial type="file">
      <source path="/var/log/vm/vm-serial.log"/>
      <target port="1"/>
   </serial>
</devices>
가상 콘솔 가상 콘솔의 그래픽 프레임 버퍼에 문자 장치를 연결합니다. 일반적으로 "ctrl+3"과 같은 특수 hotkey 시퀀스를 사용하여 액세스할 수 있습니다.
<devices>
   <serial type='vc'>
      <target port="1"/>
   </serial>
</devices>
null 장치 문자 장치를 void에 연결합니다. 입력에 데이터가 제공되지 않습니다. 기록된 모든 데이터는 삭제됩니다.
<devices>
   <serial type='null'>
      <target port="1"/>
   </serial>
</devices>
Pseudo TTY /dev/ptmx 를 사용하여 Pseudo TTY가 할당됩니다. virsh 콘솔 과 같은 적절한 클라이언트가 직렬 포트와 로컬로 상호 작용할 수 있습니다.
<devices>
   <serial type="pty">
      <source path="/dev/pts/3"/>
      <target port="1"/>
   </serial>
</devices>
NB Special 케이스 NB 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. 이는 <콘솔> 태그에 대한 기존 구문과 유사합니다.  
호스트 물리적 시스템 장치 프록시 문자 장치는 기본 물리적 문자 장치로 전달됩니다. 장치 유형(예: 에뮬레이션된 직렬 포트는 호스트 물리적 시스템 직렬 포트에만 연결됨)과 일치해야 하며 직렬 포트를 병렬 포트에 연결하지 않습니다.
<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>
또는 원시 TCP 대신 telnet을 사용할 수 있습니다. 또한 telnet(보안 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>