加快 Microsoft 工作负载的发现和迁移到 AWS - AWS Prescriptive Guidance

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

加快 Microsoft 工作负载的发现和迁移到 AWS

Ali Alzand,Amazon Web Services

摘要

此模式向您展示如何使用迁移验证工具包 PowerShell 模块来发现您的 Microsoft 工作负载并将其迁移到 AWS。该模块的工作原理是,对与任何 Microsoft 工作负载关联的常见任务执行多项检查和验证。例如,该模块会检查可能连接了多个磁盘的实例或使用许多 IP 地址的实例。有关该模块可以执行的检查的完整列表,请参阅模块 GitHub 页面上的 “检查” 部分。

迁移验证工具包 PowerShell 模块可以帮助您的组织减少在发现 Microsoft 工作负载上正在运行哪些应用程序和服务时所花费的时间和精力。该模块还可以帮助您确定工作负载的配置,以便您可以了解 AWS 是否支持您的配置。该模块还提供后续步骤和缓解操作的建议,这样您就可以避免在迁移之前、期间或之后出现任何配置错误。

先决条件和限制

先决条件

  • 本地管理员帐户

  • PowerShell 4.0

限制

  • 仅适用于微软 Windows Server 2012 R2 或更高版本

工具

工具

  • PowerShell 4.0

代码存储库

此模式的迁移验证工具包 PowerShell 模块可在-microsoft GitHub migration-validator-toolkit-for- workdloads 存储库中找到。

操作说明

Task描述所需技能

下载、提取、导入和调用模块。

选择以下方法之一来下载和部署模块:

  • 运行 PowerShell 脚本

  • 下载并解压.zip 文件

  • 克隆 GitHub 存储库

运行 PowerShell 脚本

在中 PowerShell,运行以下示例代码:

#MigrationValidatorToolkit $uri = 'https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads/archive/refs/heads/main.zip' $destination = (Get-Location).Path if ((Test-Path -Path "$destination\MigrationValidatorToolkit.zip" -PathType Leaf) -or (Test-Path -Path "$destination\MigrationValidatorToolkit")) { write-host "File $destination\MigrationValidatorToolkit.zip or folder $destination\MigrationValidatorToolkit found, exiting" }else { Write-host "Enable TLS 1.2 for this PowerShell session only." [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $webClient = New-Object System.Net.WebClient Write-host "Downloading MigrationValidatorToolkit.zip" $webClient.DownloadFile($uri, "$destination\MigrationValidatorToolkit.zip") Write-host "MigrationValidatorToolkit.zip download successfully" Add-Type -Assembly "system.io.compression.filesystem" [System.IO.Compression.ZipFile]::ExtractToDirectory("$destination\MigrationValidatorToolkit.zip","$destination\MigrationValidatorToolkit") Write-host "Extracting MigrationValidatorToolkit.zip complete successfully" Import-Module "$destination\MigrationValidatorToolkit\migration-validator-toolkit-for-microsoft-workloads-main\MigrationValidatorToolkit.psm1"; Invoke-MigrationValidatorToolkit }

该代码从.zip 文件下载模块。然后,代码提取、导入和调用该模块。

下载并解压.zip 文件

  1. 下载 .zip 文件(下载)。

  2. 将 .zip 文件解压缩。

  3. 按照本指南的 “手动调用模块” 故事中的步骤进行操作。

克隆 GitHub 存储库

  1. 要克隆 GitHubmigration-validator-toolkit-for微软工作负载存储库,请在终端窗口中运行以下 Git 命令:

    git clone https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads.git
  2. 按照本指南的 “手动调用模块” 故事中的步骤进行操作。

系统管理员

手动调用模块。

  1. 转到存储已下载模块的目录。

  2. 要生成您选择的输出,请在中以管理员身份运行以下命令之一 PowerShell:

格式表格式:

Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit

格式列表格式:

Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit -List

输出GridView格式:

Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit -GridView

ConvertTo-csv 格式:

Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit -csv
系统管理员
Task描述所需技能

下载.zip 文件或克隆 GitHub 存储库。

请选择以下选项之一:

git clone https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads.git
系统管理员

更新 server.csv 列表。

如果您下载了.zip 文件,请按照以下步骤操作:

  1. 将 .zip 文件解压缩。

  2. 转到 MigrationValidatorToolkit\Inputs\ 目录。

  3. serverlist.csv使用目标计算机的主机名进行更新。

系统管理员

调用模块。

您可以使用域内任何使用对目标计算机具有管理员访问权限的域用户的计算机。

  1. 将源代码下载为.zip 文件并解压文件。

  2. 以 PowerShell管理员身份运行以下命令:

Import-Module .\MigrationValidatorToolkit.psm1;Invoke-DomainComputers

输出.csv 文件以MigrationValidatorToolkit\Outputs\folder前缀名称DomainComputers_MigrationAutomations_YYYY-MM-DDTHH-MM-SS保存。

系统管理员

故障排除

事务解决方案

MigrationValidatorToolkit将有关执行、命令和错误的信息写入正在运行的主机上的日志文件。

您可以在以下位置手动查看日志文件:

  1. 转到 MigrationValidatorToolkit\logs\ 目录。

  2. 找到日志文件。日志文件名的格式为:ComputerName_MigrationValidatorToolkit_YYYY-MM-SSTHH-MM-SS.log

相关资源

其他信息

常见问题

在哪里可以运行迁移验证工具包 PowerShell 模块?

你可以在微软 Windows Server 2012 R2 或更高版本上运行该模块。

我什么时候运行这个模块?

我们建议您在迁移过程的评估阶段运行该模块。

该模块会修改我现有的服务器吗?

不是。 此模块中的所有操作都是只读的。

运行该模块需要多长时间?

运行该模块通常需要 1-5 分钟,但这取决于服务器的资源分配。

该模块需要什么权限才能运行?

您必须使用本地管理员帐户运行该模块。

我可以在物理服务器上运行该模块吗?

是的,只要操作系统是微软 Windows Server 2012 R2 或更高版本即可。

如何为多台服务器大规模运行该模块?

要在多台加入域的计算机上大规模运行该模块,请按照本指南中 “在多个目标上运行迁移验证器工具包” PowerShell 模块中的步骤进行操作。对于未加入域的计算机,请使用远程调用或按照本指南中在单个目标长篇故事上运行迁移验证器工具包 PowerShell 模块中的步骤在本地运行该模块。