RHEV2升级3.1解决方案

RHEV2.X升级到3.1解决方案

版本信息作者创作内容

Ver.20130410刘毅文档初稿

Ver.20130415关荣轩方案测试

Ver.20130506韩永忠内容修正、补充

目录

1.环境 (2)

2.安装环境确认 (4)

3.配置升级环境 (7)

4.重试从2.2到3.0升级迁移 (22)

5.RHEV2.2升级到3.0问题汇总 (23)

作者简介 (27)

1.环境

升级前:升级后:

操作系统:Windows2008R2操作系统:RHEL6.3

用户管理:windows AD域用户管理:windows AD域虚拟化版本:RHEV2.9虚拟化版本:RHEV3.1

系统结构图:

网络配置:

Hostname 系统结构图

对应名称

IP地址

RHEVM RHEV2.X eth0:1:192.168.0.150/24 RHM RHEV3.1eth0:1:192.168.0.160/24 H端Node1eth0:192.168.0.151/24 H端Node2eth0:192.168.0.152/24 Storage Storage FC网络

2.安装环境确认

顺序操作说明

1先升级rhev-m2.2.x 至少升级到2.2.5的版本,最好保障最新的rhev-m的版本;https://https://www.360docs.net/doc/b99693388.html,/knowledge/solutions/54356 Rhev2.1的证书与rhev3.0的不兼容。如果需要从rhev2.1升级,需要更新你的证书;

https://https://www.360docs.net/doc/b99693388.html,/knowledge/solutions/135653

2Upgrade VMs 在你更新升级至最新的2.2的版本后,如果你的任一虚拟机是windows7,而且在虚拟机中使用了virtio的驱动和guest tools,你需要先更新升级这些部件。如果在升级到rhev3.0之前你忘记了做这些,那么可能遇到问题,或者性能降低。(在之前测试中,从rhev2.2.9升级到rhev3.0.7,对应平台中虚拟机的virtio驱动在未更新的情况下能够继续识别,分为virtio网卡,virtio磁盘等,整个在线升级过程,虚拟机不受影响。)

3升级认证(可选)AD域

4网络需求需要保障rhev2.0与rhev3.0的网络互通,在升级过程中需要从3.0去访问2.0的环境

5时间同步如果允许,保障每台主机使用同一个NTP服务器,如果没有则手动调整时间,必须保障两台间的时间差小于5分钟,不然则迁移失败;

6远程访问SQL服务器需要在rhev2.2的系统上设置允许远程访问SQL Server。因为需要在线地从SQL数据库中复制数据库信息到

rhev3.0的在线Postgres数据库里面。SQL服务器的数据库信息不能通过一个SQL的数据库备份文件加载到Linux中。

7Active Directory

server

在迁移你的AD账户时,你必须做好RHEV-M与AD server

的正向与反向的DNS解析。在新的RHEV-M3.0系统中,

可以使用“rhevm-manage-domains”命令去指定你的AD

server

8获取迁移工具迁移工具存放在一个叫rhevm-migration-tool的RPM包里面

9重新运行迁移如果迁移在第一次运行失败,可以尝试重新运行。

顺序操作说明

10在使用迁移工具时一个Windows PowerShell Script:在Windows系统中,需要运行一个powershell的脚步叫做

rhevm-migration-windows.ps1去做准备迁移的进程。

一个Linux Python Script:在Linux系统中,一个Python 脚步叫做rhevm-migration,被用来在Linux机器上执行迁移进程。

3.配置升级环境

开始迁移:

安装RHEL for RHEV-M3.0system

1、安装RHEL6server以此来部署RHEV-M3.0

可选:配置与RHEV-M2.2一样的完全主机名(FQDN);在配置新的RHEV-M3.0管理端时,可以配置成不一样的主机名,为了方面之后的

迁移,注意在rhev3.0环境中,主机名必须在DNS中有解析。推荐使用

不同的主机名,以便区分新旧主机;本例中:

原主机名为https://www.360docs.net/doc/b99693388.html,

