您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

将本地 Linux 应用程序 Rehost 到 Azure VmRehost an on-premises Linux application to Azure VMs

本文介绍了虚构公司 Contoso 如何使用 Azure 基础结构即服务LAMP-based (IaaS) 虚拟机 (vm) 。This article shows how the fictional company Contoso rehosts a two-tier LAMP-based application by using Azure infrastructure as a service (IaaS) virtual machines (VMs).

本示例中使用的 osTicket 服务应用程序作为开放源代码提供。The service desk application used in this example, osTicket, is provided as open source. 如果要将其用于自己的测试目的,可以从 GitHub下载。If you want to use it for your own testing purposes, you can download it from GitHub.

业务驱动因素Business drivers

IT 领导团队与其业务合作伙伴密切协作,以了解合作伙伴希望在本次迁移中实现的目标:The IT leadership team has worked closely with business partners to understand what they want to achieve with this migration:

  • 解决业务增长。Address business growth. Contoso 在不断壮大,这给本地系统和基础结构造成了压力。Contoso is growing, and as a result there's pressure on the on-premises systems and infrastructure.
  • 限制风险。Limit risk. 服务台应用程序对于 Contoso 企业至关重要。The service desk application is critical for the Contoso business. Contoso 希望在不遭受任何风险的情况下将其迁移到 Azure。Contoso wants to move it to Azure with zero risk.
  • 扩展.Extend. Contoso 目前不想更改应用程序。Contoso doesn't want to change the application right now. 它需要确保应用程序是稳定的。It wants to ensure that the application is stable.

迁移目标Migration goals

Contoso 云团队已为此迁移固定目标,以确定最佳迁移方法:The Contoso cloud team has pinned down goals for this migration to determine the best migration method:

  • 迁移后,Azure 中的应用程序应具有与当今公司本地 VMware 环境相同的性能功能。After migration, the application in Azure should have the same performance capabilities as it does today in the company's on-premises VMware environment. 当应用程序在本地时,应用程序将在云中保持重要。The application will remain as critical in the cloud as it is on-premises.
  • Contoso 不希望投资此应用程序。Contoso doesn't want to invest in this application. 这对于业务是很重要的,但在其当前的窗体中,Contoso 只需将它安全地移到云中。It's important to the business, but in its current form Contoso simply wants to move it safely to the cloud.
  • Contoso 不希望更改此应用程序的 ops 模型。Contoso doesn't want to change the ops model for this application. 它想要与此应用程序在云中交互的方式与其现在相同。It wants to interact with the application in the cloud in the same way that it does now.
  • Contoso 不希望更改应用程序功能。Contoso doesn't want to change application functionality. 只有应用程序位置会发生更改。Only the application location will change.
  • Contoso 已经完成了几个 Windows 应用程序迁移,因此需要了解如何在 Azure 中使用基于 Linux 的基础结构。Having completed a couple of Windows application migrations, Contoso wants to learn how to use a Linux-based infrastructure in Azure.

解决方案设计Solution design

固定目标和需求后,Contoso 设计和审查部署解决方案并识别迁移过程。After pinning down goals and requirements, Contoso designs and reviews a deployment solution and identifies the migration process. Contoso 将用于迁移的 Azure 服务也被标识出来。The Azure services that Contoso will use for the migration also are identified.

当前应用程序Current application

  • OsTicket 应用程序跨两个 Vm 进行分层 (OSTICKETWEBOSTICKETMYSQL) 。The osTicket application is tiered across two VMs (OSTICKETWEB and OSTICKETMYSQL).
  • 这两个 VM 位于 VMware ESXi 主机 contosohost1.contoso.com(版本 6.5)上。The VMs are located on VMware ESXi host contosohost1.contoso.com (version 6.5).
  • VMware 环境由 vCenter Server 6.5 (vcenter.contoso.com) 管理,并在 VM 上运行。The VMware environment is managed by vCenter Server 6.5 (vcenter.contoso.com) and runs on a VM.
  • Contoso 有一个本地数据中心 (contoso-datacenter) 与本地域控制器 (contosodc1) 。Contoso has an on-premises datacenter (contoso-datacenter) with an on-premises domain controller (contosodc1).

建议的体系结构Proposed architecture

  • 由于应用程序是生产工作负荷,Azure 中的 Vm 将位于生产资源组中 ContosoRGBecause the application is a production workload, the VMs in Azure will reside in the production resource group ContosoRG.
  • Vm 将迁移到主要区域 (美国东部 2) 并放置在生产网络中 (VNET-PROD-EUS2) :The VMs will be migrated to the primary region (East US 2) and placed in the production network (VNET-PROD-EUS2):
    • Web VM 将驻留在前端子网 (PROD-FE-EUS2) 中。The web VM will reside in the front-end subnet (PROD-FE-EUS2).
    • 数据库 VM 将位于 () 的数据库子网中 PROD-DB-EUS2The database VM will reside in the database subnet (PROD-DB-EUS2).
  • 迁移完成后,Contoso 数据中心的本地 VM 将停止使用。The on-premises VMs in the Contoso datacenter will be decommissioned after the migration is done.

方案体系结构的关系图。

解决方案评审Solution review

Contoso 通过组合一系列的优点和缺点来评估建议的设计。Contoso evaluates the proposed design by putting together a list of pros and cons.

注意事项Consideration 详细信息Details
优点Pros 这两个应用程序 Vm 都将移动到 Azure,而不会发生更改,从而简化了迁移。Both the application VMs will be moved to Azure without changes, which makes the migration simple.

由于 Contoso 正在对这两个应用程序 Vm 使用双向方法,因此应用程序数据库不需要特殊的配置或迁移工具。Because Contoso is using a lift-and-shift approach for both application VMs, no special configuration or migration tools are needed for the application database.

Contoso 将保留对 Azure 中应用程序 Vm 的完全控制。Contoso will retain full control of the application VMs in Azure.

应用程序 Vm 正在运行 Ubuntu 16.04-TLS,即认可的 Linux 分发版。The application VMs are running Ubuntu 16.04-TLS, an endorsed Linux distribution. 详细了解 Azure 上的认可的 Linux 分发Learn more about endorsed Linux distributions on Azure.
缺点Cons 应用程序的 web 层和数据层仍是单点故障转移。The web and data tier of the application remain single points of failover.

Contoso 需要继续支持作为 Azure Vm 的应用程序,而不是迁移到托管服务,例如 Azure App Service 和 Azure Database for MySQL。Contoso will need to continue supporting the application as Azure VMs rather than moving to a managed service, such as Azure App Service and Azure Database for MySQL.

Contoso 认识到,通过直接迁移 VM 迁移使东西简单,公司并没有充分利用 Azure Database for MySQL提供的功能。Contoso realizes that by keeping things simple with a lift-and-shift VM migration, the company isn't taking full advantage of the features provided by Azure Database for MySQL. 这些功能包括内置的高可用性、可预测的性能、简单缩放、自动备份和内置安全性。These features include built-in high availability, predictable performance, simple scaling, automatic backups, and built-in security.

迁移过程Migration process

Contoso 将按如下方式完成迁移进程:Contoso will complete the migration process as follows:

  • 作为第一步,Contoso 为 Azure Migrate 准备和设置 Azure 组件:服务器迁移并准备本地 VMware 基础结构。As a first step, Contoso prepares and sets up Azure components for Azure Migrate: Server Migration and prepares the on-premises VMware infrastructure.
  • 公司已经有了 Azure 基础结构 ,因此它只需通过 Azure Migrate:服务器迁移工具来配置 vm 的复制。The company already has the Azure infrastructure in place, so it just needs to configure the replication of the VMs through the Azure Migrate: Server Migration tool.
  • 待一切准备就绪后,Contoso 可以开始复制 VM。With everything prepared, Contoso can start replicating the VMs.
  • 复制已启用并运行之后,Contoso 通过将 VM 故障转移到 Azure 来实现迁移。After replication is enabled and working, Contoso will migrate the VM by failing it over to Azure.

迁移过程的示意图。

Azure 服务Azure services

