Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

2장. 자체 호스트 엔진 배포

2.1. Red Hat Enterprise Linux 호스트에서 셀프 호스트 엔진 배포

2.1.1. 자체 호스트 엔진 패키지 설치

호스트가 등록되어 필요한 인타이틀먼트에 가입되었는지 확인합니다. 자세한 내용은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.

절차 2.1. 셀프 호스트 엔진 설치

  1. 자체 호스트 엔진 패키지를 설치합니다.
    # yum install ovirt-hosted-engine-setup
  2. Manager 가상 머신 설치를 위한 RHV-M VirtualECDHE 패키지를 설치합니다.
    # yum install rhevm-appliance
다음 섹션으로 진행하여 Red Hat Enterprise Linux 호스트에 자체 호스팅 엔진을 배포하고 구성합니다.

2.1.2. RHEL 기반 자체 호스트 엔진 구성

hosted-engine 스크립트는 호스트 구성과 Manager 가상 머신 구성을 지원하기 위해 제공됩니다. 이 스크립트는 일련의 질문을하고 질문에 따라 환경을 구성합니다.
참고
스크립트를 사용하는 경우 hosted-engine --check-deployed 명령을 사용하여 자체 호스팅 엔진이 이미 배포되었는지 확인합니다. 자체 호스팅 엔진이 배포되지 않은 경우에만 오류가 표시됩니다. 자체 호스팅 엔진을 이미 배포한 경우 후속 배포가 실패합니다. 자체 호스팅 엔진을 재배포하기 위해 기존 배포 문제를 해결하거나 실패한 배포를 정리해야 하는 경우 3장. 자체 호스트 엔진 배포 문제 해결 를 참조하십시오.
다음 사전 요구 사항을 완료해야 합니다.

사전 요구 사항

  • ovirt-hosted-engine-setup 패키지가 설치되어 있는 Red Hat Enterprise Linux 7 시스템이 새로 설치되어 있어야 합니다.
  • 자체 호스팅 엔진 환경을 위한 스토리지가 있어야 합니다. 두 개 이상의 스토리지 도메인이 필요합니다.
    • Manager 가상 머신 전용 공유 스토리지 도메인입니다. 이 도메인은 셀프 호스트 엔진 배포 중에 생성되며 최소 60GB여야 합니다.
    • 일반 가상 머신 데이터를 위한 데이터 스토리지 도메인입니다. 배포를 완료한 후 이 도메인을 셀프 호스트 엔진 환경에 추가해야 합니다.
      주의
      Red Hat은 자체 호스팅 엔진 환경과 동일한 데이터 센터에 추가 활성 데이터 스토리지 도메인을 사용할 것을 강력히 권장합니다.
      활성 데이터 스토리지 도메인이 하나만 있는 데이터 센터에 셀프 호스트 엔진을 배포하고 해당 데이터 스토리지 도메인이 손상된 경우 새 데이터 스토리지 도메인을 추가하거나 손상된 데이터 스토리지 도메인을 제거할 수 없습니다. 셀프 호스트 엔진을 재배포해야 합니다.
      ISO 스토리지 도메인을 사용하는 경우 호스팅 엔진 가상 시스템에 ISO 도메인이 없을 것을 권장합니다.
    배포용 스토리지 준비에 대한 자세한 내용은 관리 가이드의 스토리지 장을 참조하십시오.
    중요
    iSCSI 스토리지를 사용하는 경우 공유 스토리지 도메인 및 데이터 스토리지 도메인에 동일한 iSCSI 대상을 사용하지 마십시오.
  • 관리자와 호스트를 위해 정규화된 도메인 이름이 있어야 합니다. 정방향 및 역방향 조회 레코드를 모두 DNS에서 설정해야 합니다.
  • Manager 설치를 위한 RHV-M VirtualECDHE가 있어야 합니다. FlexVolume -appliance 패키지를 수동으로 설치하지 않은 경우 자동으로 다운로드되고 설치됩니다.
  • Manager 설치에 RHV-M VirtualECDHE를 사용하려면 하나의 디렉터리가 5GB 이상이어야 합니다. hosted-engine 스크립트는 먼저 /var/tmp 에 어플라이언스 파일을 추출하기에 충분한 공간이 있는지 확인합니다. 그렇지 않은 경우 다른 디렉터리를 지정하거나 외부 스토리지를 마운트할 수 있습니다. VDSM 사용자 및 KVM 그룹에는 디렉터리에 대한 읽기, 쓰기, 실행 권한이 있어야 합니다.

