一、安装并登录迁移管理系统
1、 部署环境要求
- 操作系统:需要安装CentOS 7.9 64位操作系统(如果没有也可以安装CenOS 7系列 64位的操作系统);
- CPU:不低于4核;
- 内存:不低于8GB;
- 硬盘:系统盘不低于50GB;
- 开放端口
9090(web管理端口);
16010(迁移管理端口);
16012(目标端数据迁移端口)。
2、 安装步骤
- 语言英文,时区上海(检查日期时间)
- Language Support添加中文
- 硬盘无特殊要求,建议安装在单独一块硬盘上
- 软件选择Development and Creative Workstation,Add-on中选择如下工具:
**Additional Development**
**Compatibility Libraries**
**Development Tools**
**File and Storage Server**
**KDE**
**Large Systems Performance**
**Legay X Window System Compatibility**
**Platform Development**
**Virtualization Hypervisor**
**System Administration Tools**
- 似乎需要添加一个test用户
3、 部署管理系统
- ssh连接服务器,上传管理系统安装包migrate_5.1.3.tar.gz到/home目录下
- 在/home/software中运行
ip a sh
查看IP(不确定为什么这么做) - 解压程序包,并运行安装脚本,安装完成后系统会重启
tar -xzvf migrate_5.1.3.tar.gz -C /home
./install-migrate.sh
4、迁移管理系统初始化
- 获取授权,进入/root/migration目录,运行get_sys_id脚本,获取ID号
[root@backup migration]# ./get_sys_id
Nic: ens192
The ID Number is: 1C-16-02-26-61 3E-21-F0-B7-E2 (查看到的ID号)
- 通过ID号向相关人员获取授权文件,将收到的授权文件,上传到/root/migration/目录下面
- 重启迁移管理系统,找到迁移系统的进程号,杀掉现有进程,然后执行mig_monitor.sh脚本重启
[root@backup migration]# ps -ef | grep mig_server
root 4056 1 0 11:24 ? 00:00:00 /root/migration/mig_server
root 8328 4292 0 13:47 pts/0 00:00:00 grep --color=auto mig_server
[root@backup migration]# kill -9 4056
[root@backup migration]# ./mig_monitor.sh
- 查看授权,进入/root/migration目录,执行server_tools-getlicense获取授权信息
[root@backup migration]# ./server_tools -getlicense
get the license info of migration sever.
command status:0
{
"Command": 9,
"LicenseCount": 100, (迁移授权客户端数量)
"MigCount": 22, (已使用迁移客户端数量)
"RemainDays": 23 (剩余可使用的天数)
}
5、 登录系统
-
登录迁移管理系统IP,端口号9090,默认用户admin,密码Cdp12345
-
操作系统界面
1是源端操作按钮; 2是创建、修改迁移任务按钮; 3是目标端操作按钮; 4是源端列表; 5是迁移进度; 6是目标端列表; 7是迁移日志列表。
-
右上角用户头像可以创建用户,下载图标可以下载客户端
二、 源端安装
- 迁移系统界面下载客户端,压缩包包含windows和linux双版本
要点
- 运行/usr/local/migagent下的cdpagent脚本用于配置
- init_start.sh agent_config.xml用于初始化
- 搜索并杀掉cdp进程,agent_start.sh用于重启
1、Windows版本
- Windows版本不再赘述,安装完成后运行软件输入迁移平台IP、用户名、密码即可,端口号默认16010,完成后可在迁移平台上看到源机
2、Linux版本
- Linux版本客户端需上传安装程序,用root用户安装,
rpm -ivh ./mig_agent-V5.1.3-4.x86_64.rpm
- 安装完成后,进入迁移目录/usr/local/migagent/执行配置脚本cdpagent
- 过程需要输入本机IP,迁移平台IP、端口、用户名密码
[root@localhost ~]# cd /usr/local/migagent/
[root@localhost migagent]# ./cdpagent
I/O warning : failed to load external entity "./agent_config.xml" (此信息可忽略)
Os name: CentOS Linux release 7.6.1810 (Core)
Sysname:Linux
nodename:localhost.localdomain
release:3.10.0-957.el7.x89_64
version:#1 SMP Thu Nov 8 23:39:32 UTC 2018
machine:x86_64
Please enter hose ip address:192.168.2.13 (输入本机IP地址)
Please enter manager address:192.168.2.79 (输入迁移管理系统IP地址)
Please enter manager port:16010 (输入默认端口16010)
Please enter username:admin (输入迁移管理系统账号)
Please enter password:******** (输入迁移管理系统密码)
Please enter password again:******** (再次输入迁移管理系统密码)
I/O warning : failed to load external entity "./agent_config.xml" (此信息可忽略)
It had finised configure this agent.
- 配置完成后重启系统或执行脚本,重配置cdp服务
[root@localhost migagent]# ./init_start.sh agent_config.xml
- 查找cdp进程号,杀掉进程并通过脚本重启
[root@localhost migagent]]# ps -ef | grep cdp
root 19839 1 0 22:27 ? 00:00:00 /usr/local/cdpagent/cdpservice
root 19886 10797 0 22:32 pts/0 00:00:00 grep --color=auto cdp
[root@localhost migagent]]# kill -9 19839
[root@localhost migagent]]# ./agent_start.sh
三、目标端安装配置
要点
- 关闭防火墙,查ip
- 运行/root/migration/target_agent脚本初始化
- 运行/root/migration/mig_target脚本开始
- 从迁移平台下载目标端启动镜像migration_live.iso,从镜像启动目标机
- 默认账户root,密码cdp12345
- 关闭防火墙
systemctl stop firewalld
- 查看网络地址
ip a sh
,如果没有DHCP,则手动配置网络地址 - 进入/root/migration/目录,执行target_agent脚本进行配置
- 需要输入本机IP,迁移平台IP、管理和数据端口、用户密码
[root@localhost migration]# cd /root/migration/
[root@localhost migration]# ./target_agent
Os name: CentOS Linux release 7.9.2009 (Core)
sysname:Linux
nodename:localhost
release:3.10.0-1160.76.1.el7.x86_64
version:#1 SMP Wed Aug 10 16:21:17 UTC 2022
machine:x86_64
Please enter host ip address:192.168.2.14 (输入本机IP地址)
Please enter manager address:192.168.2.79 (输入迁移管理系统IP地址)
Please enter manager port:16010 (输入迁移管理端口,默认16010)
Please enter data port:16012 (输入数据传输端口,默认16012)
Please enter username:admin (输入迁移管理系统账户,默认admin)
Please enter password:******** (输入迁移管理系统密码,默认Cdp12345)
Please enter password again:******** (再次输入迁移管理系统密码)
- 执行mig_target脚本启动目标端迁移程序
[root@localhost migration]#./mig_target
- 此时应该能在迁移平台发现目标机
四、迁移操作
- 点击创建迁移任务按钮,只会显示未迁移且在线的源端
- 选择源端和目标端
- 选择需要迁移的磁盘,磁盘只大不小
- 创建迁移后可以在日志列表里看见相关任务,显示百分之百则完成
- 验证迁移前需断开光驱连接,确认SCSI控制器类型为LogicSAS
- 增量迁移需要通过目标端引导工具使目标机再次进入迁移状态
- 迁移业务切换需要关闭源机或断开相应网络环境,再启动迁移后的环境