將內部部署 Linux 應用程式重新裝載至 Azure VmRehost an on-premises Linux application to Azure VMs

本文說明虛構公司 Contoso 如何使用 Azure 基礎結構即服務 (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 software. 如果您想要將它用於您自己的測試用途,您可以從 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 想要瞭解如何在 Azure 中使用以 Linux 為基礎的基礎結構,以完成幾個 Windows 應用程式遷移。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-EUS2) 。The 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 和適用于 MySQL 的 Azure 資料庫。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 遷移作業保持簡單,讓公司無法充分利用 適用于 MySQL 的 Azure 資料庫所提供的功能。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 遷移的 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 遷移:伺服器遷移工具來設定 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 存取 (AZURE RBAC) If you need more granular permissions, see Manage Site Recovery access with Azure role-based access control (Azure RBAC).
Azure 基礎結構Azure infrastructure 瞭解 Contoso 如何設定 Azure 基礎結構Learn how Contoso set up an Azure infrastructure.

深入瞭解 Azure 遷移的特定 必要條件 :伺服器遷移。Learn more about specific prerequisites for Azure Migrate: Server Migration.
內部部署伺服器On-premises servers 內部部署 vCenter 伺服器應執行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 遷移:伺服器遷移。Step 1: Prepare Azure for Azure Migrate: Server Migration. 將 Azure 遷移:伺服器遷移工具新增至 Azure 遷移專案。Add the Azure Migrate: Server Migration tool to the Azure Migrate project.
  • 步驟2:準備內部部署 VMware 以進行 Azure 遷移:伺服器遷移。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:使用 Azure 遷移來遷移 Vm:伺服器遷移。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 以進行 Azure 遷移:伺服器遷移工具Step 1: Prepare Azure for the Azure Migrate: Server Migration tool

以下是 Contoso 將 VM 移轉至 Azure 時,所需的 Azure 元件:Here are the Azure components Contoso needs to migrate the VMs to Azure:

  • 當 Azure Vm 在遷移期間建立時,將位於其中的虛擬網路。A virtual network in which Azure VMs will be located when they're created during migration.
  • Azure 遷移:伺服器遷移工具已布建。The Azure Migrate: Server Migration tool provisioned.

他們會設定這些元件,如下所示:They set up these components as follows:

  1. 設定網路。Set up a network. Contoso 已設定可用於 Azure 遷移的網路:公司部署 azure 基礎結構時的伺服器遷移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-EUS2) 。The application database VM (OSTICKETMYSQL) will migrate to the database subnet (PROD-DB-EUS2) in the production network.
  2. 布建 Azure 遷移:伺服器遷移工具。Provision the Azure Migrate: Server Migration tool. 網路和儲存體帳戶準備就緒之後,Contoso 現在會建立復原服務保存庫 (ContosoMigrationVault) ,並將它放在 ContosoFailoverRG 主要區域 () 的資源群組中 East US 2With 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 遷移伺服器遷移工具的螢幕擷取畫面

需要其他協助?Need more help?

瞭解如何 設定 Azure 遷移:伺服器遷移工具Learn about how to set up the Azure Migrate: Server Migration tool.

步驟2:準備內部部署 VMware 以進行 Azure 遷移:伺服器遷移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:

  • 若要透過網際網路存取 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?

瞭解如何 準備 vm 以進行遷移Learn about how to prepare VMs for migration.

步驟 3:複寫內部部署 VMStep 3: Replicate the on-premises VMs

Contoso 管理員必須先設定並啟用複寫,才能執行移轉至 Azure 的作業。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 遷移專案中,移至 [伺服器 > azure 遷移:伺服器遷移], 然後選取 [複寫]。In the Azure Migrate project, go to Servers > Azure Migrate: Server Migration, and select Replicate.

    顯示 [複寫] 選項的螢幕擷取畫面。

  2. [ 複寫 > 來源設定] 中,您的 > 電腦虛擬化了嗎? 請選取 [是,使用 VMware vSphere]In Replicate > Source settings > Are your machines virtualized?, select Yes, with VMware vSphere.

  3. 內部部署設備 中,選取您設定的 Azure 遷移設備名稱,然後選取 [確定]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 遷移評估匯入遷移設定] 中,選取 [ 是] 選項。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,然後選取您想要遷移的每個 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 Hybrid Benefit] 中:In Azure Hybrid Benefit:

    • 如果您不想套用 Azure Hybrid Benefit,請選取 [否]。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 遷移會根據 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.
    • 作業系統磁片: 為 VM 指定作業系統 (開機) 磁片。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 或 premium 受控磁片) 的磁片類型。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.

注意

您可以在複寫開始之前隨時更新複寫設定,以 管理 複寫 > 機器You 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 管理員會執行快速測試遷移,然後進行遷移以移動 Vm。Contoso admins run a quick test migration and then a migration to move the VMs.

執行測試移轉Run a test migration

  1. 在 [遷移目標 > 伺服器 > : Azure 遷移:伺服器遷移] 中,選取 [測試遷移的伺服器]。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. 機器名稱會具有尾碼 -TestThe 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 遷移專案中,移至 [伺服器 > azure 遷移:伺服器遷移],然後選取 [複寫 伺服器]。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 遷移會關閉內部部署 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 可以與 vm 進行通訊 OSTICKETMYSQLMake 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 遷移服務搭配管理 VM 來評定要進行遷移的 Vm。Contoso used the Azure Migrate service with management VM to assess the VMs for migration. 系統管理員應從 VMware ESXi server 移除遷移 VM 和 web Vm。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 安全性小組會審核 OSTICKETWEBOSTICKETMYSQL 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