附录 A. 手工安装 Manager 的操作系统
为了设置自承载环境中的 Manager 虚拟机,您可以选择手工安装 Manager 操作系统,或使用 RHEV-M Virtual Appliance 来简化安装的过程。以下介绍了手工安装的步骤。如需了解各种安装和配置 Manager 虚拟机方法间的不同,请参阅 附录 B, 不同 Manager 虚拟机设置流程的比较。
过程 A.1. 手工安装 Manager 的操作系统
配置虚拟机
hosted-engine
脚本会创建一个虚拟机,并把它配置为一个 Red Hat Enterprise Virtualization Manager(在这里被称为 HostedEngine-VM)。指定引导设备、安装媒体的路径名、CPU 类型、虚拟 CPU 的数量以及磁盘的大小。为 HostedEngine-VM 指定一个 MAC 地址,或使用系统自动创建的地址。在虚拟机安装操作系统前,可以使用这个 MAC 地址更新 DHCP 服务器。为 HostedEngine-VM 指定内存的大小,以及控制器连接类型。Please specify the device to boot the VM from (cdrom, disk, pxe) [cdrom]: 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]:
配置自承载引擎
指定在 Red Hat Enterprise Virtualization 环境中标识自承载引擎主机的名称,以及访问管理门户所使用的admin@internal
用户的密码。提供 HostedEngine-VM 的 FQDN(在这里我们使用 Manager.example.com 作为 FQDN)。最后,提供 SMTP 的名称和 TCP 端口号、发送事件通知的电子邮件地址、以及需要接收事件通知的用户的电子邮件地址列表(以逗号分隔)。Enter the name which will be used to identify this host inside the Administrator Portal [hosted_engine_1]: Host-HE1 Enter 'admin@internal' user password that will be used for accessing the Administrator Portal: Confirm 'admin@internal' user password: Please provide the FQDN for the engine you want to use. This needs to match the FQDN that you will use for the engine installation within the VM: 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 : rhevm 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 : 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]:
配置 HostedEngine-VM
这个脚本会创建虚拟机 HostedEngine-VM,并提供和它进行连接的详情信息。您需要在 HostedEngine-VM 上安装一个操作系统后才能继续在 Host-HE1 上执行hosted-engine
脚本。[ INFO ] Stage: Transaction setup ... [ INFO ] Creating VM You can now connect to the VM with the following command: /usr/bin/remote-viewer vnc://localhost:5900 Use temporary password "5379skAb" 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 协议连接到虚拟机。使用 Host-HE1 的 FQDN 或 IP 地址替换 FQDN。/usr/bin/remote-viewer vnc://FQDN:5900
安装虚拟机操作系统
连接到hosted-engine
脚本所创建的虚拟机(HostedEngine-VM),安装 Red Hat Enterprise Linux 6.7 操作系统。同步主机和虚拟机
返回到 Host-HE1,选择选项 1 来继续hosted-engine
脚本:(1) Continue setup - VM installation is complete
安装 Manager
连接到 HostedEngine-VM,订阅相关的 Red Hat Enterprise Virtualization Manager 仓库(repository)。详情请参阅 订阅所需的权利。确认所有安装的软件包都是最新版本,并安装了 rhevm 软件包。# yum update
# yum install rhevm
配置 HostedEngine-VM
在 HostedEngine-VM 上配置引擎。# 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]:
确定设置。完成后,系统会提供一个 SSH 指纹(fingerprint)和一个内部的证书授权哈希数据(Certificate Authority hash)。把主机和 Manager 进行同步
返回到 Host-HE1,选择选项 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... [ INFO ] The VDSM Host is now operational Please shutdown the VM allowing the system to launch it as a monitored service. The system will wait until the VM is down.
关闭 HostedEngine-VM
关闭 HostedEngine-VM。# shutdown -h now
设置确认
返回到 Host-HE1,确认它检测到 HostedEngine-VM 已经被关闭。[ INFO ] Enabling and starting HA services Hosted Engine successfully set up [ INFO ] Stage: Clean up [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination