加速 Microsoft 工作负载的发现以及向 AWS 的迁移 - AWS 规范指引

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

加速 Microsoft 工作负载的发现以及向 AWS 的迁移

Ali Alzand,Amazon Web Services

Summary

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

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

先决条件和限制

先决条件

  • 本地管理员账户

  • PowerShell 4.0

限制

  • 仅可用于 Microsoft 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:

Format-Table 格式:

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

Format-List 格式:

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 文件以前缀名称 DomainComputers_MigrationAutomations_YYYY-MM-DDTHH-MM-SS 保存在 MigrationValidatorToolkit\Outputs\folder 中。

系统管理员

问题排查

问题解决方案

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

您可以通过以下方式之一手动查看日志文件。

  1. 转到 MigrationValidatorToolkit\logs\ 目录。

  2. 定位日志文件。日志文件名称的格式为:ComputerName_MigrationValidatorToolkit_YYYY-MM-SSTHH-MM-SS.log

相关资源

附加信息

常见问题

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

您可以在 Microsoft Windows Server 2012 R2 或更高版本上运行该模块。

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

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

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

否。此模块中的所有操作均为只读。

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

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

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

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

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

是的,只要操作系统是 Microsoft Windows Server 2012 R2 或更高版本就行。

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

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