服务Service 说明Description 成本Cost
Azure Migrate:服务器迁移Azure Migrate: Server Migration 该服务协调和管理本地应用程序和工作负荷的迁移,以及 Amazon Web Services (AWS) 和 Google Cloud Platform () GCP VM 实例。The service orchestrates and manages migration of your on-premises applications and workloads as well as Amazon Web Services (AWS) and Google Cloud Platform (GCP) VM instances. 在复制到 Azure 的过程中,会产生 Azure 存储费用。During replication to Azure, Azure Storage charges are incurred. 迁移时,会创建 Azure Vm,并产生费用。Azure VMs are created, and incur charges, when migration occurs. 了解有关 费用和定价的详细信息。Learn more about charges and pricing.

先决条件Prerequisites

对于此方案,Contoso 需具备以下项。Here's what Contoso needs for this scenario.

要求Requirements 详细信息Details
Azure 订阅Azure subscription 在前面的系列文章中,Contoso 已创建订阅。Contoso created subscriptions in an earlier article in this series. 如果还没有 Azure 订阅,可以创建一个免费帐户If you don't have an Azure subscription, create a free account.

如果创建的是免费帐户,则你是自己的订阅的管理员,可以执行所有操作。If you create a free account, you're the administrator of your subscription and can perform all actions.

如果你使用现有的订阅,并且你不是管理员,请与管理员合作,为你分配所有者或参与者权限。If you use an existing subscription and you're not the administrator, work with the admin to assign you Owner or Contributor permissions.

如果需要更精细的权限,请参阅 使用基于角色的访问控制管理 Azure Site Recovery 访问 (RBAC) If you need more granular permissions, see Manage Azure Site Recovery access with role-based access control (RBAC).
Azure 基础结构Azure infrastructure 了解 Contoso 如何设置 Azure 基础结构Learn how Contoso set up an Azure infrastructure.

详细了解 Azure Migrate:服务器迁移的特定 先决条件Learn more about specific prerequisites for Azure Migrate: Server Migration.
本地服务器On-premises servers 本地 vCenter Server 应运行版本5.5、6.0 或6.5。The on-premises vCenter Server should be running version 5.5, 6.0, or 6.5.

运行5.5、6.0 或6.5 版本的 ESXi 主机。An ESXi host running version 5.5, 6.0, or 6.5.

ESXi 主机上运行的一个或多个 VMware VM。One or more VMware VMs running on the ESXi host.
本地 VMOn-premises VMs 查看认可要在 Azure 上运行的Linux 发行版Review Linux Distros that are endorsed to run on Azure.

方案步骤Scenario steps

下面是 Contoso 完成迁移的步骤:Here's how Contoso will complete the migration:

  • 步骤1:准备 Azure 以进行 Azure Migrate:服务器迁移。Step 1: Prepare Azure for Azure Migrate: Server Migration. 将 Azure Migrate: Server 迁移工具添加到 Azure Migrate 项目。Add the Azure Migrate: Server Migration tool to the Azure Migrate project.
  • 步骤2:准备 Azure Migrate 的本地 VMware:服务器迁移。Step 2: Prepare on-premises VMware for Azure Migrate: Server Migration. 为 VM 发现准备帐户,并准备在迁移后连接到 Azure Vm。Prepare accounts for VM discovery, and prepare to connect to Azure VMs after migration.
  • 步骤3:复制 Vm。Step 3: Replicate VMs. 设置复制,并开始将 Vm 复制到 Azure 存储。Set up replication, and start replicating VMs to Azure Storage.
  • 步骤4:迁移 Vm,并 Azure Migrate:服务器迁移。Step 4: Migrate the VMs with Azure Migrate: Server Migration. 运行测试迁移,确保一切正常运行,然后运行迁移,将 Vm 移到 Azure。Run a test migration to make sure everything's working, and then run a migration to move the VMs to Azure.

步骤1:为 Azure Migrate 准备 Azure:服务器迁移工具Step 1: Prepare Azure for the Azure Migrate: Server Migration tool

Contoso 需具备以下 Azure 组件才能将 VM 迁移到 Azure:Here are the Azure components Contoso needs to migrate the VMs to Azure:

  • 在迁移过程中创建 Azure Vm 时,Azure Vm 将位于其中的虚拟网络。A virtual network in which Azure VMs will be located when they're created during migration.
  • Azure Migrate:服务器迁移工具已预配。The Azure Migrate: Server Migration tool provisioned.

