Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

6.2. 셀프 호스트 엔진 환경 복구

다음 부분에서는 백업을 사용하여 새로 설치된 호스트에서 셀프 호스트 엔진 환경을 복구하는 방법을 설명합니다. 여기서 지원되는 복구 방법은 engine-backup 도구를 사용합니다.
셀프 호스트 엔진 환경의 복구는 다음과 같은 핵심 동작으로 구성됩니다:
  1. 새로 설치된 Red Hat Enterprise Linux 호스트를 생성하고 호스트 엔진 (hosted-engine) 배포 스크립트를 실행합니다.
  2. 새로운 Manager 가상 머신에서 Red Hat Virtualization Manager 설정 및 데이터베이스 컨텐츠를 복구합니다.
  3. Non Operational 상태의 셀프 호스트 엔진 (hosted-engine) 호스트를 제거하고 복구된 셀프 호스트 엔진 환경에 이를 다시 설치합니다.

전제 조건

  • 셀프 호스트 엔진 환경을 복원하려면 새로 설치된 Red Hat Enterprise Linux 시스템을 물리적인 호스트에 준비해 놓아야 합니다.
  • 새로운 호스트 및 Manager의 운영 체제 버전은 반드시 기존 호스트 및 Manager의 운영 체제 버전과 동일해야 합니다.
  • 새 환경에는 Red Hat Subscription Manager 인타이틀먼트가 필요합니다. 필수 리포지토리 목록은 설치 가이드에서 필요한 서브스크립션을 등록을 참조하십시오.
  • 새로운 Manager의 정규화된 도메인 이름(FQDN)은 기존 Manager의 FQDN과 같아야 합니다. 순방향 및 역방향 조회 기록은 모두 DNS에 설정되어야 합니다.
  • Manager 가상 머신의 공유 스토리지 도메인으로 사용하도록 새로운 셀프 호스트 엔진 환경을 위한 스토리지를 준비해야 합니다. 이 도메인은 60GB 이상이어야 합니다. 배포에 사용할 스토리지 준비에 대한 자세한 내용은 관리 가이드스토리지 장을 참조하십시오.

6.2.1. 복구된 환경으로 사용할 새로운 셀프 호스트 엔진 환경 생성

백업된 환경으로 사용되었던 하드웨어에 셀프 호스트 엔진을 복원할 수 있습니다. 하지만 복구된 환경을 배포하려면 반드시 페일오버 호스트를 사용해야 합니다. 페일오버 호스트인 Host 16.1절. “셀프 호스트 엔진 Manager 가상 머신 백업”에서 사용되었으며 다음 절차에서도 사용되는 hosted_engine_1의 기본 호스트 이름을 사용합니다. 셀프 호스트 엔진을 복구하는 과정의 특성상 복구된 엔진의 최종 동기화 전에 이 페일오버 호스트를 제거해야 하며, 이것은 백업 시 호스트에 가상 로드가 없었던 경우에만 가능합니다. 백업된 환경에서 사용되지 않은 다른 하드웨어에 백업을 복구할 수 있으므로 이것은 문제가 되지 않습니다.

중요

이 절차에서는 물리적 호스트에 새로 설치된 Red Hat Enterprise Linux 시스템이 있으며 호스트에 필요한 서브스크립션을 등록했고 ovirt-hosted-engine-setup 패키지를 설치했다고 가정합니다. 자세한 내용은 설치 가이드필요한 서브스크립션을 등록2.1.1절. “셀프 호스트 엔진 (Self-Hosted Engine) 패키지 설치”를 참조하십시오.

절차 6.4. 복구된 환경으로 사용할 새로운 셀프 호스트 환경 생성

  1. DNS 업데이트

    사용자의 DNS를 업데이트하여 Red Hat Virtualization 환경의 정규화된 도메인 이름(FQDN)을 새로운 Manager의 IP 주소와 연결합니다. 다음 절차에서 FQDN은 Manager.example.com으로 설정되었습니다. 엔진에 지정된 FQDN은 백업된 본래 엔진의 설정 시 지정된 FQDN과 동일해야 합니다.
  2. 호스티드 엔진 배포 시작

    새로 설치된 Red Hat Enterprise Linux 호스트에서 hosted-engine 배포 스크립트를 실행합니다. 스크립트를 중지하려면 언제든지 CTRL+D 키보드 조합을 사용하여 배포를 중지합니다. 네트워크 상에서 hosted-engine 배포 스크립트를 실행하는 경우 네트워크 또는 터미널 중단 시 세션을 잃지 않도록 screen 윈도우 관리자를 사용하여 스크립트를 실행하는 것이 권장됩니다. screen 패키지를 아직 설치하지 않은 경우 이 패키지를 우선 설치합니다.
    # screen
    # hosted-engine --deploy
  3. 초기화 준비

    스크립트는 가장 먼저 셀프 호스트 엔진 환경에서 호스트를 하이퍼바이저로 사용하는 것을 확인합니다.
    Continuing will configure this host for serving as hypervisor and create a VM where you have to install oVirt Engine afterwards. 
    Are you sure you want to continue? (Yes, No)[Yes]:
  4. 스토리지 설정

    사용할 스토리지 유형을 선택합니다.
    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 주소를 사용하여 전체 주소를 입력하고 공유 스토리지 도메인의 경로 이름을 입력합니다.

      중요

      복제 (replica) 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
    • 파이버 채널(Fibre Channel)의 경우 호스트 버스 어댑터가 반드시 설정 및 연결되어야 하며, 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]:
  5. 네트워크 설정

    해당 스크립트는 사용자 환경에서 매니지먼트 브리지(management bridge)로 사용할 수 있는 네트워크 인터페이스 컨트롤러(NIC)를 감지합니다. 그 후 사용자의 방화벽 설정을 확인하고 Manager 가상 머신 콘솔 (SPICE 또는 VNC) 액세스를 위해 설정을 수정할 수 있도록 제공하고 있습니다. 사용자가 ping할 수 있는 게이트웨이 IP 주소를 입력하면 ovirt-ha-agent는 이를 사용하여 호스트가 Manager 가상 머신을 실행하기에 적합한지 확인할 수 있습니다.
    Please indicate a nic to set ovirtmgmt bridge on: (eth1, eth0) [eth1]:
    iptables was detected on your computer, do you wish setup to configure it? (Yes, No)[Yes]: 
    Please indicate a pingable gateway IP address [X.X.X.X]:
    
  6. 새로운 Manager 가상 머신 설정

    다음 스크립트를 사용하여 가상 머신을 생성하여 새 Manager 가상 머신으로 설정합니다. 부팅 장치를 지정하고 해당 사항이 있는 경우 설치 미디어의 경로 이름, 이미지 앨리어스(alias), CPU 유형, 가상 CPU 수량, 그리고 디스크 크기를 입력합니다. Manager 가상 머신의 MAC 주소를 입력하거나 임의로 생성된 주소를 허용합니다. Manager 가상 머신에 운영 체제를 설치하기 전에 MAC 주소를 사용하여 사용자의 DHCP 서버를 업데이트할 수 있습니다. Manager 가상 머신을 생성하기 위해 메모리 크기와 콘솔 연결 유형을 입력합니다.
    Please specify the device to boot the VM from (cdrom, disk, pxe) [cdrom]: 
    Please specify an alias for the Hosted Engine image [hosted_engine]:  
    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 minimum requirement: 2]: 
    Please specify the disk size of the VM in GB [Defaults to minimum requirement: 25]: 
    You may specify a MAC address for the VM or accept a randomly generated default [00:16:3e:77:b2:a4]: 
    Please specify the memory size of the VM in MB [Defaults to minimum requirement: 4096]: 
    Please specify the console type you want to use to connect to the VM (vnc, spice) [vnc]:
    
  7. 호스트 이름 확인

    admin@internal 사용자가 관리 포털에 액세스하기 위한 암호를 입력합니다.
    호스트 이름으로 고유한 이름을 입력해야 엔진이 백업에서 복구되었을 때 다른 리소스와 충돌하지 않습니다. 다음 절차에서 hosted_engine_1이라는 이름을 사용할 수 있는데, 그 이유는 사용자 환경을 백업하기 전에 이 호스트가 유지관리 모드로 전환했으므로 엔진 복구 후 호스트 및 엔진의 최종 동기화 전에 이 호스트를 제거할 수 있기 때문입니다.
    Enter engine admin password: 
    Confirm engine admin password:
    Enter the name which will be used to identify this host inside the Administration Portal [hosted_engine_1]:
  8. 호스티드 엔진 설정

    새로운 Manager 가상 머신의 FQDN을 입력합니다. 다음 절차에서 사용하는 FQDN은 Manager.example.com입니다. SMTP 서버의 이름 및 TCP 포트 번호, 이메일 알림 전송에 사용되는 이메일 주소, 그리고 이러한 알림을 수신하는 콤마로 구분된 이메일 주소 목록을 입력합니다.

    중요

    이 엔진의 정규화된 도메인 이름(FQDN)인 Manager.example.com은 기존 Manager의 초기 설정 시 입력한 FQDN과 같아야 합니다.
    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]:
  9. 설정 미리 보기

    진행하기 전에 hosted-engine 배포 스크립트는 사용자가 입력한 설정값을 표시하며 해당 값으로 진행할 것인지 확인하라는 메시지가 표시됩니다.
    Bridge interface                   : eth1
    Engine FQDN                        : Manager.example.com
    Bridge name                        : ovirtmgmt
    SSH daemon port                    : 22
    Firewall manager                   : iptables
    Gateway address                    : X.X.X.X
    Host name for web application      : hosted_engine_1
    Host ID                            : 1
    Image alias                        : hosted_engine
    Image size GB                      : 25
    Storage connection                 : storage.example.com:/hosted_engine/nfs
    Console type                       : vnc
    Memory size MB                     : 4096
    MAC address                        : 00:16:3e:77:b2:a4
    Boot type                          : pxe
    Number of CPUs                     : 2
    CPU Type                           : model_Penryn
    
    Please confirm installation settings (Yes, No)[Yes]:
    
  10. 새로운 Manager 가상 머신 생성

    이 스크립트는 Manager 가상 머신으로 설정될 가상 머신을 생성하고 연결 상세 정보를 제공합니다. 여기에 운영 체제를 우선 설치해야 호스트 엔진 설정에서 hosted-engine 배포 스크립트를 진행할 수 있습니다.
    [ INFO  ] Stage: Transaction setup
    [ INFO  ] Stage: Misc configuration
    [ INFO  ] Stage: Package installation
    [ INFO  ] Stage: Misc configuration
    [ INFO  ] Configuring libvirt
    [ INFO  ] Configuring VDSM
    [ INFO  ] Starting vdsmd
    [ INFO  ] Waiting for VDSM hardware info
    [ INFO  ] Waiting for VDSM hardware info
    [ INFO  ] Configuring the management bridge
    [ INFO  ] Creating Storage Domain
    [ INFO  ] Creating Storage Pool
    [ INFO  ] Connecting Storage Pool
    [ INFO  ] Verifying sanlock lockspace initialization
    [ INFO  ] Creating VM Image
    [ INFO  ] Disconnecting Storage Pool
    [ INFO  ] Start monitoring domain
    [ INFO  ] Configuring VM
    [ INFO  ] Updating hosted-engine configuration
    [ INFO  ] Stage: Transaction commit
    [ INFO  ] Stage: Closing up
    [ INFO  ] Creating VM
    You can now connect to the VM with the following command:
          /usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3477XXAM" 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 console using the following command:
    virsh -c qemu+tls://Test/system console HostedEngine
    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
    The VM has been started.  Install the OS and shut down or reboot it.  To continue please make a selection:
             
      (1) Continue setup - VM installation is complete
      (2) Reboot the VM and restart installation
      (3) Abort setup
      (4) Destroy VM and abort setup
             
      (1, 2, 3, 4)[1]:
    다음 절차의 이름 지정 규칙에 따라 다음의 명령을 실행해서 VNC를 사용하여 가상 머신에 연결합니다:
    /usr/bin/remote-viewer vnc://hosted_engine_1.example.com:5900
  11. 가상 머신 운영 체제 설치

    Manager 가상 머신에 연결하고 Red Hat Enterprise Linux 7 운영 체제를 설치합니다.
  12. Host 및 Manager 동기화

    호스트로 돌아가서 옵션 1을 선택하여 hosted-engine 배포를 계속해서 진행합니다:
    (1) Continue setup - VM installation is complete
    Waiting for VM to shut down...
    [ INFO  ] Creating VM
    You can now connect to the VM with the following command:
          /usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3477XXAM" 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 console using the following command:
    virsh -c qemu+tls://Test/system console HostedEngine
    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
    Please install and setup the engine in the VM.
    You may also be interested in subscribing to "agent" RHN/Satellite channel and installing rhevm-guest-agent-common package in the VM.
    To continue make a selection from the options below:
      (1) Continue setup - engine installation is complete
      (2) Power off and restart the VM
      (3) Abort setup
      (4) Destroy VM and abort setup
             
      (1, 2, 3, 4)[1]:
  13. Manager 설치

    새로운 Manager 가상 머신에 연결하여 모든 설치된 패키지의 최신 버전이 사용중인 것을 확인하고 rhevm 패키지를 설치합니다.
    # yum update

    참고

    커널 관련 패키지가 업데이트된 경우 머신을 재부팅합니다.
    # yum install rhevm
