Red Hat Training
A Red Hat training course is available for Red Hat Virtualization
셀프 호스트 엔진 가이드
Red Hat Virtualization 자체 호스팅 엔진 설치 및 유지 관리
초록
1장. 소개
표 1.1. 자체 호스팅 엔진 배포에 지원되는 OS 버전
시스템 유형
|
지원되는 버전
|
---|---|
Red Hat Enterprise Linux host
|
7.2 이상
|
Red Hat Virtualization Host
|
7.2 이상
|
HostedEngine-VM (Manager)
|
7
|
2장. 자체 호스트 엔진 배포
2.1. Red Hat Enterprise Linux 호스트에서 셀프 호스트 엔진 배포
2.1.1. 자체 호스트 엔진 패키지 설치
절차 2.1. 셀프 호스트 엔진 설치
- 자체 호스트 엔진 패키지를 설치합니다.
# yum install ovirt-hosted-engine-setup
- Manager 가상 머신 설치를 위한 RHV-M VirtualECDHE 패키지를 설치합니다.
# yum install rhevm-appliance
2.1.2. RHEL 기반 자체 호스트 엔진 구성
사전 요구 사항
- 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 기반 셀프 호스트 엔진 구성
호스팅 엔진 배포 시작
hosted-engine 스크립트를 실행합니다. 언제든지 스크립트를 이스케이프하려면 CTRL+D 키보드 조합을 사용하여 배포를 중단합니다. 네트워크 또는 터미널 중단 시 세션이 손실되지 않도록 화면 창 관리자를 사용하여 스크립트를 실행하는 것이 좋습니다. 아직 설치되지 않은 경우 표준 Red Hat Enterprise Linux 리포지토리에서 사용할 수 있는 screen 패키지를 설치하십시오.# yum install screen
# screen
# hosted-engine --deploy
참고세션 시간 초과 또는 연결 중단이 발생하는 경우 screen -d -r 을 실행하여 hosted-engine 배포 세션을 복구합니다.스토리지 구성
사용할 스토리지 유형을 선택합니다.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-insecure
를on
으로 설정합니다.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]:
네트워크 구성
이 스크립트는 환경에 대한 관리 브리지로 사용할 수 있는 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]:
가상 머신 구성
부팅 장치 유형에 대해 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
호스팅 엔진 구성
관리 포털에서 확인할 호스트의 이름과 관리 포털에 액세스할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]:
구성 프리뷰
진행하기 전에 hosted-engine 스크립트에서 입력한 구성 값을 표시하고 이러한 값을 계속 진행하도록 확인 메시지를 표시합니다.관리자 가상 머신 생성
이 스크립트는 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
서비스를 다시 시작하십시오.필요한 인타이틀먼트 구독
Manager 가상 머신을 필요한 인타이틀먼트에 등록합니다. 자세한 내용은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.
2.2. Red Hat Virtualization 호스트에 셀프 호스트 엔진 배포
사전 요구 사항
- 새로 설치된 Red Hat Virtualization Host 시스템이 있어야 합니다. Cockpit 사용자 인터페이스의 System (시스템) 하위 탭에 있는 Performance Profile 을
virtual-host
로 설정해야 합니다. - 자체 호스팅 엔진 환경을 위한 스토리지가 있어야 합니다. 두 개 이상의 스토리지 도메인이 필요합니다.배포용 스토리지 준비에 대한 자세한 내용은 관리 가이드의 스토리지 장을 참조하십시오.
- Manager 가상 머신 전용 공유 스토리지 도메인입니다. 이 도메인은 셀프 호스트 엔진 배포 중에 생성되며 최소 60GB여야 합니다.
- 일반 가상 머신 데이터를 위한 데이터 스토리지 도메인입니다. 배포를 완료한 후 이 도메인을 셀프 호스트 엔진 환경에 추가해야 합니다.주의Red Hat은 자체 호스팅 엔진 환경과 동일한 데이터 센터에 추가 활성 데이터 스토리지 도메인을 사용할 것을 강력히 권장합니다.활성 데이터 스토리지 도메인이 하나만 있는 데이터 센터에 셀프 호스트 엔진을 배포하고 해당 데이터 스토리지 도메인이 손상된 경우 새 데이터 스토리지 도메인을 추가하거나 손상된 데이터 스토리지 도메인을 제거할 수 없습니다. 셀프 호스트 엔진을 재배포해야 합니다.ISO 스토리지 도메인을 사용하는 경우 호스팅 엔진 가상 시스템에 ISO 도메인이 없을 것을 권장합니다.
중요iSCSI 스토리지를 사용하는 경우 공유 스토리지 도메인 및 데이터 스토리지 도메인에 동일한 iSCSI 대상을 사용하지 마십시오. - 관리자와 호스트를 위해 정규화된 도메인 이름이 있어야 합니다. 정방향 및 역방향 조회 레코드를 모두 DNS에서 설정해야 합니다.
- Manager 설치에 RHV-M VirtualECDHE를 사용하려면 하나의 디렉터리가 5GB 이상이어야 합니다. hosted-engine 스크립트는 먼저
/var/tmp
에 어플라이언스 파일을 추출하기에 충분한 공간이 있는지 확인합니다. 그렇지 않은 경우 다른 디렉터리를 지정하거나 외부 스토리지를 마운트할 수 있습니다. VDSM 사용자 및 KVM 그룹에는 디렉터리에 대한 읽기, 쓰기, 실행 권한이 있어야 합니다.
절차 2.3. RHVH 기반 셀프 호스트 엔진 구성
RHV-M 가상 기능 가져오기
고객 포털에서 RHV-M VirtualECDHE를 다운로드합니다.- 에서 고객 포털에 로그인합니다 https://access.redhat.com.
- 메뉴 모음에서 다운로드를 클릭합니다.
- Red Hat Virtualization > 제품 다운로드 페이지에 액세스하려면 Red Hat Virtualization > Download Latest 를 클릭합니다.
- 올바른 Red Hat Virtualization 버전에 대한 어플라이언스를 선택하고 지금 다운로드를 클릭합니다.
OVA 파일을 Red Hat Virtualization 호스트에 안전하게 복사하십시오.scp rhvm-appliance.ova root@host.example.com:/usr/share
셀프 호스트 엔진 배포 시작
https://HostIPorFQDN:9090에서 Cockpit 사용자 인터페이스에 로그인하고 가상화 > 호스팅 엔진으로 이동합니다. Start 를 클릭합니다.배포 스크립트의 텍스트 필드는 사용 가능한 경우 기본 답변으로 미리 채워져 있습니다. 필요에 따라 답변을 변경하거나 입력합니다.참고이 절차에서는 배포 질문이 텍스트 형식으로 표시됩니다. 메시지가 표시되면 UI에서 다음을 클릭합니다.During customization use CTRL-D to abort. Continuing will configure this host for serving as hypervisor and create a VM where you have to install the engine afterwards. Are you sure you want to continue? (Yes, No)[Yes]:
스토리지 구성
사용할 스토리지 유형을 선택합니다.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-insecure
를on
으로 설정합니다.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]:
네트워크 구성
이 스크립트는 방화벽 구성을 확인하고 콘솔(SPICE 또는 VNC) 액세스를 위해 이를 수정하도록 제공합니다. 그런 다음 환경에 대한 관리 브리지로 사용할 수 있는 NIC(네트워크 인터페이스 컨트롤러)를 탐지합니다.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]:
Please indicate a nic to set ovirtmgmt bridge on: (eth1, eth0) [eth1]:
가상 머신 구성
부팅 장치 유형에 대해 disk 를 선택한 다음 RHV-M VirtualECDHE의 경로를 지정합니다./var/tmp
디렉터리에 충분한 공간이 없는 경우 다른 디렉터리를 지정합니다. VDSM 사용자 및 KVM 그룹에는 디렉터리에 대한 읽기, 쓰기, 실행 권한이 있어야 합니다.Please specify the device to boot the VM from (choose disk for the oVirt engine appliance) (cdrom, disk, pxe) [disk]: disk
Please specify the console type you would like to use to connect to the VM (vnc, spice) [vnc]: vnc
Using an oVirt engine appliance could greatly speed-up ovirt hosted-engine deploy. You could get oVirt engine appliance installing ovirt-engine-appliance rpm. Please specify path to OVF archive you would like to use [None]: /path/to/rhvm-appliance.ova
cloud-init가 Manager 가상 머신의 초기 구성을 처리하도록 하려면 Yes 를 지정합니다. cloud-init에서 루트 암호 설정, 네트워킹 구성, 호스트 이름 구성, engine-setup 에 사용할 응답 파일 삽입, 부팅 시 engine-setup 실행과 같은 작업을 처리하기 위해 생성 을 지정합니다. 선택적으로 cloud-init의 보다 정교한 기능을 처리할 기존 cloud-init 스크립트가 있는 경우 Existing 을 선택합니다.참고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
Please provide the domain name you would like to use for the engine appliance. Engine VM domain: [localdomain] example.com
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_SandyBridge: Intel SandyBridge Family - model_Westmere: Intel Westmere Family - model_Nehalem: Intel Nehalem Family - model_Penryn: Intel Penryn Family - model_Conroe: Intel Conroe Family Please specify the CPU type to be used by the VM [model_SandyBridge]:
Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: [2]:
You may specify a unicast 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 maximum available): [12722]:
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 (max 3) of IP addresses of domain name servers for the engine VM Engine VM DNS (leave it empty to skip):
호스트 이름 확인을 위해 호스트에서 Manager 가상 시스템으로/etc/hosts
파일을 복사하려면Yes
를 지정합니다.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
셀프 호스트 엔진 구성
관리 포털에서 확인할 호스트의 이름과 관리 포털에 액세스할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 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]:
구성 프리뷰
진행하기 전에 hosted-engine 스크립트에서 입력한 구성 값을 표시하고 이러한 값을 계속 진행하도록 확인 메시지를 표시합니다.Please confirm installation settings (Yes, No)[Yes]: Yes
이 스크립트는 Manager 가상 머신을 생성하고 ovirt-engine 및 고가용성 서비스를 시작하고 호스트 및 공유 스토리지 도메인을 Manager 가상 머신에 연결합니다.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 공급자 구성 을 참조하십시오.또한 재해 복구를 지원하기 위해 구성 중에 제공한 답변도 파일에 저장합니다. --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
서비스를 다시 시작하십시오.필요한 인타이틀먼트 구독
Manager 가상 머신을 필요한 인타이틀먼트에 등록합니다. 자세한 내용은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.
2.3. Manager 가상 머신
3장. 자체 호스트 엔진 배포 문제 해결
3.1. Manager 가상 머신 문제 해결
절차 3.1. Manager 가상 머신 문제 해결
- hosted-engine --vm-status 를 실행하여 Manager 가상 머신의 상태를 확인합니다.참고Manager 가상 머신을 변경하면 상태 명령 출력에 반영되기까지 약 20초가 걸립니다.Manager 가상 머신이 정상적으로 실행 중인 경우 다음 출력이 표시됩니다.
--== Host 1 status ==-- Status up-to-date : True Hostname : hypervisor.example.com Host ID : 1 Engine status : {"health": "good", "vm": "up", "detail": "up"} Score : 3400 stopped : False Local maintenance : False crc32 : 99e57eba Host timestamp : 248542
- 상태가 잘못되었거나 vm 가 다운되면 글로벌 유지 관리 모드를 활성화하여 호스트가 더 이상 HA 서비스에서 관리하지 않도록 합니다.
- 관리 포털에서 Manager 가상 머신을 마우스 오른쪽 버튼으로 클릭하고 Enable Global HA Maintenance 를 선택합니다.
- 명령줄에서 유지보수 모드를 설정할 수도 있습니다.
# hosted-engine --set-maintenance --mode=global
- Manager 가상 머신이 다운된 경우 Manager 가상 머신을 시작합니다. 가상 머신이 가동된 경우 이 단계를 건너뜁니다.
# hosted-engine ---vm-start
- 콘솔 암호를 설정합니다.
# hosted-engine --add-console-password
- 콘솔에 연결합니다. 메시지가 표시되면 이전 단계에서 설정된 암호를 입력합니다. 더 많은 콘솔 옵션은 의 내용을 참조하십시오 https://access.redhat.com/solutions/2221461.
# hosted-engine --console
- Manager 가상 머신이 다운되거나 잘못된 상태에 있는 이유를 확인합니다.
/var/log/ECDHE 및
/var/log/ovirt-engine/engine.log
를 확인합니다. 문제를 해결한 후 Manager 가상 머신을 재부팅합니다. - Manager 가상 머신에 root로 로그인하고 ovirt-engine 서비스가 실행 중인지 확인합니다.
# systemctl status ovirt-engine.service
- Manager 가상 머신이 실행 중인지 확인한 후 콘솔 세션을 닫고 유지보수 모드를 비활성화하여 HA 서비스를 다시 활성화합니다.
# hosted-engine --set-maintenance --mode=none
추가 문제 해결 명령:
- hosted-engine --reinitialize-lockspace: 이 명령은 sanlock 잠금 공간이 손상될 때 사용됩니다. sanlock 잠금 공간을 다시 초기화하기 전에 글로벌 유지 관리 모드가 활성화되어 있고 Manager 가상 머신이 중지되었는지 확인합니다.
- hosted-engine --clean-metadata: 전역 상태 데이터베이스에서 호스트 에이전트의 메타데이터를 제거합니다. 그러면 다른 모든 호스트가 이 호스트를 잊어버립니다. 대상 호스트가 중단되고 글로벌 유지 관리 모드가 활성화되어 있는지 확인합니다.
- hosted-engine --check-live lines: 이 명령은 ovirt-engine 서비스의 라이브라인 페이지를 확인합니다. 웹 브라우저에서
https://engine-fqdn/ovirt-engine/services/health/
에 연결하여 확인할 수도 있습니다. - hosted-engine --connect-storage: 이 명령은 VDSM에 호스트 및 Manager 가상 시스템에 필요한 모든 스토리지 연결을 준비하도록 지시합니다. 이는 일반적으로 자체 호스팅 엔진 배포 중에 백엔드에서 실행됩니다. 이 명령을 실행하여 스토리지 문제를 해결해야 하는 경우 글로벌 유지 관리 모드가 활성화되어 있는지 확인합니다.
3.2. 실패한 자체 호스팅 엔진 배포 정리
Failed to connect to broker, the number of errors has exceeded the limit.
4장. 베어 메탈에서 RHEL 기반 셀프 호스트 환경으로 마이그레이션
4.1. 자체 호스트 환경으로 마이그레이션
- hosted-engine 스크립트를 실행하여 셀프 호스트 엔진 노드로 사용하고 새 Red Hat Virtualization 가상 머신을 생성하도록 호스트를 구성합니다.
- engine-backup 도구를 사용하여 엔진 데이터베이스 및 구성 파일을 백업하고 백업을 새 Manager 가상 머신에 복사한 다음 engine-backup 의
--mode=restore
매개 변수를 사용하여 백업을 복원합니다. engine-setup 을 실행하여 Manager 가상 머신 구성을 완료합니다. - hosted-engine 스크립트를 따라 설정을 완료합니다.
사전 요구 사항
- ovirt-hosted-engine-setup 패키지가 설치된 새 호스트를 준비합니다. 서브스크립션 및 패키지 설치에 대한 자세한 내용은 2.1절. “Red Hat Enterprise Linux 호스트에서 셀프 호스트 엔진 배포” 를 참조하십시오. 호스트는 현재 Red Hat Virtualization 환경의 지원되는 버전이어야 합니다.참고기존 호스트를 사용하려는 경우 호스트를 유지 관리에 배치하고 기존 환경에서 제거합니다. 자세한 내용은 관리 가이드에서 호스트 제거를 참조하십시오.
- 셀프 호스트 엔진 환경을 위한 스토리지를 준비합니다. 셀프 호스트 엔진에는 Manager 가상 시스템 전용 공유 스토리지 도메인이 필요합니다. 이 도메인은 배포 중에 생성되며 최소 60GB여야 합니다. 배포용 스토리지 준비에 대한 자세한 내용은 관리 가이드의 스토리지 장 을 참조하십시오.중요iSCSI 스토리지를 사용하는 경우 공유 스토리지 도메인 및 데이터 스토리지 도메인에 동일한 iSCSI 대상을 사용하지 마십시오.
- ECDHE- appliance 패키지를 설치하여 RHV- M VirtualECDHE를 가져옵니다. RHV-M VirtualECDHE는 항상 지원되는 최신 Manager 버전을 기반으로 합니다. Manager 버전이 마이그레이션에 대해 동일해야 하므로 현재 환경의 Manager 버전이 지원되는 최신 Y-stream 버전으로 업데이트되었는지 확인합니다.
- Manager 설치에 RHV-M VirtualECDHE를 사용하려면 하나의 디렉터리가 5GB 이상인지 확인합니다. hosted-engine 스크립트는 먼저
/var/tmp
에 어플라이언스 파일을 추출하기에 충분한 공간이 있는지 확인합니다. 그렇지 않은 경우 다른 디렉터리를 지정하거나 외부 스토리지를 마운트할 수 있습니다. VDSM 사용자 및 KVM 그룹에는 디렉터리에 대한 읽기, 쓰기, 실행 권한이 있어야 합니다. - 새 Manager의 정규화된 도메인 이름은 BareMetal-Manager와 동일한 정규화된 도메인 이름이어야 합니다. 정방향 및 역방향 조회 레코드를 모두 DNS에서 설정해야 합니다.
- 액세스 권한이 있어야 하며 BareMetal-Manager를 변경할 수 있습니다.
- BareMetal-Manager가 마이그레이션 중인 가상 머신은 BareMetal-Manager가 마이그레이션 중인 물리적 시스템과 동일한 양의 RAM을 보유해야 합니다. BareMetal-Manager가 마이그레이션된 물리적 머신보다 RAM이 적은 가상 머신으로 마이그레이션해야 하는 경우 다음 Red Hat 지식베이스 문서 https://access.redhat.com/articles/2705841 를 참조하십시오.
절차 4.1. 자체 호스트 환경으로 마이그레이션
자체 호스팅 엔진 배포 시작
참고버전 3.5 이하에서 업데이트하는 경우 hosted-engine --deploy --config-append=/etc/ovirt-hosted-engine/answers.conf 명령을 실행해야 합니다. 파일answers.conf
에는OVEHOSTED_NETWORK/bridgeName=str:rhevm
매개 변수가 포함되어야 합니다. 버전 3.5에서 버전 3.6 이상으로 업그레이드하면 이 매개변수가 설정되지 않은 경우 기본 관리 네트워크가 작동하지 않습니다.hosted-engine 스크립트를 실행합니다. 언제든지 스크립트를 이스케이프하려면 CTRL+D 키보드 조합을 사용하여 배포를 중단합니다. 네트워크 또는 터미널 중단 시 세션이 손실되지 않도록 화면 창 관리자를 사용하여 스크립트를 실행하는 것이 좋습니다. 아직 설치되지 않은 경우 표준 Red Hat Enterprise Linux 리포지토리에서 사용할 수 있는 screen 패키지를 설치하십시오.# yum install screen
# screen
# hosted-engine --deploy
참고세션 시간 초과 또는 연결 중단이 발생하는 경우 screen -d -r 을 실행하여 hosted-engine 배포 세션을 복구합니다.스토리지 구성
사용할 스토리지 유형을 선택합니다.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-insecure
를on
으로 설정합니다.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]:
네트워크 구성
이 스크립트는 환경에 대한 관리 브리지로 사용할 수 있는 NIC(네트워크 인터페이스 컨트롤러)를 탐지합니다. 그런 다음 방화벽 구성을 확인하고 콘솔 (SPICE 또는 VNC) 액세스 HostedEngine-VM에 대해 수정하도록 제공합니다.ovirt-ha-agent
에서 HostedEngine-VM 실행에 대한 호스트의 적합성을 결정하는 데 사용할 ping 가능한 게이트웨이 IP 주소를 제공합니다.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]: Please indicate a pingable gateway IP address [X.X.X.X]:
가상 머신 구성
이 스크립트는 이 절차에서 HostedEngine-VM이라는 Red Hat Virtualization Manager로 구성할 가상 머신을 생성합니다. 부팅 장치 유형으로 disk 를 선택하면 스크립트가 사용 가능한 RHV-MECDHEs를 자동으로 감지합니다. 어플라이언스를 선택합니다.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에 생성 을 지정하여 루트 암호 설정, 네트워킹 구성, 호스트 이름 구성과 같은 작업을 처리합니다. 선택적으로 cloud-init의 보다 정교한 기능을 처리할 기존 cloud-init 스크립트가 있는 경우 Existing 을 선택합니다. Manager 가상 머신의 FQDN을 지정합니다. BareMetal-Manager에 제공된 FQDN과 동일해야 합니다.참고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 no-cloud ISO image 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
engine-setup 을 실행하기 전에 HostedEngine-VM에서 BareMetal-Manager 백업 파일을 복원 할 수 있도록 다음 질문에No
로 대답해야합니다.Automatically execute engine-setup on the engine appliance on first boot (Yes, No)[Yes]? No
Manager 도메인 이름, 루트 암호, 네트워킹, 하드웨어 및 콘솔 액세스 세부 정보를 구성합니다.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
셀프 호스트 엔진 구성
Red Hat Virtualization 환경에서 식별할 Host-HE1의 이름과 관리 포털에 액세스할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]:
구성 프리뷰
진행하기 전에 hosted-engine 스크립트에서 입력한 구성 값을 표시하고 이러한 값을 계속 진행하도록 확인 메시지를 표시합니다.Bridge interface : eth1 Engine FQDN : manager.example.com Bridge name : ovirtmgmt Host address : host.example.com SSH daemon port : 22 Firewall manager : iptables Gateway address : X.X.X.X Host name for web application : Host-HE1 Host ID : 1 Image size GB : 50 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]:
Creating HostedEngine-VM
이 스크립트는 HostedEngine-VM으로 구성할 가상 머신을 생성하고 연결 세부 정보를 제공합니다. hosted-engine 스크립트가 Host-HE1에서 진행하기 전에 HostedEngine-VM에서 백업 파일을 복원한 후 engine-setup 을 수동으로 실행해야 합니다.[ INFO ] Stage: Transaction setup ... [ INFO ] Creating VM You can now connect to the VM with the following command: /bin/remote-viewer vnc://localhost:5900 Use temporary password "3463VnKn" 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/8f74b589-8c6f-4a32-9adf-6e615b69de07.sock,user=ovirt-vmconsole STDIO,raw,echo=0,escape=1 Please ensure that your Guest OS is properly configured to support serial console according to your distro documentation. Follow http://www.ovirt.org/Serial_Console_Setup#I_need_to_access_the_console_the_old_way for more info. 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. The VM has been rebooted. To continue please install oVirt-Engine in the VM (Follow http://www.ovirt.org/Quick_Start_Guide for more info). Make a selection from the options below: (1) Continue setup - oVirt-Engine installation is ready and ovirt-engine service is up (2) Abort setup (3) Power off and restart the VM (4) Destroy VM and abort setup (1, 2, 3, 4)[1]:
다음 명령으로 VNC 프로토콜을 사용하여 가상 머신에 연결합니다. FQDN을 정규화된 도메인 이름 또는 셀프 호스트 엔진 노드의 IP 주소로 바꿉니다.# /bin/remote-viewer vnc://FQDN:5900
HostedEngine-VM에서 SSH 활성화
SSH 암호 인증은 RHV-M 가상에서 기본적으로 활성화되어 있지 않습니다. VNC를 통해 HostedEngine-VM에 연결하고 나중에 SSH를 통해 가상 머신에 액세스하여 BareMetal-Manager 백업 파일을 복원하고 새 관리자를 구성할 수 있도록 SSH 암호 인증을 활성화합니다. sshd 서비스가 실행 중인지 확인합니다./etc/ssh/sshd_config
를 편집하고 다음 두 옵션을yes
로 변경합니다.[...] PermitRootLogin yes [...] PasswordAuthentication yes
변경 사항을 적용하려면sshd
서비스를 다시 시작하십시오.# systemctl restart sshd.service
Disabling BareMetal-Manager
구축된 Red Hat Virtualization 환경의 관리자인 BareMetal-Manager에 연결하고ovirt-engine
서비스를 중지하고 실행을 방지합니다.# systemctl stop ovirt-engine.service # systemctl disable ovirt-engine.service
참고BareMetal-Manager를 실행에서 중지하는 것은 필수 사항은 아니지만 백업이 생성된 후 환경을 변경하지 않도록 하는 것이 좋습니다. 또한 BareMetal-Manager 및 HostedEngine-VM이 기존 리소스를 동시에 관리하는 것을 방지합니다.DNS 업데이트
Red Hat Virtualization 환경의 FQDN이 HostedEngine-VM의 IP 주소와 관련이 있고 Host-HE1에서 hosted-engine 배포 스크립트를 구성할 때 이전에 제공된 FQDN과 관련이 있도록 DNS를 업데이트합니다. 이 절차에서는 마이그레이션된 hosted-engine 설정에서 엔진에 제공된 FQDN이 원래 엔진 설정에 지정된 FQDN과 동일하기 때문에 manager.example.com 으로 FQDN이 설정되었습니다.BareMetal-Manager 백업 생성
BareMetal-Manager에 연결하고--mode=backup
, --file=ECDHE ,
매개변수를 사용하여 engine-backup 명령을 실행하여 백업 모드, 생성 및 백업에 사용되는 백업 파일의 이름, 백업 로그를 저장하기 위해 생성할 로그 파일의 이름을 지정합니다.--
log=LogFILE# engine-backup --mode=backup --file=FILE --log=LogFILE
백업 파일을 HostedEngine-VM에 복사
BareMetal-Manager에서 백업 파일을 HostedEngine-VM에 안전하게 복사합니다. 다음 예에서 manager.example.com 은 HostedEngine-VM의 FQDN이며 /backup/ 는 지정된 폴더 또는 경로입니다. 지정된 폴더 또는 경로가 없는 경우 HostedEngine-VM에 연결하고 BareMetal-Manager에서 백업을 안전하게 복사하기 전에 생성해야 합니다.# scp -p FILE LogFILE manager.example.com:/backup/
Registering HostedEngine-VM
Red Hat 서브스크립션 관리에 HostedEngine-VM을 등록하고 필요한 리포지토리를 활성화합니다. 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.HostedEngine-VM에서 백업 파일 복원
전체 백업을 복원하려면 engine-backup 도구를 사용합니다. engine-setup 중에 BareMetal-Manager 데이터베이스를 수동으로 구성한 경우 6.2.3절. “자체 호스트 엔진 관리자 수동 복원” 의 지침에 따라 백업 환경을 수동으로 복원합니다.- 관리자만 복원하는 경우 다음을 실행합니다.
# engine-backup --mode=restore --file=file_name --log=log_file_name --provision-db --restore-permissions
- Manager 및 Data를 복원하는 경우 다음을 실행합니다.
# 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.
HostedEngine-VM 구성
복원된 Manager 가상 머신을 구성합니다. 이 프로세스는 기존 구성 설정 및 데이터베이스 콘텐츠를 식별합니다. 설정을 확인합니다. 완료되면 설정이 SSH 지문과 내부 인증 기관 해시를 제공합니다.# 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 ==-- --== PKI CONFIGURATION ==-- --== APACHE CONFIGURATION ==-- --== SYSTEM CONFIGURATION ==-- --== END OF CONFIGURATION ==-- [ INFO ] Stage: Setup validation [ INFO ] Cleaning stale zombie tasks --== CONFIGURATION PREVIEW ==-- Default SAN wipe after delete : False Firewall manager : iptables Update Firewall : True Host FQDN : manager.example.com Engine database secured connection : False Engine database host : X.X.X.X Engine database user name : engine Engine database name : engine Engine database port : 5432 Engine database host name validation : False Engine installation : True PKI organization : example.com NFS mount point : /var/lib/exports/iso Configure VMConsole Proxy : True Engine Host FQDN : manager.example.com Configure WebSocket Proxy : True Please confirm installation settings (OK, Cancel) [OK]:
호스트 및 관리자 동기화
Host-HE1로 돌아가 host -engine 배포 스크립트를 계속합니다. 옵션 1:(1) Continue setup - oVirt-Engine installation is ready and ovirt-engine service is up
이 스크립트는 내부 인증 기관 해시를 표시하고 Host-HE1을 추가할 클러스터를 선택하라는 메시지를 표시합니다.[ INFO ] Engine replied: DB Up!Welcome to Health Status! [ INFO ] Acquiring internal CA cert from the engine [ INFO ] The following CA certificate is going to be used, please immediately interrupt if not correct: [ INFO ] Issuer: C=US, O=example.com, CN=manager.example.com.23240, Subject: C=US, O=example.com, CN=manager.example.com.23240, Fingerprint (SHA-1): XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [ INFO ] Connecting to the Engine Enter the name of the cluster to which you want to add the host (DB1, DB2, Default) [Default]: [ INFO ] Waiting for the host to become operational in the engine. This may take several minutes... [ INFO ] The VDSM Host is now operational [ INFO ] Saving hosted-engine configuration on the shared storage domain Please shutdown the VM allowing the system to launch it as a monitored service. The system will wait until the VM is down.
Shutting Down HostedEngine-VM
HostedEngine-VM을 종료합니다.# shutdown -h now
설정 확인
Host-HE1로 돌아가서 HostedEngine-VM이 다운된 것을 탐지했는지 확인합니다.[ INFO ] Enabling and starting HA services [ INFO ] Stage: Clean up [ INFO ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20160509162843.conf' [ INFO ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ INFO ] Hosted Engine successfully set up
5장. 리소스 유지 관리 및 업그레이드
5.1. 셀프 호스트 엔진 유지 관리
global
- Manager 가상 시스템의 상태를 모니터링하지 못하도록 클러스터의 모든 고가용성 에이전트가 비활성화됩니다. 이후 Red Hat Virtualization 버전으로의 업그레이드와 같이ovirt-engine
서비스를 중지해야 하는 설정 또는 업그레이드 작업에 글로벌 유지 관리 모드를 적용해야 합니다.local
- 명령을 실행하는 노드의 고가용성 에이전트는 Manager 가상 머신의 상태를 모니터링하지 않습니다. 노드는 Manager 가상 머신을 호스팅하는 동안 로컬 유지 관리 모드에서 제외됩니다. 이 모드에 배치될 때 Manager 가상 머신을 호스팅하는 경우 Manager는 사용 가능한 노드가 있는 경우 다른 노드로 마이그레이션됩니다. 시스템 변경 또는 업데이트를 셀프 호스트 엔진 노드에 적용하는 경우 로컬 유지 관리 모드를 사용하는 것이 좋습니다.none
- 유지 관리 모드를 비활성화하여 고가용성 에이전트가 작동하는지 확인합니다.
절차 5.1. RHEL 기반 셀프 호스트 엔진 유지 관리(로컬 유지 관리)
- 자체 호스팅 엔진 노드를 로컬 유지 관리 모드에 배치합니다.
- 관리 포털에서 셀프 호스트 엔진 노드를 선택하고 유지 관리를 클릭합니다. 해당 노드에 대해 로컬 유지보수 모드가 자동으로 트리거됩니다.
- 명령줄에서 유지보수 모드를 설정할 수도 있습니다.
# hosted-engine --set-maintenance --mode=local
- 유지 관리 작업을 완료한 후 유지 관리 모드를 비활성화합니다.
# hosted-engine --set-maintenance --mode=none
절차 5.2. RHEL 기반 셀프 호스트 엔진 유지 관리(Global Maintenance)
- 자체 호스팅 엔진 노드를 글로벌 유지 관리 모드에 배치합니다.
- 관리 포털에서 Manager 가상 머신을 마우스 오른쪽 버튼으로 클릭하고 Enable Global HA Maintenance 를 선택합니다.
- 명령줄에서 유지보수 모드를 설정할 수도 있습니다.
# hosted-engine --set-maintenance --mode=global
- 유지 관리 작업을 완료한 후 유지 관리 모드를 비활성화합니다.
# hosted-engine --set-maintenance --mode=none
5.2. 자체 호스트 엔진 환경에서 호스트 제거
절차 5.3. 자체 호스트 엔진 환경에서 호스트 제거
- 관리 포털에서 호스트 탭을 클릭합니다. 셀프 호스트 엔진 노드를 선택하고 유지 관리를 클릭하여 로컬 유지 관리 모드로 설정합니다.
- 편집 을 클릭합니다.
- Hosted Engine 하위 탭을 클릭하고 Undeploy (배포 취소) 라디오 버튼을 선택합니다. 이 작업은 ovirt-ha-agent 및 ovirt-ha-broker 서비스를 중지하고 자체 호스팅 엔진 구성 파일을 제거합니다.참고호스트가 표시되지만 hosted-engine --vm-status 를 실행할 때 사용할 수 없는 것으로 표시됩니다. 이는 호스트를 배포 취소할 때 메타데이터가 제거되지 않기 때문입니다. 제거된 호스트는 메타데이터가 새로 고침되지 않을 때 약 1주일 후에 사라집니다. 호스트의 메타데이터를 강제로 제거하려면 호스팅 엔진 설정에서 재배포된 호스트의 메타데이터를 정리하는 방법의 절차를 따릅니다.
- 선택적으로 제거를 클릭하여 호스트 제거 확인 창을 열고 확인을 클릭합니다.
5.3. RHEL 기반 자체 호스팅 엔진 환경 업그레이드
- Manager 가상 시스템을 관리하는 고가용성 에이전트를 글로벌 유지 관리 모드로 배치합니다.
- 호스트에서 필요한 리포지토리를 활성화하고 ovirt-hosted-engine-setup 및ECDHE -appliance 패키지를 업데이트합니다.
- hosted-engine --upgrade-appliance 를 실행하여 Manager 가상 머신을 업그레이드합니다. 업그레이드 중에 3.6 Manager의 백업을 생성하여 업그레이드가 수행되는 호스트 머신에 복사하라는 메시지가 표시됩니다.
- 호스트를 업데이트합니다.
- Manager 가상 머신 및 클러스터의 모든 호스트가 업데이트되면 클러스터 호환성 버전을 4.0으로 변경합니다.
hosted-engine-backup-*
로 레이블이 지정됩니다.
사전 요구 사항
- 어플라이언스 파일을 추출하려면
/var/tmp
디렉터리에 5GB 이상의 사용 가능한 공간이 있어야 합니다. 그렇지 않은 경우 다른 디렉터리를 지정하거나 필요한 공간이 있는 대체 스토리지를 마운트할 수 있습니다. VDSM 사용자 및 KVM 그룹에는 디렉터리에 대한 읽기, 쓰기, 실행 권한이 있어야 합니다. - 셀프 호스트 엔진 스토리지 도메인에는 새 어플라이언스를 배포할 수 있는 추가 여유 공간이 있어야 합니다(기본적으로 50GB). iSCSI 또는 파이버 채널 스토리지의 스토리지를 늘리려면 스토리지에서 LUN 크기를 수동으로 확장한 다음 관리자를 사용하여 스토리지 도메인을 확장해야 합니다. LUN 크기 조정에 대한 자세한 내용은 관리 가이드에서 iSCSI 또는 FCP 스토리지 증가를 참조하십시오.
절차 5.4. 자체 호스트 엔진 업그레이드
- 모든 셀프 호스트 엔진 노드에서 고가용성 에이전트를 비활성화합니다. 이렇게 하려면 클러스터의 모든 호스트에서 다음 명령을 실행합니다.
# hosted-engine --set-maintenance --mode=global
참고hosted-engine --vm-status 를 실행하여 환경이 유지보수 모드에 있는지 확인합니다. - 현재 4.6.1으로 설정되어 Manager 가상 시스템이 포함된 호스트에서 필요한 리포지토리를 활성화합니다.
# subscription-manager repos --enable=rhel-7-server-rhv-4-mgmt-agent-rpms
- Manager 가상 머신을 제외한 모든 가상 머신을 대체 호스트로 마이그레이션합니다.
- 호스트에서 Manager 가상 머신 패키지를 업데이트합니다.
# yum update ovirt-hosted-engine-setup rhevm-appliance
FlexVolume -appliance 패키지가 누락된 경우 ovirt-hosted-engine-setup을 업데이트하기 전에 수동으로 설치합니다.# yum install rhevm-appliance
# yum update ovirt-hosted-engine-setup
- 업그레이드 유틸리티를 실행하여 Manager 가상 머신을 업그레이드합니다. 아직 설치되지 않은 경우 표준 Red Hat Enterprise Linux 리포지토리에서 사용할 수 있는 screen 패키지를 설치하십시오.
# yum install screen
# screen
# hosted-engine --upgrade-appliance
참고둘 이상의 항목이 감지된 경우 어플라이언스를 선택하고 Manager 데이터베이스의 백업을 생성하고 전체 위치를 제공하라는 메시지가 표시됩니다. - 업그레이드가 완료되면 글로벌 유지 관리를 비활성화합니다.
# hosted-engine --set-maintenance --mode=none
5.4. RHEV-H 기반 셀프 호스트 엔진 환경 업그레이드
- Manager 가상 시스템을 관리하는 고가용성 에이전트를 글로벌 유지 관리 모드로 배치합니다.
- 환경에 새로운 RHVH 4.0 호스트를 추가합니다.
- Manager 가상 머신을 새 호스트로 마이그레이션하고ECDHE로 설정합니다.
- 업그레이드 유틸리티를 실행하여 Manager를 업그레이드합니다. 업그레이드 프로세스 중에 3.6 Manager의 백업을 생성하고 업그레이드가 수행되는 호스트 머신에 복사하라는 메시지가 표시됩니다.
- 호스트를 업데이트합니다.
- Manager 가상 머신 및 클러스터의 모든 호스트가 업데이트되면 클러스터 호환성 버전을 4.0으로 변경합니다.
hosted-engine-backup-*
로 레이블이 지정됩니다.
사전 요구 사항
- 어플라이언스 파일을 추출하려면
/var/tmp
디렉터리에 5GB 이상의 사용 가능한 공간이 있어야 합니다. 그렇지 않은 경우 다른 디렉터리를 지정하거나 필요한 공간이 있는 대체 스토리지를 마운트할 수 있습니다. VDSM 사용자 및 KVM 그룹에는 디렉터리에 대한 읽기, 쓰기, 실행 권한이 있어야 합니다. - 셀프 호스트 엔진 스토리지 도메인에는 새 어플라이언스를 배포할 수 있는 추가 여유 공간이 있어야 합니다(기본적으로 50GB). iSCSI 또는 파이버 채널 스토리지의 스토리지를 늘리려면 스토리지에서 LUN 크기를 수동으로 확장한 다음 관리자를 사용하여 스토리지 도메인을 확장해야 합니다. LUN 크기 조정에 대한 자세한 내용은 관리 가이드에서 iSCSI 또는 FCP 스토리지 증가를 참조하십시오.
절차 5.5. 자체 호스트 엔진 업그레이드
- 새 RHVH 4.0 호스트를 설치합니다. RHVH 설치 지침은 설치 가이드를 참조하십시오.
- 환경에 새 호스트를 추가합니다. 새 호스트에서 배포 스크립트를 실행합니다.
# hosted-engine --deploy
메시지가 표시되면 기존 공유 스토리지 도메인을 지정합니다. 그러면 스크립트가 추가 호스트 설정임을 탐지합니다. 추가 호스트 배포 중 스크립트의 질문에 대한 자세한 내용은 Red Hat Enterprise Virtualization 3.6 Self-Hosted Engine Guide 의 셀프 호스트 환경에 추가 호스트 설치를 참조하십시오. - 모든 셀프 호스트 엔진 노드에서 고가용성 에이전트를 비활성화합니다. 이렇게 하려면 클러스터의 모든 호스트에서 다음 명령을 실행합니다.
# hosted-engine --set-maintenance --mode=global
참고hosted-engine --vm-status 를 실행하여 환경이 유지보수 모드에 있는지 확인합니다. - 고객 포털에서 RHV-M VirtualECDHE를 다운로드하여 새 호스트에 복사합니다.
- 에서 고객 포털에 로그인합니다 https://access.redhat.com.
- 메뉴 모음에서 다운로드를 클릭합니다.
- Red Hat Virtualization > 제품 다운로드 페이지에 액세스하려면 Red Hat Virtualization > Download Latest 를 클릭합니다.
- Red Hat Virtualization 4.0용 어플라이언스를 선택하고 지금 다운로드를 클릭합니다.
OVA 파일을 Red Hat Virtualization 호스트에 안전하게 복사하십시오.scp rhvm-appliance.ova root@host.example.com:/usr/share
- Manager 가상 시스템을 RHVH 4.0 호스트로 마이그레이션하고 호스트를SPM(Storage Pool Manager)으로 설정합니다.
- 업그레이드 스크립트를 실행하여 Manager 가상 머신을 업그레이드합니다. 아직 설치되지 않은 경우 screen 패키지를 설치합니다.
# yum install screen
# screen
# hosted-engine --upgrade-appliance
참고이 스크립트는 호스트에 복사한 RHV-M 가상의 위치를 요청합니다. 또한 Manager 데이터베이스의 백업을 만들고 전체 위치를 제공하라는 메시지가 표시됩니다. - 업그레이드가 완료되면 글로벌 유지 관리를 비활성화합니다.
# hosted-engine --set-maintenance --mode=none
5.5. 자체 호스팅 엔진 환경에서 호스트 업그레이드
# subscription-manager repos --disable=rhel-7-server-rhev-mgmt-agent-rpms
# subscription-manager repos --enable=rhel-7-server-rhv-4-mgmt-agent-rpms
5.6. 마이너 릴리스 간 셀프 호스트 엔진 관리자 업데이트
- Manager 가상 머신을 필요한 인타이틀먼트에 가입했는지 확인합니다. 자세한 내용은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.
- 시스템을 글로벌 유지 관리 모드로 배치합니다. 자세한 내용은 5.1절. “셀프 호스트 엔진 유지 관리” 을 참조하십시오.
engine-setup
을 사용하여 마이너 버전 간에 업데이트하는 절차를 따르십시오. 자세한 내용은 설치 가이드 의 마이너 릴리스 간 업데이트를 참조하십시오.- 글로벌 유지보수 모드를 비활성화합니다. 자세한 내용은 5.1절. “셀프 호스트 엔진 유지 관리” 을 참조하십시오.
6장. RHEL 기반 자체 호스팅 환경 백업 및 복원
절차 6.1. 자체 호스팅 엔진 환경을 백업하는 워크플로
- Manager 가상 시스템은
호스트 2
에서 실행되고 있으며 환경의 6개의 일반 가상 시스템은 세 개의 호스트 간에 균형을 유지합니다.호스트 1
을 유지 관리 모드로 배치합니다. 그러면호스트 1
의 가상 머신이 다른 호스트로 마이그레이션되어 가상 로드를 비우고 백업에 대한 장애 조치 호스트로 사용할 수 있습니다. 호스트 1
은 유지 관리 모드에 있습니다. 이전에 호스팅한 두 개의 가상 시스템이 Host 3으로 마이그레이션되었습니다.engine-backup 을 사용하여 환경 백업을 생성합니다. 백업을 수행한 후Host 1
을 다시 활성화하여 Manager 가상 머신을 포함하여 가상 머신을 호스팅할 수 있습니다.
절차 6.2. 셀프 호스트 엔진 환경 복원을 위한 워크플로
호스트 1
은 새 셀프 호스트 엔진을 배포하는 데 사용되며 이전 예제 프로세스에서 수행된 백업을 복원했습니다. 복원된 환경 배포에는 정기적인 자체 호스팅 엔진 배포와 관련된 추가 단계가 포함됩니다.- Red Hat Virtualization Manager를 Manager 가상 머신에 설치한 후
engine-setup
을 먼저 실행하기 전에engine-backup
툴을 사용하여 백업을 복원합니다. engine-setup
이 Manager를 설정하고 복원한 후 관리 포털에 로그인하여 백업에 표시되는Host 1
을 제거합니다. 이전호스트 1
이 제거되지 않고 새 호스트 1에서 배포를 종료할 때 Manager에 계속 존재하는 경우 Manager 가상 머신은 새호스트 1
과 동기화되지 않으며 배포가 실패합니다.
호스트 1
과 Manager 가상 시스템이 동기화되고 배포가 완료되면 환경을 기본 수준에서 작동하는 것으로 간주할 수 있습니다. 자체 호스팅 엔진 노드가 하나만 있으면 Manager 가상 시스템은 고가용성이 아닙니다. 그러나 필요한 경우 우선 순위가 높은 가상 머신을Host 1
에서 시작할 수 있습니다.환경에 있지만 자체 호스팅 엔진 노드가 아닌 표준 RHEL 기반 호스트 - 작동 중인 자체 호스팅 엔진 노드가 활성 상태가 되고 백업 시 활성 상태인 가상 머신이 이제 이러한 호스트에서 실행되고 Manager에서 사용할 수 있습니다.호스트 2
와호스트 3
은 현재 상태에서 복구할 수 없습니다. 이러한 호스트를 환경에서 제거한 다음 hosted-engine 배포 스크립트를 사용하여 환경에 다시 추가해야 합니다. 이러한 작업에 대한 자세한 내용은 6.2.4절. “복원된 자체 호스팅 엔진 환경에서 작동하지 않는 호스트 제거” 및 7장. 자체 호스트 환경에 추가 호스트 설치 을 참조하십시오.호스트 2
와호스트 3
이 복원된 환경에 다시 배포되었습니다. 이제 환경은 백업이 수행되기 전에 첫 번째 이미지에 있는 것처럼, Manager 가상 머신이호스트 1
에서 호스팅되는 경우를 제외하고 환경이 됩니다.
6.1. 자체 호스팅 엔진 관리자 가상 머신 백업
절차 6.3. 원래 Red Hat Virtualization Manager 백업
DestinationRule 호스트 준비
환경의 셀프 호스트 엔진 노드 중 하나인 장애 조치 호스트는 백업 시 가상 로드가 없도록 유지보수 모드에 배치되어야 합니다. 그러면 나중에 복원된 자체 호스팅 엔진 환경을 배포하는 데 이 호스트를 사용할 수 있습니다. 셀프 호스트 엔진 노드는 이 백업 시나리오에 대한 장애 조치 호스트로 사용할 수 있지만호스트 1
을 사용하면 복원 프로세스가 더 간단합니다.Host 1
호스트의 기본 이름은hosted_engine_1
입니다. 이 이름은 hosted-engine 배포 스크립트가 처음 실행될 때 설정되었습니다.- 셀프 호스트 엔진 노드 중 하나에 로그인합니다.
hosted_engine_1
호스트가Host 1
인지 확인합니다.# hosted-engine --vm-status
- 관리 포털에 로그인합니다.
- 호스트 탭을 클릭합니다.
- 결과 목록에서
hosted_engine_1
호스트를 선택하고 유지 관리를 클릭합니다. - 확인을 클릭합니다.
호스트의 가상 로드에 따라 모든 가상 시스템을 마이그레이션하는 데 시간이 다소 걸릴 수 있습니다. 호스트 상태가Maintenance
로 변경된 후 다음 단계로 진행합니다.관리자 백업 생성
Manager 가상 머신에서 구성 설정 및 데이터베이스 콘텐츠를 백업하고, [EngineBackupFile] 을 백업 파일의 파일 이름으로 교체하고, [LogFILE] 을 백업 로그의 파일 이름으로 교체합니다.# engine-backup --mode=backup --file=[EngineBackupFile] --log=[LogFILE]
외부 서버에 파일 백업
파일을 외부 서버에 백업합니다. 다음 예에서 [Storage.example.com] 은 필요할 때까지 백업을 저장할 네트워크 스토리지 서버의 정규화된 도메인 이름이며 /backup/ 는 지정된 폴더 또는 경로입니다. 구성 설정 및 데이터베이스 콘텐츠를 복원하려면 백업 파일에 액세스할 수 있어야 합니다.# scp -p [EngineBackupFiles] [Storage.example.com:/backup/EngineBackupFiles]
DestinationRule 호스트 활성화
hosted_engine_1
호스트를 유지 관리 모드에서 가져옵니다.- 관리 포털에 로그인합니다.
- 호스트 탭을 클릭합니다.
- 결과 목록에서
hosted_engine_1
을 선택합니다. - 활성화 를 클릭합니다.
6.2. 자체 호스트 엔진 환경 복원
- 새로 설치된 Red Hat Enterprise Linux 호스트를 만들고 hosted-engine 배포 스크립트를 실행합니다.
- 새 Manager 가상 머신에 Red Hat Virtualization Manager 구성 설정 및 데이터베이스 콘텐츠를 복원합니다.
- 비작동 상태에서 자체 호스팅 엔진 노드를 제거하고 복원된 자체 호스팅 엔진 환경에 다시 설치합니다.
사전 요구 사항
- 셀프 호스트 엔진 환경을 복원하려면 물리적 호스트에 새로 설치된 Red Hat Enterprise Linux 시스템을 준비해야 합니다.
- 새 호스트 및 Manager의 운영 체제 버전은 원래 호스트와 Manager와 동일해야 합니다.
- 새 환경에 대한 Red Hat Subscription Manager 인타이틀먼트가 있어야 합니다. 필요한 리포지토리 목록은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.
- 새 Manager의 정규화된 도메인 이름은 원래 관리자의 정규화된 도메인 이름과 동일해야 합니다. 정방향 및 역방향 조회 레코드를 모두 DNS에서 설정해야 합니다.
- Manager 가상 시스템의 공유 스토리지 도메인으로 사용할 새로운 셀프 호스트 엔진 환경에 스토리지를 준비해야 합니다. 이 도메인은 60GB 이상이어야 합니다. 배포용 스토리지 준비에 대한 자세한 내용은 관리 가이드의 스토리지 장을 참조하십시오.
6.2.1. 복원된 환경으로 사용할 새 자체 호스팅 엔진 환경 생성
호스트인 호스트 1
은 이 프로세스에서도 사용되는 hosted_engine_1
의 기본 호스트 이름을 사용합니다. 자체 호스팅 엔진에 대한 복원 프로세스의 특성으로 인해 복원 엔진의 최종 동기화를 수행하기 전에 이 장애 조치 호스트를 제거해야 하며, 백업 시 호스트에 가상 로드가 없는 경우에만 수행할 수 있습니다. 백업된 환경에서 사용되지 않은 별도의 하드웨어에서 백업을 복원할 수도 있으며 이는 문제가 되지 않습니다.
절차 6.4. 복원된 환경으로 사용할 새 자체 호스팅 환경 생성
DNS 업데이트
Red Hat Virtualization 환경의 정규화된 도메인 이름이 새 Manager의 IP 주소와 관련이 있도록 DNS를 업데이트합니다. 이 절차에서는 정규화된 도메인 이름이 Manager.example.com 으로 설정되었습니다. 엔진에 제공된 정규화된 도메인 이름은 백업된 원래 엔진의 엔진 설정에 지정된 것과 동일해야 합니다.호스팅 엔진 배포 시작
새로 설치된 Red Hat Enterprise Linux 호스트에서 hosted-engine 배포 스크립트를 실행합니다. 언제든지 스크립트를 이스케이프하려면 CTRL+D 키보드 조합을 사용하여 배포를 중단합니다. 네트워크를 통해 hosted-engine 배포 스크립트를 실행하는 경우 네트워크 또는 터미널 중단 시 세션이 손실되지 않도록 화면 창 관리자를 사용하는 것이 좋습니다. 설치되지 않은 경우 screen 패키지를 먼저 설치합니다.# screen
# hosted-engine --deploy
Initialization 준비
이 스크립트는 자체 호스팅 엔진 환경에서 사용할 하이퍼바이저로 호스트를 사용하도록 확인을 요청하는 것으로 시작됩니다.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]:
스토리지 구성
사용할 스토리지 유형을 선택합니다.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-insecure
를on
으로 설정합니다.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]:
네트워크 구성
이 스크립트는 환경에 대한 관리 브리지로 사용할 수 있는 NIC(네트워크 인터페이스 컨트롤러)를 탐지합니다. 그런 다음 방화벽 구성을 확인하고 콘솔(SPICE 또는 VNC)이 Manager 가상 머신에 액세스할 수 있도록 수정하도록 제공합니다. Manager 가상 시스템 실행에 대한 호스트의 적합성을 결정하는 데 도움이 되도록ovirt-ha-agent
에서 사용할 ping 가능한 게이트웨이 IP 주소를 제공합니다.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]:
새 관리자 가상 머신 구성
이 스크립트는 새 Manager 가상 시스템으로 구성할 가상 머신을 생성합니다. 부팅 장치를 지정하고 해당하는 경우 설치 미디어의 경로 이름, 이미지 별칭, CPU 유형, 가상 CPU 수 및 디스크 크기를 지정합니다. Manager 가상 머신의 MAC 주소를 지정하거나 임의로 생성된 주소를 수락합니다. MAC 주소는 Manager 가상 머신에 운영 체제를 설치하기 전에 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]:
호스트 이름 확인
관리 포털에 액세스할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]:
호스팅 엔진 구성
새 Manager 가상 머신의 정규화된 도메인 이름을 제공합니다. 이 절차에서는 정규화된 도메인 이름 Manager.example.com 을 사용합니다. SMTP 서버의 이름 및 TCP 포트 번호, 이메일 알림을 보내는 데 사용되는 이메일 주소, 이러한 알림을 수신할 쉼표로 구분된 이메일 주소 목록을 제공합니다.중요엔진에 제공된 정규화된 도메인 이름(Manager.example.com)은 원래 Manager가 처음 설정된 경우 제공되는 정규화된 도메인 이름과 동일해야 합니다.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]:
구성 프리뷰
진행하기 전에 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]:
새 관리자 가상 머신 생성
이 스크립트는 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
가상 머신 운영 체제 설치
Manager 가상 머신에 연결하고 Red Hat Enterprise Linux 7 운영 체제를 설치합니다.호스트 및 관리자 동기화
호스트로 돌아가서 옵션 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]:
관리자 설치
새 Manager 가상 머신에 연결하고 Red Hat 서브스크립션 관리에 등록한 다음 필요한 리포지토리를 활성화합니다. 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.설치된 모든 패키지의 최신 버전이 사용 중인지 확인하고ECDHE 패키지를 설치합니다.# yum update
참고커널 관련 패키지가 업데이트된 경우 시스템을 재부팅합니다.# yum install rhevm
6.2.2. 자체 호스트 엔진 관리자 복원
절차 6.5. 자체 호스트 엔진 관리자 복원
- 백업 파일을 새 Manager 가상 머신에 복사합니다. 이 예에서는 6.1절. “자체 호스팅 엔진 관리자 가상 머신 백업” 에서 파일이 복사된 네트워크 스토리지 서버에서 파일을 복사합니다. 이 예에서 Storage.example.com 은 스토리지 서버의 정규화된 도메인 이름으로, /backup/EngineBackupFiles 는 스토리지 서버의 백업 파일에 지정된 파일 경로이며 /backup/ 는 파일을 새 관리자에서 복사할 경로입니다.
# scp -p Storage.example.com:/backup/EngineBackupFiles /backup/
- 전체 백업을 복원하려면 engine-backup 도구를 사용합니다.
- 관리자만 복원하는 경우 다음을 실행합니다.
# engine-backup --mode=restore --file=file_name --log=log_file_name --provision-db --restore-permissions
- Manager 및 Data를 복원하는 경우 다음을 실행합니다.
# 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.
- 복원된 Manager 가상 머신을 구성합니다. 이 프로세스는 기존 구성 설정 및 데이터베이스 콘텐츠를 식별합니다. 설정을 확인합니다. 완료되면 설정이 SSH 지문과 내부 인증 기관 해시를 제공합니다.
# 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]:
복원된 환경에서 호스트 제거
복원된 셀프 호스트 엔진 배포가 백업 엔진에 없는 고유한 이름이 있는 새 하드웨어에 있는 경우 이 단계를 건너뜁니다. 이 단계는 장애 조치 호스트hosted_engine_1
에서 발생하는 배포에만 적용됩니다. 이 호스트는 백업이 생성될 때 환경에 존재했기 때문에 복원된 엔진에 존재하고 최종 동기화가 수행되기 전에 환경에서 먼저 제거해야 합니다.- 관리 포털에 로그인합니다.
- 호스트 탭을 클릭합니다. 장애 조치 호스트인
hosted_engine_1
은 백업 준비 방법이므로 유지 관리 모드에 있으며 가상 로드가 없습니다. - 제거를 클릭합니다.
- 확인을 클릭합니다.
참고제거하려는 호스트가 작동하지 않게 되면 6.2.4절. “복원된 자체 호스팅 엔진 환경에서 작동하지 않는 호스트 제거” 에서 호스트를 강제로 제거하는 방법에 대한 지침을 참조하십시오.호스트 및 관리자 동기화
호스트로 돌아가서 옵션 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
은 비작동 상태를 입력하기 전에 Installing and Initializing 상태를 사용하여 관리 포털에 표시됩니다. 호스트는 결국 시간이 초과될 때까지 VDSM 호스트가 작동할 때까지 계속 기다립니다. 이는 환경의 또 다른 호스트에서SPM(Storage Pool Manager) 역할을 유지 관리하고hosted_engine_1
이 스토리지 도메인과 상호 작용할 수 없기 때문에 seccomp 호스트가 무응답 상태에 있기 때문입니다. 이 프로세스가 시간 초과되면 배포를 완료하기 위해 가상 머신을 종료하라는 메시지가 표시됩니다. 배포가 완료되면 호스트를 수동으로 유지 관리 모드로 배치하고 관리 포털을 통해 활성화할 수 있습니다.[ 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.
- 새 Manager 가상 머신을 종료합니다.
# shutdown -h now
- 호스트로 돌아가 Manager 가상 시스템이 다운된 것을 탐지했는지 확인합니다.
[ INFO ] Enabling and starting HA services Hosted Engine successfully set up [ INFO ] Stage: Clean up [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination
- 호스트를 활성화합니다.
- 관리 포털에 로그인합니다.
- 호스트 탭을 클릭합니다.
hosted_engine_1
을 선택하고 Maintenance 버튼을 클릭합니다. 호스트는 유지 관리 모드로 전환되기까지 몇 분이 걸릴 수 있습니다.- 활성화 버튼을 클릭합니다.
활성 상태가 되면hosted_engine_1
이 즉시 설정되고 스토리지 도메인과 데이터 센터가 활성화됩니다. - Non Responsive 호스트를 수동으로 펜싱하여 가상 머신을 활성 호스트로 마이그레이션합니다. 관리 포털에서 호스트를 마우스 오른쪽 버튼으로 클릭하고 '호스트 확인'을 선택합니다.백업 시 해당 호스트에서 실행 중인 가상 머신은 해당 호스트에서 제거되고 알 수 없는 상태에서 Down 상태로 이동합니다. 이제 이러한 가상 머신을
hosted_engine_1
에서 실행할 수 있습니다. 이제 REST API를 사용하여 펜싱된 호스트를 강제로 제거할 수 있습니다.
hosted_engine_1
이 활성 상태이고 복원된 환경에서 가상 머신을 실행할 수 있는 시점으로 복원되었습니다. 비작동 상태의 나머지 자체 호스팅 엔진 노드는 이제 6.2.4절. “복원된 자체 호스팅 엔진 환경에서 작동하지 않는 호스트 제거” 의 단계에 따라 7장. 자체 호스트 환경에 추가 호스트 설치 단계에 따라 환경에 다시 설치하여 제거할 수 있습니다.
6.2.3. 자체 호스트 엔진 관리자 수동 복원
절차 6.6. 자체 호스트 엔진 관리자 복원
- 백업의 데이터베이스 콘텐츠를 복원할 수 있는 빈 데이터베이스를 수동으로 생성합니다. 데이터베이스를 호스팅할 시스템에서 다음 단계를 수행해야 합니다.
- 데이터베이스가 Manager 가상 머신이 아닌 시스템에서 호스팅되는 경우 postgresql-server 패키지를 설치합니다. 이 패키지가ECDHE 패키지에 포함되어 있으므로 Manager 가상 머신에서 데이터베이스를 호스팅할 때는 이 단계가 필요하지 않습니다.
# yum install postgresql-server
postgresql
데이터베이스를 초기화하고postgresql
서비스를 시작한 후 이 서비스가 부팅 시 시작되는지 확인합니다.# postgresql-setup initdb # systemctl start postgresql.service # systemctl enable postgresql.service
- postgresql 명령줄을 입력합니다.
# su postgres $ psql
engine
사용자를 생성합니다.postgres=# create role engine with login encrypted password 'password';
데이터도 복원하는 경우 관련 호스트에ovirt_engine_history
사용자를 생성합니다.postgres=# create role ovirt_engine_history with login encrypted password 'password';
- 새 데이터베이스를 생성합니다.
postgres=# create database database_name owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
데이터도 복원 중인 경우 관련 호스트에 데이터베이스를 생성합니다.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';
- postgresql 명령줄을 종료하고 postgres 사용자에서 로그아웃합니다.
postgres=# \q $ exit
- 다음과 같이
/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
postgresql
서비스를 다시 시작하십시오.# systemctl restart postgresql.service
- 백업 파일을 새 Manager 가상 머신에 복사합니다. 이 예에서는 6.1절. “자체 호스팅 엔진 관리자 가상 머신 백업” 에서 파일이 복사된 네트워크 스토리지 서버에서 파일을 복사합니다. 이 예에서 Storage.example.com 은 스토리지 서버의 정규화된 도메인 이름으로, /backup/EngineBackupFiles 는 스토리지 서버의 백업 파일에 지정된 파일 경로이며 /backup/ 는 파일을 새 관리자에서 복사할 경로입니다.
# scp -p Storage.example.com:/backup/EngineBackupFiles /backup/
--change-db-credentials
매개변수를 사용하여 전체 백업 또는 데이터베이스 전용 백업을 복원하여 새 데이터베이스의 인증 정보를 전달합니다. Manager에 로컬인 데이터베이스의 database_location 은localhost
입니다.참고다음 예제에서는 각 데이터베이스에--*password
옵션을 사용하고 암호를 지정하지 않고 각 데이터베이스에 대해 암호를 입력하라는 메시지가 표시됩니다. 이러한 옵션에 대한 암호는 명령 자체에서 제공할 수 있지만 암호가 쉘 내역에 저장되므로 권장되지 않습니다. 또는 대화형 프롬프트 없이--*passfile=
password_file 옵션을 사용하여 각 데이터베이스에 암호를 안전하게 전달하여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
전체 백업의 일부로 데이터도 복원되는 경우 추가 데이터베이스에 대한 수정된 자격 증명을 포함합니다.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
위의 예에서는 데이터ECDHE 데이터베이스의 백업을 복원합니다.
성공하면 다음 출력이 표시됩니다.You should now run engine-setup. Done.
- 복원된 Manager 가상 머신을 구성합니다. 이 프로세스는 기존 구성 설정 및 데이터베이스 콘텐츠를 식별합니다. 설정을 확인합니다. 완료되면 설정이 SSH 지문과 내부 인증 기관 해시를 제공합니다.
# 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]:
복원된 환경에서 호스트 제거
복원된 셀프 호스트 엔진 배포가 백업 엔진에 없는 고유한 이름이 있는 새 하드웨어에 있는 경우 이 단계를 건너뜁니다. 이 단계는 장애 조치 호스트hosted_engine_1
에서 발생하는 배포에만 적용됩니다. 이 호스트는 백업이 생성될 때 환경에 존재했기 때문에 복원된 엔진에 존재하고 최종 동기화가 수행되기 전에 환경에서 먼저 제거해야 합니다.- 관리 포털에 로그인합니다.
- 호스트 탭을 클릭합니다. 장애 조치 호스트인
hosted_engine_1
은 백업 준비 방법이므로 유지 관리 모드에 있으며 가상 로드가 없습니다. - 제거를 클릭합니다.
- 확인을 클릭합니다.
호스트 및 관리자 동기화
호스트로 돌아가서 옵션 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
은 비작동 상태를 입력하기 전에 Installing and Initializing 상태를 사용하여 관리 포털에 표시됩니다. 호스트는 결국 시간이 초과될 때까지 VDSM 호스트가 작동할 때까지 계속 기다립니다. 이는 환경의 또 다른 호스트에서SPM(Storage Pool Manager) 역할을 유지 관리하고hosted_engine_1
이 스토리지 도메인과 상호 작용할 수 없기 때문에 seccomp 호스트가 무응답 상태에 있기 때문입니다. 이 프로세스가 시간 초과되면 배포를 완료하기 위해 가상 머신을 종료하라는 메시지가 표시됩니다. 배포가 완료되면 호스트를 수동으로 유지 관리 모드로 배치하고 관리 포털을 통해 활성화할 수 있습니다.[ 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.
- 새 Manager 가상 머신을 종료합니다.
# shutdown -h now
- 호스트로 돌아가 Manager 가상 시스템이 다운된 것을 탐지했는지 확인합니다.
[ INFO ] Enabling and starting HA services Hosted Engine successfully set up [ INFO ] Stage: Clean up [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination
- 호스트를 활성화합니다.
- 관리 포털에 로그인합니다.
- 호스트 탭을 클릭합니다.
hosted_engine_1
을 선택하고 Maintenance 버튼을 클릭합니다. 호스트는 유지 관리 모드로 전환되기까지 몇 분이 걸릴 수 있습니다.- 활성화 버튼을 클릭합니다.
활성 상태가 되면hosted_engine_1
이 즉시 설정되고 스토리지 도메인과 데이터 센터가 활성화됩니다. - Non Responsive 호스트를 수동으로 펜싱하여 가상 머신을 활성 호스트로 마이그레이션합니다. 관리 포털에서 호스트를 마우스 오른쪽 버튼으로 클릭하고 '호스트 확인'을 선택합니다.백업 시 해당 호스트에서 실행 중인 가상 머신은 해당 호스트에서 제거되고 알 수 없는 상태에서 Down 상태로 이동합니다. 이제 이러한 가상 머신을
hosted_engine_1
에서 실행할 수 있습니다. 이제 REST API를 사용하여 펜싱된 호스트를 강제로 제거할 수 있습니다.
hosted_engine_1
이 활성 상태이고 복원된 환경에서 가상 머신을 실행할 수 있는 시점으로 복원되었습니다. 비작동 상태의 나머지 자체 호스팅 엔진 노드는 이제 6.2.4절. “복원된 자체 호스팅 엔진 환경에서 작동하지 않는 호스트 제거” 의 단계에 따라 7장. 자체 호스트 환경에 추가 호스트 설치 단계에 따라 환경에 다시 설치하여 제거할 수 있습니다.
6.2.4. 복원된 자체 호스팅 엔진 환경에서 작동하지 않는 호스트 제거
비작동 호스트 펜싱
관리 포털에서 호스트를 마우스 오른쪽 버튼으로 클릭하고 '호스트 확인'을 선택합니다.백업 시 해당 호스트에서 실행 중인 가상 머신은 해당 호스트에서 제거되고 알 수 없는 상태에서 Down 상태로 이동합니다. 이제 REST API를 사용하여 펜싱된 호스트를 강제로 제거할 수 있습니다.관리자 인증 기관 검색
Manager 가상 머신에 연결하고 명령줄을 사용하여 cURL 을 사용하여 다음 요청을 수행합니다.GET
요청을 사용하여 향후 모든 API 요청에 사용할 Manager 인증 기관(CA) 인증서를 검색합니다. 다음 예에서--output
옵션은 hosted-engine.ca 파일을 Manager CA 인증서의 출력으로 지정하는 데 사용됩니다.--insecure
옵션은 이 초기 요청에 인증서없이 초기 요청이 있음을 의미합니다.# curl --output hosted-engine.ca --insecure https://[Manager.example.com]/ca.crt
제거할 호스트의 GUID 검색
hosts 컬렉션에서GET
요청을 사용하여 호스트를 제거할 GUID(Global Unique Identifier)를 검색합니다. 다음 예제에는 Manager CA 인증서 파일이 포함되어 있으며, 명령이 실행되면 메시지가 표시되는 암호인admin@internal
사용자를 인증에 사용합니다.# curl --request GET --cacert hosted-engine.ca --user admin@internal https://[Manager.example.com]/api/hosts
이 요청은 환경에 있는 모든 호스트의 세부 정보를 반환합니다. host GUID는 호스트 이름과 연결된 16진수 문자열입니다. Red Hat Virtualization REST API에 대한 자세한 내용은 Red Hat Virtualization REST API 가이드를 참조하십시오.잘못된 호스트 제거
fenced 호스트의 GUID를 사용하여DELETE
요청을 사용하여 환경에서 호스트를 제거합니다. 이전에 사용한 옵션 외에도 이 예제에서는 헤더를 지정하여 요청이 XML(eXtensible Markup Language)을 사용하여 전송 및 반환되도록 지정하고강제
작업을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
이DELETE
요청은 적절한 GUID가 지정된 경우 자체 호스팅 엔진 환경에서 모든 펜싱된 호스트를 제거하는 데 사용할 수 있습니다.호스트에서 셀프 호스트 엔진 구성 제거
호스트가 자체 호스팅 엔진 환경에 다시 설치될 때 재구성할 수 있도록 호스트의 자체 호스트 엔진 구성을 제거합니다.호스트에 로그인하고 구성 파일을 제거합니다.# rm /etc/ovirt-hosted-engine/hosted-engine.conf
7장. 자체 호스트 환경에 추가 호스트 설치
사전 요구 사항
- RHEL 기반 셀프 호스트 엔진 환경의 경우 물리적 호스트에 새로 설치된 Red Hat Enterprise Linux 시스템을 준비하고 필요한 인타이틀먼트에 호스트를 구독해야 합니다. 서브스크립션에 대한 자세한 내용은 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.
- RHVH 기반 셀프 호스트 엔진 환경의 경우 물리적 호스트에 새로 설치된 Red Hat Virtualization Host 시스템을 준비해야 합니다. 설치 가이드의 Red Hat Virtualization Host 를 참조하십시오.
- 셀프 호스트 엔진 노드를 재사용하는 경우 기존 셀프 호스트 엔진 구성을 삭제합니다. 5.2절. “자체 호스트 엔진 환경에서 호스트 제거”을 참조하십시오.
절차 7.1. 추가 자체 호스팅 엔진 노드 추가
- 관리 포털에서 Hosts (호스트) 리소스 탭을 클릭합니다.
- 새로 생성을 클릭합니다.추가 호스트 설정에 대한 자세한 내용은 관리 가이드 의 새 호스트의 설정 및 제어 설명 및 호스트 편집 을 참조하십시오.
- 드롭다운 목록을 사용하여 새 호스트의 Data Center (데이터 센터) 및 Host Cluster 를 선택합니다.
- 새 호스트의 이름 및 주소를 입력합니다. 표준 SSH 포트인 포트 22는 SSH 포트 필드에 자동으로 채워집니다.
- Manager에서 호스트에 액세스하는 데 사용할 인증 방법을 선택합니다.
- root 사용자 암호를 입력하여 암호 인증을 사용합니다.
- 또는 SSH PublicKey 필드에 표시되는 키를 호스트의
/root/.ssh/authorized_keys
에 복사하여 공개 키 인증을 사용합니다.
- 선택적으로 호스트에 지원되는 전원 관리 카드가 있는 전원 관리를 구성합니다. 전원 관리 구성에 대한 자세한 내용은 관리 가이드에 설명된 호스트 전원 관리 설정을 참조하십시오.
- 호스팅된 엔진 하위 탭을 클릭합니다.
- Deploy( 배포 ) 라디오 버튼을 선택합니다.
- OK를 클릭합니다.
8장. 셀프 호스트 엔진 데이터베이스를 원격 서버 데이터베이스로 마이그레이션
engine-backup 을 사용하여 데이터베이스 백업을 생성하고 새 데이터베이스 서버에서 복원합니다. 이 절차에서는 새 데이터베이스 서버에 Red Hat Enterprise Linux 7이 설치되어 있고 적절한 서브스크립션이 구성되어 있다고 가정합니다. 설치 가이드 의 필수 인타이틀먼트 서브스크립션을 참조하십시오.
절차 8.1. 데이터베이스 마이그레이션
- 셀프 호스트 엔진 노드에 로그인하고 환경을
글로벌
유지 관리 모드로 배치합니다. 이렇게 하면 High Availability 에이전트를 비활성화하고 Manager 가상 머신이 절차 중 마이그레이션되지 않습니다.# hosted-engine --set-maintenance --mode=global
- Red Hat Virtualization Manager 시스템에 로그인하고
ovirt-engine
서비스를 중지하여 엔진 백업을 방해하지 않도록 합니다.# systemctl stop ovirt-engine.service
엔진
데이터베이스 백업을 생성합니다.# engine-backup --scope=files --scope=db --mode=backup --file=file_name --log=backup_log_name
- 백업 파일을 새 데이터베이스 서버에 복사합니다.
# scp /tmp/engine.dump root@new.database.server.com:/tmp
- 새 데이터베이스 서버에 로그인하고 engine-backup 을 설치합니다.
# yum install ovirt-engine-tools-backup
- 새 데이터베이스 서버에서 데이터베이스를 복원합니다. file_name 은 Manager에서 복사한 백업 파일입니다.
# engine-backup --mode=restore --scope=files --scope=db --file=file_name --log=restore_log_name --provision-db --no-restore-permissions
- 데이터베이스가 마이그레이션되었으므로
ovirt-engine
서비스를 시작합니다.# systemctl start ovirt-engine.service
- 셀프 호스트 엔진 노드에 로그인하고 유지 관리 모드를 끄고 고가용성 에이전트를 활성화합니다.
# hosted-engine --set-maintenance --mode=none