它们设置这些组件,如下所示:They set up these components as follows:

  1. 设置网络。Set up a network. Contoso 已设置网络,该网络可用于在公司部署 Azure 基础结构时进行 Azure Migrate:服务器迁移Contoso already set up a network that can be used for Azure Migrate: Server Migration when the company deployed the Azure infrastructure

    • SmartHotel360 应用程序是一个生产应用程序。The SmartHotel360 application is a production application. Vm 将迁移到主区域中的 Azure 生产网络 (VNET-PROD-EUS2) (East US 2) 。The VMs will be migrated to the Azure production network (VNET-PROD-EUS2) in the primary region (East US 2).
    • 这两个 Vm 都将放在 ContosoRG 用于生产资源的资源组中。Both VMs will be placed in the ContosoRG resource group, which is used for production resources.
    • 应用程序前端 VM (OSTICKETWEB) 会迁移到 PROD-FE-EUS2) (生产网络中的前端子网。The application front-end VM (OSTICKETWEB) will migrate to the front-end subnet (PROD-FE-EUS2) in the production network.
    • 应用程序数据库 VM (OSTICKETMYSQL) 会迁移到生产网络中 () 的数据库子网 PROD-DB-EUS2The application database VM (OSTICKETMYSQL) will migrate to the database subnet (PROD-DB-EUS2) in the production network.
  2. 预配 Azure Migrate:服务器迁移工具。Provision the Azure Migrate: Server Migration tool. 在设置了网络和存储帐户的情况下,Contoso 现在会创建恢复服务保管库 (ContosoMigrationVault) 并将其放在 ContosoFailoverRG 主要区域的资源组中 (East US 2) 。With the network and storage account in place, Contoso now creates a Recovery Services vault (ContosoMigrationVault) and places it in the ContosoFailoverRG resource group in the primary region (East US 2).

    显示 Azure Migrate Server 迁移工具的屏幕截图

需要更多帮助?Need more help?

了解如何 设置 Azure Migrate:服务器迁移工具Learn about how to set up the Azure Migrate: Server Migration tool.

步骤2:准备 Azure Migrate 的本地 VMware:服务器迁移Step 2: Prepare on-premises VMware for Azure Migrate: Server Migration

迁移到 Azure 后,Contoso 希望能够连接到 Azure 中的已复制 Vm。After migration to Azure, Contoso wants to be able to connect to the replicated VMs in Azure. Contoso 管理员需要执行几项操作:There are a couple of things that the Contoso admins need to do:

  • 为了通过 Internet 访问 Azure VM,需在迁移之前在本地 Linux VM 上启用 SSH。To access Azure VMs over the internet, they enable SSH on the on-premises Linux VM before migration. 对于 Ubuntu,可以使用以下命令完成此步骤: sudo apt-get ssh install -yFor Ubuntu, this step can be completed by using the following command: sudo apt-get ssh install -y.
  • 安装 Azure Linux 代理Install the Azure Linux agent
  • 运行迁移后,他们可以检查 启动诊断 以查看 VM 的屏幕截图。After they run the migration, they can check Boot diagnostics to view a screenshot of the VM.
  • 如果此操作不起作用,则需要检查 VM 是否正在运行,并查看这些 故障排除提示If it doesn't work, they'll need to check that the VM is running and review these troubleshooting tips.

需要更多帮助?Need more help?

了解如何准备要 迁移的 vmLearn about how to prepare VMs for migration.

步骤 3:复制本地 VMStep 3: Replicate the on-premises VMs

在迁移到 Azure 之前,Contoso 管理员需要设置并启用复制。Before Contoso admins can run a migration to Azure, they need to set up and enable replication.

完成发现后,开始将 VMware Vm 复制到 Azure。With discovery finished, begin replication of VMware VMs to Azure.

  1. 在 Azure Migrate 项目中转到 "服务器 > Azure Migrate:服务器迁移",然后选择 "复制"。In the Azure Migrate project, go to Servers > Azure Migrate: Server Migration, and select Replicate.

    显示复制选项的屏幕截图。

  2. 在 "复制 > 源设置" " > 虚拟机" 中,选择 "是",并 VMware vSphereIn Replicate > Source settings > Are your machines virtualized?, select Yes, with VMware vSphere.

  3. "本地设备" 中,选择设置的 Azure Migrate 设备的名称,然后选择 "确定"In On-premises appliance, select the name of the Azure Migrate appliance that you set up, and then select OK.

    显示 "源设置" 选项卡的屏幕截图。

  4. 在“虚拟机”中,选择要复制的计算机。In Virtual machines, select the machines you want to replicate.

    • 如果已针对 VM 运行评估,则可以应用评估结果中提供的 VM 大小和磁盘类型(高级/标准)建议。If you've run an assessment for the VMs, you can apply VM sizing and disk type (premium/standard) recommendations from the assessment results. 在 " 从 Azure Migrate 评估中导入迁移设置?" 中,选择 " 是" 选项。In Import migration settings from an Azure Migrate assessment?, select the Yes option.
    • 如果未运行评估,或者不想使用评估设置,请选择 " " 选项。If you didn't run an assessment, or you don't want to use the assessment settings, select the No option.
    • 如果选择使用评估,请选择 VM 组和评估名称。If you selected to use the assessment, select the VM group and assessment name.

    显示选择评估的屏幕截图。

  5. 在 " 虚拟机" 中,根据需要搜索 vm,并选择要迁移的每个虚拟机。In Virtual machines, search for VMs as needed, and select each VM you want to migrate. 然后选择 " 下一步:目标设置"。Then select Next: Target settings.

  6. 在 " 目标设置" 中,选择要迁移到的订阅和目标区域。In Target settings, select the subscription and target region to which you'll migrate. 指定迁移之后 Azure Vm 所在的资源组。Specify the resource group in which the Azure VMs will reside after migration. 在 " 虚拟网络" 中,选择 azure vm 在迁移后要连接到的 azure 虚拟网络/子网。In Virtual Network, select the Azure virtual network/subnet to which the Azure VMs will be joined after migration.

  7. 在“Azure 混合权益”中:In Azure Hybrid Benefit:

    • 如果你不想要应用 Azure 混合权益,请选择“否”。Select No if you don't want to apply Azure Hybrid Benefit. 然后,选择“下一步”。Then select Next.
    • 如果你有与活动的软件保障或 Windows Server 订阅涵盖的 Windows Server 计算机,并且你想要将权益应用于要迁移的计算机,请选择 "是"Select Yes if you have Windows Server machines that are covered with active Software Assurance or Windows Server subscriptions and you want to apply the benefit to the machines you're migrating. 然后,选择“下一步”。Then select Next.
  8. 在“计算”中,查看 VM 名称、大小、OS 磁盘类型和可用性集。In Compute, review the VM name, size, OS disk type, and availability set. VM 必须符合 Azure 要求VMs must conform with Azure requirements.

    • VM 大小: 如果使用的是评估建议,"VM 大小" 下拉列表将包含建议的大小。VM size: If you're using assessment recommendations, the VM size drop-down list will contain the recommended size. 否则,Azure Migrate 会根据 Azure 订阅中最接近的匹配项选择大小。Otherwise, Azure Migrate picks a size based on the closest match in the Azure subscription. 或者,请在“Azure VM 大小”中的手动选择一个大小。Alternatively, pick a manual size in Azure VM size.
    • OS 磁盘: 为 VM 指定 OS (boot) 磁盘。OS disk: Specify the OS (boot) disk for the VM. OS 磁盘是包含操作系统引导加载程序和安装程序的磁盘。The OS disk is the disk that has the operating system bootloader and installer.
    • 可用性集: 如果迁移后 VM 应在 Azure 可用性集中,请指定集。Availability set: If the VM should be in an Azure availability set after migration, specify the set. 该集必须位于为迁移指定的目标资源组中。The set must be in the target resource group you specify for the migration.
  9. 在 " 磁盘" 中,指定是否应将 VM 磁盘复制到 Azure。In Disks, specify whether the VM disks should be replicated to Azure. 选择 Azure 中) (标准 SSD/HDD 或高级托管磁盘。Select the disk type (standard SSD/HDD or premium-managed disks) in Azure. 然后,选择“下一步”。Then select Next.

    • 可以从复制中排除磁盘。You can exclude disks from replication.
    • 如果你排除磁盘,则在迁移后它们将不会出现在 Azure VM 中。If you exclude disks, they won't be present on the Azure VM after migration.
  10. 在 " 检查 + 开始复制" 中,查看设置。In Review + Start replication, review the settings. 然后选择 " 复制 ",为服务器启动初始复制。Then select Replicate to start the initial replication for the servers.

备注

管理 复制计算机之前,你可以随时更新复制设置 > Replicating machinesYou can update replication settings any time before replication starts in Manage > Replicating machines. 开始复制后无法更改设置。Settings can't be changed after replication starts.

步骤 4:迁移 VMStep 4: Migrate the VMs

Contoso 管理员先运行快速测试迁移,然后再进行迁移来移动虚拟机。Contoso admins run a quick test migration and then a migration to move the VMs.

运行测试迁移Run a test migration

  1. 在 "迁移目标 > 服务器 > Azure Migrate:服务器迁移 中,选择"测试迁移的服务器"。In Migration goals > Servers > Azure Migrate: Server Migration, select Test migrated servers.

    显示 "测试已迁移的服务器" 选项的屏幕截图。

  2. 选择并按住 (或右键单击) VM 进行测试。Select and hold (or right-click) the VM to test. 然后选择 " 测试迁移"。Then select Test migrate.

    显示测试迁移项的屏幕截图。

  3. 在“测试迁移”中,选择 Azure VM 在迁移后所在的 Azure 虚拟网络。In Test Migration, select the Azure virtual network in which the Azure VM will be located after the migration. 建议使用非生产虚拟网络。We recommend you use a nonproduction virtual network.

  4. “测试迁移”作业随即启动。The Test migration job starts. 在门户通知中监视该作业。Monitor the job in the portal notifications.

  5. 迁移完成后,在 Azure 门户上的“虚拟机”中查看已迁移的 Azure VM。After the migration finishes, view the migrated Azure VM in Virtual Machines in the Azure portal. 计算机名称带有 -Test 后缀。The machine name has a suffix -Test.

  6. 测试完成后,选择并按住 (或右键单击) Azure VM 复制计算机After the test is done, select and hold (or right-click) the Azure VM in Replicating machines. 然后选择 " 清理测试迁移"。Then select Clean up test migration.

    显示 "清理测试" 迁移项的屏幕截图。

迁移 VMMigrate the VMs

Contoso 管理员现在可以运行完整的迁移来完成移动。Now Contoso admins run a full migration to complete the move.

  1. 在 Azure Migrate 项目中转到 "服务器 > Azure Migrate:服务器迁移",然后选择 "复制服务器"。In the Azure Migrate project, go to Servers > Azure Migrate: Server Migration, and select Replicating servers.

    显示 "复制服务器" 选项的屏幕截图。

  2. 在 " 复制计算机" 中,选择并按住 (或右键单击 VM) 并选择 " 迁移"。In Replicating machines, select and hold (or right-click) the VM and select Migrate.

  3. 在“迁移” > “关闭虚拟机并执行计划迁移(不会丢失任何数据)”中,选择“是” > “确定”。 In Migrate > Shut down virtual machines and perform a planned migration with no data loss, select Yes > OK.

    • 默认情况下,Azure Migrate 关闭本地 VM 并运行按需复制,以便同步自上次复制发生以来发生的任何 VM 更改。By default, Azure Migrate shuts down the on-premises VM and runs an on-demand replication to synchronize any VM changes that occurred since the last replication occurred. 此操作可确保不会丢失数据。This action ensures no data loss.
    • 如果你不想要关闭 VM,请选择“否”。If you don't want to shut down the VM, select No.
  4. 随即会针对该 VM 启动一个迁移作业。A migration job starts for the VM. 在 Azure 通知中跟踪该作业。Track the job in Azure notifications.

  5. 该作业完成后,可以从“虚拟机”页查看和管理该 VM。After the job finishes, you can view and manage the VM from the Virtual Machines page.

将 VM 连接到数据库Connect the VM to the database

作为迁移过程的最后一步,Contoso 管理员将应用程序的连接字符串更新为指向 VM 上运行的应用程序数据库 OSTICKETMYSQLAs the final step in the migration process, Contoso admins update the connection string of the application to point to the application database running on the OSTICKETMYSQL VM.

  1. OSTICKETWEB使用 PuTTY 或其他 SSH 客户端建立到 VM 的 SSH 连接。Make an SSH connection to the OSTICKETWEB VM by using PuTTY or another SSH client. VM 是专用的,因此请使用专用 IP 地址进行连接。The VM is private, so connect by using the private IP address.

    显示 "连接到虚拟机" 窗格的屏幕截图。

    显示与数据库的连接的屏幕截图。

  2. 请确保 OSTICKETWEB vm 可以与 OSTICKETMYSQL vm 通信。Make sure that the OSTICKETWEB VM can communicate with the OSTICKETMYSQL VM. 目前,配置会硬编码为本地 IP 地址 172.16.0.43Currently, the configuration is hardcoded with the on-premises IP address 172.16.0.43.

    更新前:Before the update:

    显示更新之前的 IP 的屏幕截图。

    更新后:After the update:

    显示更新后的 IP 屏幕截图。

  3. 请重新启动包含 systemctl restart apache2 的服务。Restart the service with systemctl restart apache2.

    显示服务重新启动的屏幕截图。

  4. 最后, OSTICKETWEB OSTICKETMYSQL 在某个 Contoso 域控制器上更新和的 DNS 记录。Finally, update the DNS records for OSTICKETWEB and OSTICKETMYSQL on one of the Contoso domain controllers.

    显示更新 DNS 记录的屏幕截图。

    显示更新 DNS 记录的屏幕截图。

需要更多帮助?Need more help?

迁移后的清理Clean up after migration

完成迁移后,osTicket 应用程序层现在会在 Azure Vm 上运行。With migration complete, the osTicket application tiers are now running on Azure VMs.

现在,Contoso 需要执行以下任务:Now, Contoso needs to do the following tasks:

  • 从 vCenter 清单中删除本地 VM。Remove the on-premises VMs from the vCenter inventory.
  • 从本地备份作业中删除本地 VM。Remove the on-premises VMs from local backup jobs.
  • 更新内部文档以显示和的新位置和 IP 地址 OSTICKETWEB OSTICKETMYSQLUpdate the internal documentation to show the new location and IP addresses for OSTICKETWEB and OSTICKETMYSQL.
  • 查看与 Vm 交互的任何资源。Review any resources that interact with the VMs. 更新任何相关设置或文档以反映新配置。Update any relevant settings or documentation to reflect the new configuration.
  • Contoso 将 Azure Migrate 服务与管理 VM 一起使用,以评估要迁移的 Vm。Contoso used the Azure Migrate service with management VM to assess the VMs for migration. 管理员应将迁移 VM 和 web Vm 从 VMware ESXi 服务器中删除。Admins should remove the migration VM and web VMs from VMware ESXi server.

查看部署Review the deployment

在应用程序现已运行的情况下,Contoso 需要完全操作并保护其新基础结构。With the application now running, Contoso needs to fully operationalize and secure its new infrastructure.

安全性Security

Contoso 安全团队查看 OSTICKETWEB 和 OSTICKETMYSQL Vm,以确定任何安全问题。The Contoso security team reviews the OSTICKETWEB and OSTICKETMYSQL VMs to determine any security issues.

  • 团队需审查 VM 的网络安全组 (NSG),以控制访问。The team reviews the network security groups (NSGs) for the VMs to control access. NSG 用于确保仅允许到应用程序的流量可以通过。NSGs are used to ensure that only traffic allowed to the application can pass.
  • 此团队还会考虑使用 Azure 磁盘加密和 Azure Key Vault 来保护 VM 磁盘上的数据。The team also considers securing the data on the VM disks by using Azure Disk Encryption and Azure Key Vault.

有关详细信息,请参阅 Azure 中 IaaS 工作负荷的最佳安全方案For more information, see Security best practices for IaaS workloads in Azure.

业务连续性和灾难恢复Business continuity and disaster recovery

对于业务连续性和灾难恢复,Contoso 采取了以下措施:For business continuity and disaster recovery, Contoso takes the following actions:

许可和成本优化Licensing and cost optimization