절차 2.2. RHEL 기반 셀프 호스트 엔진 구성

  1. 호스팅 엔진 배포 시작

    hosted-engine 스크립트를 실행합니다. 언제든지 스크립트를 이스케이프하려면 CTRL+D 키보드 조합을 사용하여 배포를 중단합니다. 네트워크 또는 터미널 중단 시 세션이 손실되지 않도록 화면 창 관리자를 사용하여 스크립트를 실행하는 것이 좋습니다. 아직 설치되지 않은 경우 표준 Red Hat Enterprise Linux 리포지토리에서 사용할 수 있는 screen 패키지를 설치하십시오.
    # yum install screen
    # screen
    # hosted-engine --deploy
    참고
    세션 시간 초과 또는 연결 중단이 발생하는 경우 screen -d -r 을 실행하여 hosted-engine 배포 세션을 복구합니다.
  2. 스토리지 구성

    사용할 스토리지 유형을 선택합니다.
    During customization use CTRL-D to abort.
    Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs3, nfs4)[nfs3]:
    • NFS 스토리지 유형의 경우 FQDN 또는 IP 주소 및 공유 스토리지 도메인의 경로 이름을 사용하여 전체 주소를 지정합니다.
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
    • iSCSI의 경우 iSCSI 포털 IP 주소, 포트, 사용자 이름 및 암호를 지정하고 자동 감지된 목록에서 대상 이름을 선택합니다. 배포 중에 iSCSI 대상 하나만 선택할 수 있습니다.
      Please specify the iSCSI portal IP address:
      Please specify the iSCSI portal port [3260]:
      Please specify the iSCSI portal user:
      Please specify the iSCSI portal password:
      Please specify the target name (auto-detected values) [default]:
    • Gluster 스토리지의 경우 FQDN 또는 IP 주소 및 공유 스토리지 도메인의 경로 이름을 사용하여 전체 주소를 지정합니다.
      중요
      복제본 3 Gluster 스토리지만 지원됩니다. 다음 구성이 수행되었는지 확인합니다.
      • 세 개의 Gluster 서버의 /etc/glusterfs/glusterd.vol 파일에서 rpc-auth-allow-insecureon 으로 설정합니다.
        option rpc-auth-allow-insecure on
      • 다음과 같이 볼륨을 구성합니다.
        gluster volume set volume cluster.quorum-type auto
        gluster volume set volume network.ping-timeout 10
        gluster volume set volume auth.allow \*
        gluster volume set volume group virt
        gluster volume set volume storage.owner-uid 36
        gluster volume set volume storage.owner-gid 36
        gluster volume set volume server.allow-insecure on
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/gluster_volume
    • 파이버 채널의 경우 호스트 버스 어댑터를 구성하고 연결해야 하며 hosted-engine 스크립트는 사용 가능한 LUN을 자동으로 탐지합니다. LUN에는 기존 데이터가 포함되어 있지 않아야 합니다.
      The following luns have been found on the requested target:
      [1]     3514f0c5447600351       30GiB   XtremIO XtremApp
                              status: used, paths: 2 active
      
      [2]     3514f0c5447600352       30GiB   XtremIO XtremApp
                              status: used, paths: 2 active
      
      Please select the destination LUN (1, 2) [1]:
  3. 네트워크 구성

    이 스크립트는 환경에 대한 관리 브리지로 사용할 수 있는 NIC(네트워크 인터페이스 컨트롤러)를 탐지합니다. 그런 다음 방화벽 구성을 확인하고 콘솔(SPICE 또는 VNC) 액세스를 위해 수정하도록 제공합니다.
    Please indicate a nic to set rhvm bridge on: (eth1, eth0) [eth1]:
    iptables was detected on your computer, do you wish setup to configure it? (Yes, No)[Yes]: Yes
    Please indicate a pingable gateway IP address [X.X.X.X]:
  4. 가상 머신 구성

    부팅 장치 유형에 대해 disk 를 선택하면 스크립트에서 사용 가능한 RHV-M VirtualECDHEs가 자동으로 감지됩니다. 메모리 크기를 지정합니다.
             Please specify the device to boot the VM from (choose disk for the oVirt engine appliance)
             (cdrom, disk, pxe) [disk]:
             Please specify the console type you would like to use to connect to the VM (vnc, spice) [vnc]: vnc
    [ INFO ] Detecting available oVirt engine appliances
             The following appliance have been found on your system:
                   [1] - The oVirt Engine Appliance image (OVA)
                   [2] - Directly select an OVA file
             Please select an appliance (1, 2) [1]:
    [ INFO ] Checking OVF archive content (could take a few minutes depending on archive size)
    cloud-init가 Manager 가상 머신의 초기 구성을 처리하도록 하려면 Yes 를 지정합니다. cloud-init에서 루트 암호 설정, 네트워킹 구성, 호스트 이름 구성, engine-setup 에 사용할 응답 파일 삽입, 부팅 시 engine-setup 실행과 같은 작업을 처리하기 위해 생성 을 지정합니다. 선택적으로 cloud-init의 보다 정교한 기능을 처리할 기존 cloud-init 스크립트가 있는 경우 Existing 을 선택합니다. Manager 가상 머신의 FQDN을 지정합니다. HostedEngine-VM의 MAC 주소를 지정하거나 무작위로 생성된 VM을 수락합니다. MAC 주소는 가상 머신에 운영 체제를 설치하기 전에 DHCP 및 DNS 서버를 업데이트하는 데 사용할 수 있습니다.
    참고
    cloud-init에 대한 자세한 내용은 의 내용을 참조하십시오 https://cloudinit.readthedocs.org/en/latest/.
    Would you like to use cloud-init to customize the appliance on the first boot (Yes, No)[Yes]? Yes
    Would you like to generate on-fly a cloud-init ISO image (of no-cloud type)
    or do you have an existing one (Generate, Existing)[Generate]? Generate
    Please provide the FQDN you would like to use for the engine appliance.
    Note: This will be the FQDN of the engine VM you are now going to launch.
    It should not point to the base host or to any other existing machine.
    Engine VM FQDN: (leave it empty to skip): manager.example.com
    Automatically execute engine-setup on the engine appliance on first boot (Yes, No)[Yes]? Yes
    Automatically restart the engine VM as a monitored service after engine-setup (Yes, No)[Yes]? Yes
    Enter root password that will be used for the engine appliance (leave it empty to skip): p@ssw0rd
    Confirm appliance root password: p@ssw0rd
    The following CPU types are supported by this host:
        - model_Penryn: Intel Penryn Family
        - model_Conroe: Intel Conroe Family
    Please specify the CPU type to be used by the VM [model_Penryn]:
    Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 4]:
    You may specify a MAC address for the VM or accept a randomly generated default [00:16:3e:77:b2:a4]:
    How should the engine VM network be configured (DHCP, Static)[DHCP]? Static
    Please enter the IP address to be used for the engine VM: 192.168.x.x
    Please provide a comma-separated list (max3) of IP addresses of domain name servers for the engine VM
    Engine VM DNS (leave it empty to skip):
    Add lines for the appliance itself and for this host to /etc/hosts on the engine VM?
    Note: ensuring that this host could resolve the engine VM hostname is still up to you (Yes, No)[No] Yes
  5. 호스팅 엔진 구성

    관리 포털에서 확인할 호스트의 이름과 관리 포털에 액세스할 admin@internal 사용자의 암호를 지정합니다. SMTP 서버의 이름 및 TCP 포트 번호, 이메일 알림을 보내는 데 사용되는 이메일 주소, 이러한 알림을 수신할 쉼표로 구분된 이메일 주소 목록을 제공합니다.
    Enter engine admin password: p@ssw0rd
    Confirm engine admin password: p@ssw0rd
    Enter the name which will be used to identify this host inside the Administrator Portal [hosted_engine_1]:
    Please provide the FQDN for the engine you would like to use.
              This needs to match the FQDN that you will use for the engine installation within the VM.
              Note: This will be the FQDN of the VM you are now going to create,
              it should not point to the base host or to any other existing machine.
              Engine FQDN:  []: manager.example.com
    Please provide the name of the SMTP server through which we will send notifications [localhost]:
    Please provide the TCP port number of the SMTP server [25]:
    Please provide the email address from which notifications will be sent [root@localhost]:
    Please provide a comma-separated list of email addresses which will get notifications [root@localhost]:
  6. 구성 프리뷰

    진행하기 전에 hosted-engine 스크립트에서 입력한 구성 값을 표시하고 이러한 값을 계속 진행하도록 확인 메시지를 표시합니다.
  7. 관리자 가상 머신 생성

    이 스크립트는 Manager 가상 머신을 생성하고 ovirt-engine 및 고가용성 서비스를 시작하고 호스트 및 공유 스토리지 도메인을 Manager 가상 머신에 연결합니다.
    You can now connect to the VM with the following command:
    	/usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3042QHpX" to connect to vnc console.
    Please note that in order to use remote-viewer you need to be able to run graphical applications.
    This means that if you are using ssh you have to supply the -Y flag (enables trusted X11 forwarding).
    Otherwise you can run the command from a terminal in your preferred desktop environment.
    If you cannot run graphical applications you can connect to the graphic console from another host or connect to the serial console using the following command:
    socat UNIX-CONNECT:/var/run/ovirt-vmconsole-console/fabbea5a-1989-411f-8ed7-7abe0917fc66.sock,user=ovirt-vmconsole STDIO,raw,echo=0,escape=1
    
    If you need to reboot the VM you will need to start it manually using the command:
    hosted-engine --vm-start
    You can then set a temporary password using the command:
    hosted-engine --add-console-password
    [ INFO ] Running engine-setup on the appliance
    ...
    [ INFO ] Engine-setup successfully completed
    [ INFO ] Engine is still unreachable
    [ INFO ] Engine is still unreachable, waiting...
    [ INFO ] Engine replied: DB Up!Welcome to Health Status!
    [ INFO ] Connecting to the Engine
             Enter the name of the cluster to which you want to add the host (Default) [Default]:
    [ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes... [ INFO  ] Still waiting for VDSM host to become operational...
    [ INFO  ] The VDSM Host is now operational
    [ INFO  ] Shutting down the engine VM
    [ INFO  ] Enabling and starting HA services
    [ INFO  ] Saving hosted-engine configuration on the shared storage domain
              Hosted Engine successfully set up
    [ INFO  ] Stage: Clean up
    [ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-2015xx.conf'
    [ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
    [ INFO  ] Stage: Pre-termination
    [ INFO  ] Stage: Termination
    hosted-engine 배포 스크립트가 성공적으로 완료되면 Red Hat Virtualization Manager가 호스트에서 구성 및 실행됩니다. Manager는 이미 Manager 가상 머신 전용 데이터 센터, 클러스터, 호스트, Manager 가상 시스템, 공유 스토리지 도메인을 구성했습니다.
    중요
    admin@internal 사용자로 로그인하여 Manager 구성을 계속하고 리소스를 추가합니다. 데이터 센터를 초기화하여 일반 가상 머신 데이터를 호스팅하고 Manager 가상 머신이 표시될 수 있도록 데이터 센터에 대해 다른 데이터 도메인을 생성해야 합니다. 다양한 스토리지 옵션 및 데이터 스토리지 도메인 추가 방법에 대한 관리 가이드 의 스토리지를 참조하십시오.
    환경에 사용자를 추가할 수 있도록 Red Hat Virtualization Manager를 디렉터리 서버에 연결합니다. Red Hat Virtualization은 다양한 디렉터리 서버 유형(예: Red Hat Directory Server), Red Hat IdM(Red Hat Identity Management), Active Directory 및 기타 많은 유형을 지원합니다. ovirt-engine-extension-aaa-ldap-setup 대화형 설정 스크립트를 사용하여 환경에 디렉터리 서버를 추가합니다. 자세한 내용은 관리 가이드 의 외부 LDAP 공급자 구성 을 참조하십시오.
    ovirt-hosted-engine-setup 스크립트는 재해 복구를 지원하기 위해 구성 중에 제공한 답변도 파일에 저장합니다. --generate-answer=<file > 인수를 사용하여 대상을 지정하지 않으면 응답 파일이 /etc/ovirt-hosted-engine/answers.conf 에 생성됩니다.
    참고
    SSH 암호 인증은 RHV-M 가상에서 기본적으로 활성화되어 있지 않습니다. SPICE 또는 VNC 콘솔을 통해 Red Hat Virtualization Manager 가상 머신에 액세스하여 SSH 암호 인증을 활성화할 수 있습니다. sshd 서비스가 실행 중인지 확인합니다. /etc/ssh/sshd_config 를 편집하고 다음 두 옵션을 yes 로 변경합니다.
    • PasswordAuthentication
    • PermitRootLogin
    변경 사항을 적용하려면 sshd 서비스를 다시 시작하십시오.
  8. 필요한 인타이틀먼트 구독

    Manager 가상 머신을 필요한 인타이틀먼트에 등록합니다. 자세한 내용은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.