6.2. 创建一个新的自承载引擎环境作为恢复的环境
您可以在被备份环境中的硬件上恢复自承载引擎,但是必须使用故障转移(failover)主机。第 6.1 节 “备份自承载引擎 Manager 虚拟机” 中的故障转移主机(
Host 1
)使用默认的值作为主机名 - hosted_engine_1
,这个主机名也在这里使用。因为自承载引擎恢复的特性,在对所恢复的引擎进行最后的同步前,使用的故障转移主机需要被删除(这要求在进行备份时,主机上没有运行任何虚拟机)。另外,您也可以在被备份环境外的硬件上进行恢复。
重要
本过程假设您已经在一台物理主机上全新安装了 Red Hat Enterprise Linux 系统,并为主机订阅了所需的权利,而且安装了 ovirt-hosted-engine-setup 软件包。如需了解更多信息,请参阅 第 3.1 节 “订阅所需的权利” 和 第 3.2 节 “安装自承载引擎软件包”。
过程 6.2. 创建一个新的自承载环境作为恢复的环境
更新 DNS
更新 DNS,使 Red Hat Enterprise Virtualization 环境的完全限定域名与新 Manager 的 IP 地址相对应。在以下过程中,完全限定域名被设置为 Manager.example.com。引擎的完全限定域名需要和在设置被备份的原始引擎时使用的值相同。初始化引擎
在新安装的 Red Hat Enterprise Linux 主机上运行hosted-engine
脚本开始部署的过程。您可以在任何时候使用 CTRL+D 键终止部署的过程。hosted-engine --deploy
# hosted-engine --deploy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果需要通过网络运行hosted-engine
部署脚本,我们推荐使用screen
窗口管理程序。使用它可以在出现网络问题时保持当前运行的进程。如果还没有安装 screen,请先安装这个软件包。screen hosted-engine --deploy
# screen hosted-engine --deploy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 准备初始化
脚本开始会要求您确认在自承载引擎环境中作为虚拟机管理程序(hypervisor)的主机信息。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]:
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]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 配置存储
选择使用的存储类型。During customization use CTRL-D to abort. Please specify the storage you would like to use (iscsi, nfs3, nfs4)[nfs3]:
During customization use CTRL-D to abort. Please specify the storage you would like to use (iscsi, nfs3, nfs4)[nfs3]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 选择环境中使用的存储域和存储数据中心名。- 对于 NFS 存储类型,使用 FQDN 或 IP 地址指定它的完整地址,以及共享存储域的路径名。
Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 对于 iSCSI,指定 iSCSI 门户 IP 地址、端口、用户名和密码,并从检测到的列表中选择一个目标名:
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]:
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]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
[ INFO ] Installing on first host Please provide storage domain name. [hosted_storage]: Local storage datacenter name is an internal name and currently will not be shown in engine's admin UI.Please enter local datacenter name [hosted_datacenter]:
[ INFO ] Installing on first host Please provide storage domain name. [hosted_storage]: Local storage datacenter name is an internal name and currently will not be shown in engine's admin UI.Please enter local datacenter name [hosted_datacenter]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 配置网络
这个脚本会检索可以作为环境的管理网桥的网卡(NIC),然后检查防火墙的配置,并根据控制台(SPICE 或 VNC)访问 Manager 虚拟机的需要来修改防火墙的配置。另外,它还需要一个可以被 ping 到的网关 IP 地址,ovirt-ha-agent
会使用它来决定主机是否适合运行 Manager 虚拟机。Please indicate a nic to set rhevm 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]:
Please indicate a nic to set rhevm 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]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 配置新的 Manager 虚拟机
这个脚本会创建一个新的 Manager 虚拟机。根据具体情况指定引导设备、安装媒体的路径名、镜像别名、CPU 类型、虚拟 CPU 的数量以及磁盘的大小。为 Manager 虚拟机指定一个 MAC 地址,或使用系统自动创建的地址。在为 Manager 虚拟机安装操作系统前,这个 MAC 地址可以被用来更新 DHCP 服务器。为所创建的 Manager 虚拟机指定内存的大小和控制台连接类型。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 指定主机的名称
为主机提供一个唯一的名称,避免与从备份中恢复的名称冲突。hosted_engine_1
这个名称可以在此使用,因为在进行备份前,这个主机已被设置为维护模式,它会在恢复引擎操作和在主机与引擎进行最后的同步操作间被删除。Enter the name which will be used to identify this host inside the Administration Portal [hosted_engine_1]:
Enter the name which will be used to identify this host inside the Administration Portal [hosted_engine_1]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 配置引擎
为自承载环境指定一个名称,为访问管理门户的admin@internal
用户设定一个密码。提供新的 Manager 虚拟机的完全限定域名。在这里使用 Manager.example.com 作为完全限定域名。指定 SMTP 服务器的名称、TCP 端口号、发送通知电子邮件的电邮地址、接收通知的一组电邮地址(以逗号分隔)。重要
为引擎提供的完全限定域名(Manager.example.com)必须和初始设置原始 Manager 时提供的完全限定域名相同。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 配置预览
在实际进行配置前,hosted-engine
脚本会显示您已输入的信息,并提示您确认这些信息。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 创建新的 Manager 虚拟机
这个脚本创建的虚拟机会被配置为 Manager 虚拟机,并提供和它进行连接的详情信息。在hosted-engine
脚本可以继续配置引擎前,您需要在这个虚拟机上安装一个操作系统 。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用以下命令通过 VNC 连接到虚拟机:/usr/bin/remote-viewer vnc://hosted_engine_1.example.com:5900
/usr/bin/remote-viewer vnc://hosted_engine_1.example.com:5900
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 安装虚拟机操作系统
连接到 Manager 虚拟机,安装 Red Hat Enterprise Linux 6.5、6.6 或 6.7 操作系统。把主机和 Manager 进行同步
返回到主机,选择选项 1 来继续hosted-engine
脚本:(1) Continue setup - VM installation is complete
(1) Continue setup - VM installation is complete
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow 安装 Manager
连接到新的 Manager 虚拟机,确认所有安装的软件包都是最新版本,安装 rhevm 软件包。yum update
# yum update
Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum install rhevm
# yum install rhevm
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 安装 Reports 和 Data Warehouse
如果您同时需要恢复 Reports 和 Data Warehouse,则需要安装 rhevm-reports-setup 和 rhevm-dwh-setup 软件包。yum install rhevm-reports-setup rhevm-dwh-setup
# yum install rhevm-reports-setup rhevm-dwh-setup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
在软件包安装完成后,您就可以继续自承载引擎 Manager 的恢复过程。