新的主机名为https://www.360docs.net/doc/b99693388.html,

运行yum upgrade和yum install rhevm,但暂时不要运rhevm-setup;

2、安装rhevm-migration-tool软件包:

#yum install rhevm-migration-tool

3、当rhevm-migration-tool安装完毕,从RHEV-M3.0系统里面的复制

/usr/share/rhevm-migration-tool/rhevm-migration-windows.zip文件到

RHEV-M2.2系统中的一个空文件夹里面(如:C:\migration)。

开始从Windows的RHEV-M2.2迁移:注意:在迁移过程前,做好新旧管理端的时间同步。

4、登陆到RHEV-M2.2系统,然后解压

/usr/share/rhevm-migration-tool/rhevm-migration-windows.zip文件。

rhevm-migration-windows.ps1命令是唯一需要执行的命令。

如果不能直接执行此脚本,那么可以在PowerShell里面运行。

5、如果以上没有完成,可以开启PowerShell去操作以至与可以去使用

RHEV-M powershell脚本库;

6、在PowerShell窗口,改变目录到未解压的脚步;

C:\>cd C:\migration

7、运行rhevm-migrate-windows.ps1脚步。脚本将会以交互式地方式来

获取某些信息。在其运行过程中,将需要连接SQL server的数据库,连接PowerShell API并且创建备份文件。这需要在你运行脚本前了解如下相关事情:

在执行这个脚本前,请确保RHEV-M2.0的管理端运行正常,若没启动,可以在服务管理窗口,启动RHEV-M的主服务,可以从Web访问,若

在运行此脚本时卡住,可以尝试关闭powershell再次运行。

这个脚本将会使你已存在的RHEV-M2.2系统处于不可操作的状态; 你的Hosts和VMs都将继续运行,但在由RHEV-M3.0系统正常接管前,你都无法操作管理虚拟化平台;

如果在RHEV-M3.0接管时出现问题,你可以回滚到RHEV-M2.2的系统环境,但需要人工手动重新启用相关服务(本文稍后描述);

从C:\migration目录运行脚本,按提示回答相关问题;

注意:需要从这里打开powershell再去执行脚本,不然会报错!

(上图中,包括需要得知的信息,本例中分别为:

MSSQL服务器,也就是旧管理端:rhevm---已有DNS解析;

数据库实例名:SQLEXPRESS----这个参数可以在Windows的服务管理窗口,查看SQL的主服务,在其属性中可以找到。大体是$符合的后面字符)MSSQL数据库的名字;

MSSQL数据库默认的用户名;

旧的RHEV-M管理端的用户;

旧RHEV-M管理端的AD域;

RHEV-M的安装目录;

RHEV-M的web目录;

迁移脚本的备份目录;

此脚本将会创建一个SQL Server数据库的备份文件,并且将其他一些重要的文件放到你所选的备份目录中(如C:\migration/backup)。这将会停止和关闭所有RHEV-M上所运行的服务。

8、复制RHEV-M2.2中的备份目录(C:\migration/backup)到RHEV-M

3.0中(比如:/tmp/migration/backup).

9、开启远程TCP访问SQL Server。这个程序将会锁定SQL Server的

TCP1443端口,并且打开防火墙对应的端口。如下将说明如何操作: 选择Start---->SQL Server Configuration Manager-Manager。SQL服务的配置管理器

启用SQL服务器的TCP\IP服务,通过选择扩展的SQL Server2005的网络配置,以选择SQLEXPRESS协议,右击TCP\IP,以启用该参数。

下图则为右击TCP\IP,选取属性。

选择IP Addresses tab在TCP\IP的属性窗口中更改相关配置:更改“Active”为Yes,包括IP栏目的IP5和IP6。在IPALL的栏目中,设置TCP动态端口为“0”,并且设置TCP端口为1433(SQL server的默认端口号)。如果其他服务使用了该端口,则更换成不同的端口号。

重新启动SQL Server。如下操作,选择Start---->Administrative Tools---->Services and选择SQL Server service实例。在服务上右击