패키지 설치가 완료된 후 셀프 호스트 엔진 Manager 복구를 계속 진행할 수 있습니다.

6.2.2. 셀프 호스트 엔진 Manager 복구

다음 절차에서는 engine-backup 도구를 사용하여 백업된 셀프 호스트 엔진 Manager 가상 머신 및 데이터 웨어하우스(Data Warehouse)의 설정과 데이터베이스 컨텐츠의 복구를 자동화하는 방법이 설명되어 있습니다. 이 절차는 초기 engine-setup 당시에 자동 설정된 구성 요소에만 해당됩니다. engine-setup 당시에 데이터베이스를 수동 설정한 경우 6.2.3절. “셀프 호스트 엔진 Manager 수동 복구”에 있는 절차에 따라 백업 환경을 수동으로 복원합니다.

절차 6.5. 셀프 호스트 엔진 Manager 복구

  1. 백업 파일을 새로운 Manager 가상 머신으로 보안 복사합니다. 다음 예시에서는 6.1절. “셀프 호스트 엔진 Manager 가상 머신 백업”에서 파일을 복사해서 저장했던 네트워크 스토리지 서버에서 파일을 복사합니다. 다음 예시에서 Storage.example.com은 스토리지 서버의 FQDN이며, /backup/EngineBackupFiles은 스토리지 서버에 있는 백업 파일의 지정된 파일 경로이며, /backup/은 새로운 Manager에서 파일이 복사될 경로입니다.
    # scp -p Storage.example.com:/backup/EngineBackupFiles /backup/
  2. engine-backup 도구를 사용하여 백업을 완전히 복원합니다.
    • Manager만 복원하는 경우 다음과 같이 실행합니다:
      # engine-backup --mode=restore --file=file_name --log=log_file_name --provision-db --restore-permissions
    • Manager 및 Data Warehouse를 복원하는 경우 다음과 같이 실행합니다:
      # engine-backup --mode=restore --file=file_name --log=log_file_name --provision-db --provision-dwh-db --restore-permissions
    완료시 다음과 같은 출력 결과가 표시됩니다:
    You should now run engine-setup.
    Done.
  3. 복구된 Manager 가상 머신을 설정합니다. 다음 절차에서는 기존 설정 및 데이터베이스 컨텐츠를 찾습니다. 설정을 확인합니다. 설정 확인 완료 후 SSH 지문 및 내부 Certificate Authority 해시(hash)가 제공됩니다.
    # engine-setup
    [ INFO  ] Stage: Initializing
    [ INFO  ] Stage: Environment setup
    Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf']
    Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140304075238.log
    Version: otopi-1.1.2 (otopi-1.1.2-1.el6ev)
    [ INFO  ] Stage: Environment packages setup
    [ INFO  ] Yum Downloading: rhel-65-zstream/primary_db 2.8 M(70%)
    [ INFO  ] Stage: Programs detection
    [ INFO  ] Stage: Environment setup
    [ INFO  ] Stage: Environment customization
             
              --== PACKAGES ==--
             
    [ INFO  ] Checking for product updates...
    [ INFO  ] No product updates found
             
              --== NETWORK CONFIGURATION ==--
             
    Setup can automatically configure the firewall on this system.
    Note: automatic configuration of the firewall may overwrite current settings.
    Do you want Setup to configure the firewall? (Yes, No) [Yes]: 
    [ INFO  ] iptables will be configured as firewall manager.
             
              --== DATABASE CONFIGURATION ==--
             
             
              --== OVIRT ENGINE CONFIGURATION ==--
             
              Skipping storing options as database already prepared
             
              --== PKI CONFIGURATION ==--
             
              PKI is already configured
             
              --== APACHE CONFIGURATION ==--
             
             
              --== SYSTEM CONFIGURATION ==--
             
             
              --== END OF CONFIGURATION ==--
             
    [ INFO  ] Stage: Setup validation
    [ INFO  ] Cleaning stale zombie tasks
             
              --== CONFIGURATION PREVIEW ==--
             
              Database name                      : engine
              Database secured connection        : False
              Database host                      : X.X.X.X
              Database user name                 : engine
              Database host name validation      : False
              Database port                      : 5432
              NFS setup                          : True
              Firewall manager                   : iptables
              Update Firewall                    : True
              Configure WebSocket Proxy          : True
              Host FQDN                          : Manager.example.com
              NFS mount point                    : /var/lib/exports/iso
              Set application as default page    : True
              Configure Apache SSL               : True
             
              Please confirm installation settings (OK, Cancel) [OK]:
  4. 복구된 환경에서 호스트 제거

    복구된 셀프 호스트 엔진이 새 하드웨어에서 배포되며 이 하드웨어의 이름이 백업된 엔진에 없는 고유한 이름이라면 다음 단계를 건너뜁니다. 다음 단계는 페일오버 호스트인 hosted_engine_1에서 진행되는 배포에만 해당됩니다. 이 호스트가 백업 생성 시 사용자 환경에 존재했기 때문에 이 호스트는 복구된 엔진에 계속 남아 있으며 최종 동기화가 진행되기 전에 이 호스트를 사용자 환경에서 먼저 제거해야 합니다.
    1. 관리 포털에 로그인합니다.
    2. 호스트 탭을 클릭합니다. 페일오버 호스트인 hosted_engine_1은 백업 시 유지관리 모드에 있고 가상 로드가 없도록 준비되었습니다.
    3. 삭제를 클릭합니다.
    4. Ok를 클릭합니다.

    참고

    제거하려는 호스트가 작동 가능하지 않은 경우 이러한 호스트를 강제로 제거하는 방법은 6.2.4절. “복원된 셀프 호스트 엔진 환경에서 작동하지 않는 호스트 제거”에서 참조하십시오.
  5. Host 및 Manager 동기화

    호스트로 돌아가서 옵션 1을 선택하여 hosted-engine 배포를 계속해서 진행합니다:
    (1) Continue setup - engine installation is complete
    [ INFO  ] Engine replied: DB Up!Welcome to Health Status!
    [ 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...
    이제 관리 포털에서 hosted_engine_1이 표시되며 설치 중초기화 중 상태에 있다가 작동하지 않음 상태가 됩니다. 호스트는 계속해서 VDSM 호스트가 작동 가능해질 때까지 대기하다가 결국 대기 시간이 초과됩니다. 그 이유는 사용자 환경에 있는 다른 호스트가 Storage Pool Manager (SPM) 역할을 하며 이 SPM 호스트가 응답하지 않음 상태에 있어서 hosted_engine_1이 스토리지 도메인과 통신할 수 없기 때문입니다. 대기 시간 초과 시 가상 머신을 종료해서 배포를 완료하라는 메시지가 표시됩니다. 배포가 완료된 후 호스트를 수동으로 유지관리 모드로 변경하고 관리 포털에서 활성화할 수 있습니다.
    [ INFO  ] Still waiting for VDSM host to become operational...
    [ ERROR ] Timed out while waiting for host to start. Please check the logs.
    [ ERROR ] Unable to add hosted_engine_2 to the manager
              Please shutdown the VM allowing the system to launch it as a monitored service.
              The system will wait until the VM is down.
  6. 새로운 Manager 가상 머신을 종료합니다.
    # shutdown -h now
  7. 호스트로 돌아가서 호스트가 Manager 가상 머신이 종료된 것을 감지했는지 확인합니다.
    [ INFO  ] Enabling and starting HA services
              Hosted Engine successfully set up
    [ INFO  ] Stage: Clean up
    [ INFO  ] Stage: Pre-termination
    [ INFO  ] Stage: Termination
  8. 호스트를 활성화합니다.
    1. 관리 포털에 로그인합니다.
    2. 호스트 탭을 클릭합니다.
    3. hosted_engine_1을 선택한 후 유지보수 버튼을 클릭합니다. 호스트가 유지관리 모드로 전환하려면 몇 분이 소요될 수 있습니다.
    4. 활성화 버튼을 클릭합니다.
    활성화 후 hosted_engine_1은 즉시 SPM을 위해서 경합하게 되며 스토리지 도메인 및 데이터 센터가 활성화됩니다.
  9. Non Responsive 상태의 호스트를 수동으로 펜싱하여 가상 머신을 활성화된 호스트로 마이그레이션합니다. 관리 포털에서 호스트 항목을 오른쪽 클릭하여 호스트가 재부팅 되어 있는지 확인을 선택합니다.
    백업 시 이 호스트에서 실행 중이던 모든 가상 머신은 이제 해당 호스트에서 제거되며 Unknown 상태에서 Down 상태가 됩니다. 이 가상 머신은 이제 hosted_engine_1에서 실행할 수 있습니다. 펜싱했던 호스트는 이제 REST API를 사용하여 강제로 제거할 수 있습니다.
이제 사용자 환경이 복구되어서 hosted_engine_1이 활성화되었으며 복구된 환경에서 가상 머신을 실행할 수 있습니다. 작동하지 않음 상태에 있는 남아 있는 호스트 엔진 (hosted-engine) 호스트를 6.2.4절. “복원된 셀프 호스트 엔진 환경에서 작동하지 않는 호스트 제거”의 절차에 따라서 제거하고 7장. 셀프 호스트 환경에 추가 호스트 설치에 있는 절차에 따라서 사용자 환경에 다시 설치할 수 있습니다.

참고

Manager 데이터베이스를 성공적으로 복구했지만 Manager 가상 머신이 Down 상태이며 다른 셀프 호스트 엔진 호스트로 마이그레이션할 수 없는 경우 https://access.redhat.com/solutions/1517683에 있는 절차에 따라 새로운 Manager 가상 머신을 활성화하고 작동되지 않는 Manager 가상 머신을 사용자 환경에서 제거합니다.

6.2.3. 셀프 호스트 엔진 Manager 수동 복구

다음 절차에 따라 백업된 셀프 호스트 엔진 Manager 가상 머신의 설정 및 데이터베이스 컨텐츠를 수동으로 복원합니다.

절차 6.6. 셀프 호스트 엔진 Manager 복구

  1. 백업에 있는 데이터베이스 컨텐츠를 복원할 수 있는 빈 데이터베이스를 수동으로 생성합니다. 다음 절차는 데이터베이스를 호스팅하는 시스템에서 이루어져야 합니다.
    1. Manager 가상 머신 이외의 시스템에서 데이터베이스를 호스팅하는 경우 postgresql-server 패키지를 설치합니다. Manager 가상 머신에서 데이터베이스를 호스팅하는 경우 이것은 이미 rhevm 패키지에 포함되어 있으므로 다음 단계가 필요하지 않습니다.
      # yum install postgresql-server
    2. postgresql 데이터베이스를 초기화하고 postgresql 서비스를 시작한 후 부팅 시 서비스가 시작되는지 확인합니다:
      # postgresql-setup initdb
      # systemctl start postgresql.service
      # systemctl enable postgresql.service
    3. postgresql 명령행에 들어갑니다:
      # su postgres
      $ psql
    4. engine 사용자를 생성합니다:
      postgres=# create role engine with login encrypted password 'password';
      Data Warehouse를 복원할 경우 해당 호스트에 ovirt_engine_history 사용자를 생성합니다:
      postgres=# create role ovirt_engine_history with login encrypted password 'password';
    5. 새 데이터베이스를 생성합니다:
      postgres=# create database database_name owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
      Data Warehouse를 복원할 경우 해당 호스트에 데이터베이스를 생성합니다:
      postgres=# create database database_name owner ovirt_engine_history template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
    6. postgresql 명령행을 종료하고 postgres 사용자에서 로그아웃합니다:
      postgres=# \q
      $ exit
    7. 다음과 같이 /var/lib/pgsql/data/pg_hba.conf 파일을 편집합니다:
      • 각 로컬 데이터베이스의 경우 파일 하단에 local로 시작하는 섹션에 있는 기존 지시문을 다음과 같은 지시문으로 변경합니다:
        host    database_name    user_name    0.0.0.0/0  md5
        host    database_name    user_name    ::0/0      md5
      • 각 원격 데이터베이스에 대해 다음과 같이 설정합니다:
        • 파일 하단에 Local로 시작하는 행 바로 아래에 다음과 같은 행을 추가합니다. 여기서 X.X.X.X는 Manager의 IP 주소로 변경합니다:
          host    database_name    user_name    X.X.X.X/32   md5
        • 데이터베이스에 TCP/IP 연결을 허용합니다. /var/lib/pgsql/data/postgresql.conf 파일을 편집하고 다음 행을 추가합니다:
          listen_addresses='*'
          위의 예시에서는 모든 인터페이스에서의 연결을 수신하도록 postgresql 서비스를 설정하고 있습니다. IP 주소로 인터페이스를 지정할 수 있습니다.
        • PostgreSQL 데이터베이스 연결에 사용할 기본 포트를 열고 업데이트된 방화벽 규칙을 저장합니다:
          # iptables -I INPUT 5 -p tcp -s Manager_IP_Address --dport 5432 -j ACCEPT
          # service iptables save
    8. postgresql 서비스를 다시 시작합니다:
      # systemctl restart postgresql.service
  2. 백업 파일을 새로운 Manager 가상 머신으로 보안 복사합니다. 다음 예시에서는 6.1절. “셀프 호스트 엔진 Manager 가상 머신 백업”에서 파일을 복사해서 저장했던 네트워크 스토리지 서버에서 파일을 복사합니다. 다음 예시에서 Storage.example.com은 스토리지 서버의 FQDN이며, /backup/EngineBackupFiles은 스토리지 서버에 있는 백업 파일의 지정된 파일 경로이며, /backup/은 새로운 Manager에서 파일이 복사될 경로입니다.
    # scp -p Storage.example.com:/backup/EngineBackupFiles /backup/
  3. --change-db-credentials 매개 변수를 사용하여 전체 백업 또는 데이터베이스만 백업을 복구하여 새 데이터베이스의 인증을 전달합니다. Manager에 로컬로 설정된 데이터베이스의 database_locationlocalhost입니다.

    참고

    다음 예에서는 각 데이터 베이스마다 암호를 입력하라는 프롬프트에 따라 암호를 지정하지 않고 각 데이터베이스마다 --*password 옵션을 사용합니다. 이러한 옵션의 명령 자체에 암호를 지정할 수 있지만 암호는 셸 기록에 저장되므로 권장되지 않습니다. 다른 방법으로 각 데이터베이스에 대해 --*passfile=password_file 옵션을 사용하여 인터랙티브 (interactive) 프롬프트 없이 engine-backup 도구에 암호를 안전하게 전달할 수 있습니다.
    • 전체 백업을 복원하려면 다음을 수행합니다:
      # engine-backup --mode=restore --file=file_name --log=log_file_name --change-db-credentials --db-host=database_location --db-name=database_name --db-user=engine --db-password
      Data Warehouse도 전체 백업의 일부로 복원하는 경우 추가되는 두 가지 데이터베이스의 변경된 인증 정보를 포함시켜야 합니다:
      engine-backup --mode=restore --file=file_name --log=log_file_name --change-db-credentials --db-host=database_location --db-name=database_name --db-user=engine --db-password --change-dwh-db-credentials --dwh-db-host=database_location --dwh-db-name=database_name --dwh-db-user=ovirt_engine_history --dwh-db-password
    • 설정 파일 및 데이터베이스 백업을 복원하여 데이터베이스만 백업을 복원하려면 다음을 수행합니다.
      # engine-backup --mode=restore --scope=files --scope=db --file=file_name --log=file_name --change-db-credentials --db-host=database_location --db-name=database_name --db-user=engine --db-password
      위의 예시에서는 Manager 데이터베이스의 백업을 복원합니다.
      # engine-backup --mode=restore --scope=files --scope=dwhdb --file=file_name --log=file_name --change-dwh-db-credentials --dwh-db-host=database_location --dwh-db-name=database_name --dwh-db-user=ovirt_engine_history --dwh-db-password
      위의 예시에서는 Data Warehouse 데이터베이스의 백업을 복원합니다.
    완료시 다음과 같은 출력 결과가 표시됩니다:
    You should now run engine-setup.
    Done.
  4. 복구된 Manager 가상 머신을 설정합니다. 다음 절차에서는 기존 설정 및 데이터베이스 컨텐츠를 찾습니다. 설정을 확인합니다. 설정 확인 완료 후 SSH 지문 및 내부 Certificate Authority 해시(hash)가 제공됩니다.
    # engine-setup
    [ INFO  ] Stage: Initializing
    [ INFO  ] Stage: Environment setup
    Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf']
    Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140304075238.log
    Version: otopi-1.1.2 (otopi-1.1.2-1.el6ev)
    [ INFO  ] Stage: Environment packages setup
    [ INFO  ] Yum Downloading: rhel-65-zstream/primary_db 2.8 M(70%)
    [ INFO  ] Stage: Programs detection
    [ INFO  ] Stage: Environment setup
    [ INFO  ] Stage: Environment customization
             
              --== PACKAGES ==--
             
    [ INFO  ] Checking for product updates...
    [ INFO  ] No product updates found
             
              --== NETWORK CONFIGURATION ==--
             
    Setup can automatically configure the firewall on this system.
    Note: automatic configuration of the firewall may overwrite current settings.
    Do you want Setup to configure the firewall? (Yes, No) [Yes]: 
    [ INFO  ] iptables will be configured as firewall manager.
             
              --== DATABASE CONFIGURATION ==--
             
             
              --== OVIRT ENGINE CONFIGURATION ==--
             
              Skipping storing options as database already prepared
             
              --== PKI CONFIGURATION ==--
             
              PKI is already configured
             
              --== APACHE CONFIGURATION ==--
             
             
              --== SYSTEM CONFIGURATION ==--
             
             
              --== END OF CONFIGURATION ==--
             
    [ INFO  ] Stage: Setup validation
    [ INFO  ] Cleaning stale zombie tasks
             
              --== CONFIGURATION PREVIEW ==--
             
              Database name                      : engine
              Database secured connection        : False
              Database host                      : X.X.X.X
              Database user name                 : engine
              Database host name validation      : False
              Database port                      : 5432
              NFS setup                          : True
              Firewall manager                   : iptables
              Update Firewall                    : True
              Configure WebSocket Proxy          : True
              Host FQDN                          : Manager.example.com
              NFS mount point                    : /var/lib/exports/iso
              Set application as default page    : True
              Configure Apache SSL               : True
             
              Please confirm installation settings (OK, Cancel) [OK]:
  5. 복구된 환경에서 호스트 제거

    복구된 셀프 호스트 엔진이 새 하드웨어에서 배포되며 이 하드웨어의 이름이 백업된 엔진에 없는 고유한 이름이라면 다음 단계를 건너뜁니다. 다음 단계는 페일오버 호스트인 hosted_engine_1에서 진행되는 배포에만 해당됩니다. 이 호스트가 백업 생성 시 사용자 환경에 존재했기 때문에 이 호스트는 복구된 엔진에 계속 남아 있으며 최종 동기화가 진행되기 전에 이 호스트를 사용자 환경에서 먼저 제거해야 합니다.
    1. 관리 포털에 로그인합니다.
    2. 호스트 탭을 클릭합니다. 페일오버 호스트인 hosted_engine_1은 백업 시 유지관리 모드에 있고 가상 로드가 없도록 준비되었습니다.
    3. 삭제를 클릭합니다.
    4. Ok를 클릭합니다.
  6. Host 및 Manager 동기화

    호스트로 돌아가서 옵션 1을 선택하여 hosted-engine 배포를 계속해서 진행합니다:
    (1) Continue setup - engine installation is complete
    [ INFO  ] Engine replied: DB Up!Welcome to Health Status!
    [ 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...
    이제 관리 포털에서 hosted_engine_1이 표시되며 설치 중초기화 중 상태에 있다가 작동하지 않음 상태가 됩니다. 호스트는 계속해서 VDSM 호스트가 작동 가능해질 때까지 대기하다가 결국 대기 시간이 초과됩니다. 그 이유는 사용자 환경에 있는 다른 호스트가 Storage Pool Manager (SPM) 역할을 하며 이 SPM 호스트가 응답하지 않음 상태에 있어서 hosted_engine_1이 스토리지 도메인과 통신할 수 없기 때문입니다. 대기 시간 초과 시 가상 머신을 종료해서 배포를 완료하라는 메시지가 표시됩니다. 배포가 완료된 후 호스트를 수동으로 유지관리 모드로 변경하고 관리 포털에서 호스트를 활성화할 수 있습니다.
    [ INFO  ] Still waiting for VDSM host to become operational...
    [ ERROR ] Timed out while waiting for host to start. Please check the logs.
    [ ERROR ] Unable to add hosted_engine_2 to the manager
              Please shutdown the VM allowing the system to launch it as a monitored service.
              The system will wait until the VM is down.
  7. 새로운 Manager 가상 머신을 종료합니다.
    # shutdown -h now
  8. 호스트로 돌아가서 호스트가 Manager 가상 머신이 종료된 것을 감지했는지 확인합니다.
    [ INFO  ] Enabling and starting HA services
              Hosted Engine successfully set up
    [ INFO  ] Stage: Clean up
    [ INFO  ] Stage: Pre-termination
    [ INFO  ] Stage: Termination
  9. 호스트를 활성화합니다.
    1. 관리 포털에 로그인합니다.
    2. 호스트 탭을 클릭합니다.
    3. hosted_engine_1을 선택한 후 유지보수 버튼을 클릭합니다. 호스트가 유지관리 모드로 전환하려면 몇 분이 소요될 수 있습니다.
    4. 활성화 버튼을 클릭합니다.
    활성화 후 hosted_engine_1은 즉시 SPM에 있어서 경합하게 되며 스토리지 도메인 및 데이터 센터가 활성화됩니다.
  10. Non Responsive 상태의 호스트를 수동으로 펜싱하여 가상 머신을 활성화된 호스트로 마이그레이션합니다. 관리 포털에서 호스트 항목을 오른쪽 클릭하여 '호스트가 재부팅 되어 있는지 확인'을 선택합니다.
    백업 시 이 호스트에서 실행 중이던 모든 가상 머신은 이제 해당 호스트에서 제거되며 Unknown 상태에서 Down 상태가 됩니다. 이 가상 머신은 이제 hosted_engine_1에서 실행할 수 있습니다. 펜싱했던 호스트는 이제 REST API를 사용하여 강제로 제거할 수 있습니다.
이제 사용자 환경이 복구되어서 hosted_engine_1이 활성화되었으며 복구된 환경에서 가상 머신을 실행할 수 있습니다. 작동하지 않음 상태에 있는 남아 있는 호스트 엔진 (hosted-engine) 호스트를 6.2.4절. “복원된 셀프 호스트 엔진 환경에서 작동하지 않는 호스트 제거”의 절차에 따라서 제거하고 7장. 셀프 호스트 환경에 추가 호스트 설치에 있는 절차에 따라서 사용자 환경에 다시 설치할 수 있습니다.

참고

Manager 데이터베이스를 성공적으로 복구했지만 Manager 가상 머신이 Down 상태이며 다른 셀프 호스트 엔진 호스트로 마이그레이션할 수 없는 경우 https://access.redhat.com/solutions/1517683에 있는 절차에 따라 새로운 Manager 가상 머신을 활성화하고 작동되지 않는 Manager 가상 머신을 사용자 환경에서 제거합니다.

6.2.4. 복원된 셀프 호스트 엔진 환경에서 작동하지 않는 호스트 제거

관리 포털에서 펜싱된 호스트는 REST API 요청을 사용하여 강제로 제거할 수 있습니다. 이 절차에서는 HTTP 서버에 요청을 전송하는 명령행 인터페이스인 cURL을 사용합니다. 대부분의 Linux 배포에는 cURL이 포함됩니다. 이 절차에서는 Manager 가상 머신에 연결하여 관련 요청을 수행합니다.
  1. 작동하지 않는 호스트 펜싱

    관리 포털에서 호스트 항목을 오른쪽 클릭하여 호스트가 재부팅 되어 있는지 확인을 선택합니다.
    백업 시 이 호스트에서 실행 중이던 모든 가상 머신은 이제 해당 호스트에서 제거되며 Unknown 상태에서 Down 상태가 됩니다. 펜싱했던 호스트는 이제 REST API를 사용하여 강제로 제거할 수 있습니다.
  2. Manager CA (Certificate Authority) 가져오기

    Manager 가상 머신에 연결하여 명령행에서 cURL을 사용해서 다음과 같은 요청을 수행합니다.
    GET 요청을 사용하여 향후 모든 API 요청에 사용할 Manager Certificate Authority(CA)를 가져옵니다. 다음 예시에서는 Manager CA 인증서의 출력내용으로 hosted-engine.ca를 지정하는 데 --output 옵션이 사용됩니다. --insecure 옵션을 사용하면 이러한 초기 요청에 인증서가 없다는 것을 의미합니다.
    # curl --output hosted-engine.ca --insecure https://[Manager.example.com]/ca.crt
  3. 제거할 호스트의 GUID 가져오기

    호스트 컬렉션에서 GET 요청을 사용하여 제거할 호스트의 Global Unique Identifier(GUID)를 가져옵니다. 다음 예시에서는 Manager CA 인증서 파일이 포함되며 admin@internal 사용자를 인증에 사용하고 명령 실행 후 이 인증서 암호를 입력하라는 메시지가 표시됩니다.
    # curl --request GET --cacert hosted-engine.ca --user admin@internal https://[Manager.example.com]/api/hosts
    이 요청을 수행하면 사용자 환경에 있는 모든 호스트의 상세 정보가 표시됩니다. 호스트 GUID는 호스트 이름과 연결된 16진수 문자열입니다. Red Hat Virtualization REST API에 대한 보다 자세한 내용은 Red Hat Virtualization REST API Guide에서 참조하십시오.
  4. 펜싱된 호스트 제거

    DELETE 요청을 통해 펜싱된 호스트의 GUID를 사용하여 사용자 환경에서 해당 호스트를 제거합니다. 이전에 사용한 옵션에 더해서 이 예시에서는 eXtensible Markup Language(XML)을 사용하여 요청을 송수신하도록 하는 헤더를 지정하고 force 동작을 true로 설정하는 XML로 된 본문을 지정합니다.
    curl --request DELETE --cacert hosted-engine.ca --user admin@internal --header "Content-Type: application/xml" --header "Accept: application/xml" --data "<action><force>true</force></action>" https://[Manager.example.com]/api/hosts/ecde42b0-de2f-48fe-aa23-1ebd5196b4a5
    적절한 GUID가 지정된 경우에 한해 이 DELETE 요청을 사용하여 셀프 호스트 엔진 환경에 있는 모든 펜싱된 호스트를 제거할 수 있습니다.
  5. 호스트에서 셀프 호스트 엔진 설정 제거

    호스트를 셀프 호스트 엔진 환경에 다시 설치했을 때 이를 재설정할 수 있도록 호스트의 셀프 호스트 엔진 설정을 제거합니다.
    호스트에 로그인하여 설정 파일을 제거합니다:
    # rm /etc/ovirt-hosted-engine/hosted-engine.conf
셀프 호스트 엔진 환경에 호스트를 다시 설치할 수 있습니다.