Gabes Virtual World 06月11日 22:55
Datacenter Migration with VEEAM Backup & Replication and PowerShell
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了使用VEEAM Backup & Replication和PowerShell脚本进行数据中心迁移的实践经验。为了减少客户停机时间,作者创建了针对每个虚拟机的复制作业,并使用PowerShell脚本自动化了准备和故障转移过程。通过预先同步虚拟机数据,并在迁移当天进行快速数据同步,可以大大缩短停机时间。文章还分享了脚本的使用方法和性能数据,证明了该方法在实际迁移中的高效性。

💡为了优化迁移效率,作者选择为每个虚拟机创建独立的复制作业,以充分利用基础设施资源。

📝 作者与同事共同编写了CreateReplicationJobs脚本,该脚本使用CSV文件作为输入,用于配置VLAN或PortGroup的映射关系,并定义需要迁移的虚拟机。

⏱️ 脚本设计考虑了预同步虚拟机数据,以减少需要同步的数据量。同时,为了防止VEEAM过载vCenter,脚本在每个作业之间添加了一分钟的时间间隔。

🚀 通过使用两台8 vCPU的VEEAM代理,作者能够在30分钟内完成70个同步作业,证明了该方法的高效性。这表明,即使只需要同步少量数据,代理的vCPU数量对整个流程的效率也有很大影响。

For new customers we often need to migrate their virtual machines from their datacenter into our datacenter. We use VEEAM Backup & Replication for this because it offers us the ability to pre-sync the VMs a few days before the migration and on the day of the migration it self, the last data sync is very short and therefore the downtime for the customer is often reduced to less then one hour. With big migrations of many VMs, it is sometimes a hassle to create all the replication jobs, especially if you keep in mind that there is one important note in the VEEAM documentation that says:

Limitations for Planned Failover. If you start planned failover for several VMs that are replicated with one replication job, these VMs will be processed one by one, not in parallel. Each planned failover task for each VM is processed as a separate replica job session. If a backup proxy is not available and the session has to wait for resources, job sessions for other VMs in the same task cannot be started before the current session is finished.

Because of this, I wanted to create a replication job per VM. This gives me the freedom to kick off the failover of multiple VMs for application batches as the customer defines them and make full use of all infrastructure resources (proxies, network bandwith) that are available.

CreateReplicationJobs

Together with my colleagues Annelies Maex and Joren De Spaey, I wrote the CreateReplicationJobs scripts to help in the preparations of the migration and a simple script to kick off the failover per VM. The CreateReplicationJobs.ps1 script needs two CSV files as input. The first one is the VLAN mapping or PortGroup mapping. The source VM is connected to a certain portgroup on the source site and in most cases it should be switched to a new portgroup when powered on at the target site. VLAN-vCenter01.csv contains a source to target mapping of these portgroups. The second file is the simple vmList-vCenter01.txt that contains all the VMs that should be migrated and will thus get a replication job.

Since VEEAM can use seeding of VMs, we usually have old VM backups transfered to our datacenter long before the migration, to limit the amount of data that needs to be synced. Therefore, this script assumes there is a replica VM on the target site that can be mapped to. We’ve also added an one minute time difference between each job, to prevent VEEAM from ‘blowing up’ your vCenter with too many tasks at once, although VEEAM usually handles this already very nicely.

Sync in 30 minutes

To give you an idea of how fast we’re running the jobs, I created two VEEAM proxies of each 8 vCPU on the source site and two on the target site and we could kick off and finish 70 sync jobs in 30minutes. Even though only a limited amount of data needed to be synced, the handling of the whole process per VM very much benefits from having many vCPUs in the proxies. The scan of the infrastructure, create snapshot, commit snapshot, apply delta’s etc, is often more time consuming then the datatransfer itself.

Please find the scripts on GitHub https://github.com/TheGabeMan/Veeam-Replication and follow the master branch, as I’m planning to add more stuff in the weeks to come.

A big thanks to Annelies Maex and Joren De Spaey for their help.

See full post at: Datacenter Migration with VEEAM Backup & Replication and PowerShell

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

VEEAM PowerShell 数据中心迁移 虚拟化
相关文章