鼠标,点选重启。

在防火墙打开SQL Server端口(1433为默认)。如下将说明如何去操作:

对于Windows Server2003,从控制平台打开Windows防火墙,在Exceptions tab中,点击Add Port and add the name(SQL Server)并

且port number(1433),接着点击OK。

对应Windows Server2008,打开服务管理窗口下的管理员工具,选择配置---Windows防火墙----inbound rules and select new rule,opens

TCP port1433。

继续从RHEV-M3.0Linux system迁移

10、可选:如果需要继续使用以前的RHEV-M的主机名在新的

RHEV-M3.0的系统上,那么需要现在更改你的DNS server,以指向新的RHEV-M3.0的系统的IP地址。

11、在RHEV-M3.0系统上,运行rhevm-setup命令,配置过程如同官

方手册那样,唯独有一个重要的不同的地方:

警告:当你运行rhevm-setup时,不要创建ISO domian。当你载入RHEV-M2.2的数据时,将会导致存储域(storage domains)的数字不匹配。

关于更详细的情况可参考bug报告:

https://https://www.360docs.net/doc/b99693388.html,/knowledge/solutions/150913

https://https://www.360docs.net/doc/b99693388.html,/show_bug.cgi?id=876105

12、配置RHEV-M3.0系统去绑定使用相同的AD服务器(或不同的AD,或新的IPA server),运行rhevm-manage-domains。在以下例子中,AD Server为https://www.360docs.net/doc/b99693388.html,,对应验证的用户为admin(当以下命令执行完成后,jbossas server将会自动重新启动)

注意:在运行下面的rhevm-migration迁移命令前,若直接跳过绑定AD 域,下面的命令是执行不了的。所以本案中,将新管理端服务器绑定原有的AD域。

#rhevm-manage-domains-action=add-domain=’https://www.360docs.net/doc/b99693388.html,’

-user=’rhevadmin’-interactive

Enter password:**********

13、重启应用服务

#service jbossas restart

14、验证AD或IPA配置的结果

#rhevm-manage-domains-action=validate

在之前测试时,使用validate验证是有问题的,但用-action=list却可以查看到已经绑定好。在随后迁移命令完成后,在web中没有看到绑定的AD域,但可以直接用3.0的安装默认帐户(admin)登录管理。

后面也再次测试时,validate验证可以正常显示通过的。不过之后再

3.0登录时只显示有internal域

15、停止应用服务

#service jbossas stop

16、在运行rhevm-migration命令之前,请确认之前的步骤中需要复制的文件(从RHEV-M2.2中到RHEV-M3.0Linux的本地文件夹(如,

/tmp/migration/backup)。你还需要相关信息关于RHEV-M2.2server:FQDN主机名;

SQL server密码;

还需要了解关于RHEV-M3.0server:

PostgerSQL数据库密码;

其余的配置可以3.0Linux使用其默认配置;

[root@rhm~]#rhevm-migration

The log of the migration process is available in

"/var/log/rhevm/rhevm-migration-2013_03_06_17_34_32.log".

Checking required packages...

Checking the installation of the application...

Checking that the application server is stopped...

Checking domains...

We need to know the location of the directory containing the files generated by the part of the process that you ran previously in the Windows machine.Please provide the directory below:

Windows files dir:/tmp/migration/backfile

We need to know the details needed to connect to the SQL Server database.Make sure that the database server is configured to

allow TCP connections and that your firewalls are not blocking the connections.Please confirm or change the details below:

SQL Server host:https://www.360docs.net/doc/b99693388.html,

SQL Server port[1433]:

(注意这里的sql的端口好,需要与Windows中对应,下如图:)

SQL Server database[rhevm_migration]:

SQL Server user[sa]:

SQL Server password[********]:

We need to know the details to connect to the PostgreSQL database.Make sure that the database is started and confirm or change the details below:

PostgreSQL host[localhost]:

PostgreSQL port[5432]:

PostgreSQL database[rhevm]:

PostgreSQL user[postgres]:

PostgreSQL password[********]:

Checking connection to the SQL Server database at host "https://www.360docs.net/doc/b99693388.html,"and port1433...

Checking the status of the PostgreSQL service...

Checking connection to the PostgreSQL database at host"localhost" and port5432...

Checking files copied from Windows...

Checking CA certificate...

Decrypting SSH key...

Loading hosts list...

Checking hosts...

Checking host"https://www.360docs.net/doc/b99693388.html,"...

We are ready to start the migration process.This process will

wipe all existing data including configuration settings,

certificates and database.Please confirm below that you want to proceed:

Are you sure you want to proceed?[no]:yes

Making a backup of the PostgreSQL database...

The backup of the PostgreSQL database is available in

"/var/log/rhevm/rhevm-migration-2013_03_06_17_36_42.sql". Removing old backup of the options table...

Generating context files for the ETL script...

Running the ETL script...

Upgrading the database...

Loading options...

Loading options...

Copying options that don't need translation...

Updating default cluster...

Copying sysprep files...

Decrypting admin@internal password...

Decrypting password for domain"https://www.360docs.net/doc/b99693388.html,"...

Replacing CA...

Encrypting admin@internal password...

Encrypting password for domain"https://www.360docs.net/doc/b99693388.html,"...

Checking the authentication method...

Migrating hosts...

Migrating host"https://www.360docs.net/doc/b99693388.html,"...

The migration process finished successfully.

You can now start the application server(running"service jbossas start")and then connect to the administration tool to check that

all your Data Centers,Clusters,Hosts,Virtual Machines, Templates,etc,have been correctly migrated.

The RHEV-H ISO images haven't been copied automatically,you will

need to transfer them manually from the Windows machine to the

"/usr/share/rhev-hypervisor"directory in the Linux machine. Remember that if something has not been migrated correctly you can rollback to your previous installation stoping the application

server(running"service jbossas stop")and then restarting the services in the Windows machine.

[root@rhm~]#

17、如果程序成功的完成,你便可以开启应用服务

#service jbossas start

18、从IE浏览器便可以访问RHEV-M的管理平台,这里面包含着同样的数据中心,主机,集群,虚拟机,模板等。但现在在新的RHEV-M管理平台上不要做任何的更改,直到你验证了它能正常稳定工作才能做更改的操作。

19、验证新的RHEV-M管理平台,运行“validation”脚本,它包含在新的管理端系统的一个zip文件中。在此例中,新的RHEV-M管理端的IP地址为“192.168.1.1”,管理者用户为“rhevm@https://www.360docs.net/doc/b99693388.html,”,密码为T0pSecreT,备份目录为“myBackup_dir_rhev2.2”:

如上图,确保rhev2.2的备份目录(/tmp/migration/backup)权限为755,-i为新rhev3.0服务器IP地址,

-u为可验证的管理员帐号,

-p对应管理员的密码,

-v为rhev2.2备份目录,本例中为(/tmp/migration/backup)依据实际情况变更

这个脚本将会从备份目录中的“results.ini”文件读取相关的一些条目信息(例如数据中心的数量,集群的数量,主机的数量等等)并且也会检查所使用的REST API的情况。如果所有执行显示的都正常,那么你可以开始在新的RHEV3.0的管理平台上操作管理了。

重要:直至当前,如果你还未在RHEV的配置中做任何改变,那么你还是可以回滚到以前的RHEV-M2.2的系统平台,然后再次查找解决相关问题。

20、如果你的新RHEV-M3.0可以正常工作,那么你可以解除你的RHEV-M2.2Windows系统。如前面所提到的,在当前你可以做:

查找相关问题,这些问题可能会发生,出现在新的RHEV-M3.0的环境中;

继续使用RHEV2.2的组件(主机,存储,虚拟机,认证方式)在混合模式下与你的新的RHEV-M管理端在3.0的版本模式。

升级你的RHEV2.2的组件以至于与RHEV3.0兼容。

相关文档
最新文档