0% found this document useful (0 votes)
34 views51 pages

Lab 04

Azure migration lab 4

Uploaded by

rahulbkhadase
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views51 pages

Lab 04

Azure migration lab 4

Uploaded by

rahulbkhadase
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Lab 04 - Migrating the VMs from on-premises environment to Azure

Objective

In this Lab we would migrate on-premises VMs using the Azure Migrate
Tool and the assessment data in an Azure Migration Project, we will
Register the Azure Migrate Appliance for Replication and then configure
the static IP for the replicated VM, and finally migrate the VMs to Azure in
the respective Resource group.

Task 0 – Start the On-premises Environment VM

1. On your Lab VM open a browser and navigate


to [Link] login using the Office 365 Tenant
Credential from the Home/Resources tab of the Lab interface.

2. Select Resource group on home page.


3. Select SmartHotelHostRG and then select SmartHotelHost VM.

4. Select SmartHotelHost VM.

5. Click on the Start button to turn on the VM as it is expected to be


off from the previous Lab.
Task 1: Create a Storage Account

In this task you will create a new Azure Storage Account that will be
used by Azure Migrate: Server Migration for storage of your virtual
machine data during migration.

Note: This lab focuses on the technical tools required for workload
migration. In a real-world scenario, more consideration should go into the
long-term plan prior to migrating assets. The landing zone required to host
VMs should also include considerations for network traffic, access control,
resource organization, and governance. For example, the CAF Migration
Blueprint and CAF Foundation Blueprint can be used to deploy a pre-
defined landing zone, and demonstrate the potential of an Infrastructure
as Code (IaC) approach to infrastructure resource management.

1. Switch back to Azure Portal tab or open new tab and navigate
to [Link] and sign in with your office 365 tenant
credentials. In the Azure portal's left navigation, select + Create a
resource.

2. Search for and select Storage account, followed by Create.


3. In the Create storage account blade, on the Basics tab, use the
following values:

o Subscription: Azure Pass - Sponsorship.

o Resource group: AzureMigrateRG


o Storage account
name: migstrgXXXXXX [substitute XXXXXX with random
number]

o Location: West US.

o Performance: Standard

o Redundancy: Locally-redundant storage (LRS)

4. Select the Data protection tab and uncheck the Enable soft delete
blobs and then select Review button, then select Create.
You have completed this task. Do not close this tab to proceed ahead with
the next task.

Task summary

In this task you created a new Azure Storage Account that will be used by
Azure Migrate: Server Migration.

Task 2: Create a Private Endpoint

In this task you will create an endpoint on the provided virtual network
that will be used by the SQL Server resource.

You will also configure a private endpoint in this network to allow private,
secure access to the SQL Database.

Note: Azure provides several options for deploying the right network
configuration. After the lab, if you’d like to better understand your
networking options, see the network decision guide, which builds on the
Cloud Adoption Framework’s Azure landing zones.

1. Navigate to the SmartHotelRG resource group, and click on the


listed SQL server as shown in the below image.
2. Under Security, select Networking ->Private access, then
select + Create a Private endpoint.

3. On the Basics tab, enter the following configuration then


select Next: Resource:

o Resource group: SmartHotelRG

o Name: SmartHotel-DB-Endpoint

o Region: West US (Select the same location as the


SmartHotelVNet.)
4. On the Resource tab, enter the following configuration then
select Next: Virtual Network:

o Target sub-resource: sqlServer


5. On the Virtual Network tab, enter the following configuration then
select Next: DNS:

o Virtual network: SmartHotelVNet

o Subnet: SmartHotelDB ([Link]/25)

o Private IP configuration: Select Dynamically allocate IP


address

6. On the DNS tab, enter the following configuration then select Next:
Tags.

o Integrate with private DNS zone: Yes

o Subscription: Azure Pass - Sponsorship

o Resource group: SmartHotelRG


7. Select Review + create.

8. Select Create.
9. Wait for the deployment to complete.
10. Open the Private Endpoint blade, click on DNS
configuration and note that the FQDN for the endpoint is listed
as \[Link], with an internal IP
address [Link].

Note: Private DNS is used so that the database domain name, \


[Link] resolves to the internal private endpoint IP
address [Link] when resolved from the SmartHotelVNet, but
resolves to the Internet-facing IP address of the database server when
resolved from outside the VNet. This means the same connection string
(which contains the domain name) can be used in both cases.

Note: If the private endpoint connection fails to allow the IP address or


database domain name to connect to the database, it may be required to
create a new firewall rule to allow the IP address ranges of the database
and the private link.

You have completed this task. Do not close this tab to proceed ahead with
the next task.

Task summary

In this task you created a private endpoint on the virtual network that will
be used to access the SQL database.

Task 3: Create a Private Endpoint for storage account

In this task you will create an endpoint on the provided virtual network
that will be used by the Replication Storage Account. You will also
configure a private endpoint in this network to allow private, secure
access to the Replication Storage Account.
1. Navigate to the AzureMigrateRG resource group and click on the
listed Replication Storage Account migstrgXXXXXX as shown in
the below image.

2. Under Security, select Networking -> Private endpoint


connections, then select + Private endpoint.

3. On the Basics tab, enter the following configuration then


select Next: Resource:

o Resource group: AzureMigrateRG

o Name: Storage-Endpoint

o Region: West US
4. On the Resource tab, enter the following configuration then
select Next: Virtual Network:

o Target sub-resource: blob

5. On the Virtual Network tab, enter the following configuration then


select Next: DNS:

o Virtual network: smarthotelhostvnet

o Subnet: hostsubnet

o Private IP configuration: Select Dynamically allocate IP


address
6. On the DNS tab, enter the following configuration then select Next:
Tags.

o Integrate with private DNS zone: Yes

o Subscription: Azure Pass - Sponsorship

o Resource group: SmartHotelHostRG

7. Select Review + create.


8. Select Create.
9. Wait for the deployment to complete.
Task summary

In this task you created a private endpoint on the virtual network that will
be used to access the Replication Storage Account.

Task 4: Register the Hyper-V Host with Migration and modernization

In this task, you will register your Hyper-V host with the Azure Migrate:
Server Migration service. This service uses Azure Site Recovery as
the underlying migration engine. As part of the registration process, you
will deploy the Azure Site Recovery Provider on your Hyper-V host.

1. Return to the Azure Migrate blade in the Azure


Portal [Link]

2. Select Servers,databases and webapps under Migration


goals on the left. Under Migration tools, select Discover.

Note: You may need to add the migration tool yourself by following the
link below the Migration Tools section, selecting Azure Migrate:
Server Migration, then selecting Add tool(s).
3. In the Discover machines panel, For Where do you want to
migrate to? Choose Azure VM, under Are your machines
virtualized, select Yes, with Hyper-V. Under Target
region enter West US (the same region as used for your
Azure SQL Database which can be found in the Azure portal) and
check the confirmation checkbox. Select Create resources to
begin the deployment of the Azure Site Recovery resource used by
Azure Migrate: Server Migration for Hyper-V migrations. I
4. Once deployment is complete, the 'Discover machines' panel
should be updated with additional instructions.

5. Copy the Download link for the Hyper-V replication provider


software installer to your clipboard.
6. Open the SmartHotelHost remote desktop window,
launch Chrome from the desktop shortcut, and paste the link into a
new browser tab to download the Azure Site Recovery provider
installer.
7. Return to the Discover machines page in your browser (outside
the SmartHotelHost remote desktop session). Select the
blue Download button and download the registration key file.
8. Open the file location in Windows Explorer, and copy the file to your
clipboard. Return to the SmartHotelHost remote desktop session
and paste the file to the desktop.

9. Still within the SmartHotelHost remote desktop session, open


the [Link] installer you downloaded a
moment ago.

10. On the Microsoft Update tab, select Off and select Next.
11. Accept the default installation location and click Install.

12. Select Register .


13. Browse to the location of the key file you downloaded. When
the key is loaded select Next.

14. Select Connect directly to Azure Site Recovery without a


proxy server and select Next. The registration of the Hyper-V
host with Azure Site Recovery will begin.
15. Wait for registration to complete (this may take several
minutes). Then select Finish.

16. Minimize the SmartHotelHost remote desktop session and


return to the Azure Migrate browser window. Refresh your
browser, then re-open the Discover machines panel by
selecting Discover under Migration tools.
17. Select Yes, with Hyper-V for Are your machines
virtualized?. Click on the Finalize registration button, which
should now be enabled.

18. Azure Migrate will now complete the registration with the
Hyper-V host. Wait for the registration to complete. This may take
several minutes.
19. Once the registration is complete, close the Discover
machines panel.

20. The Migration and modernization panel should now show 5


discovered servers.
Task summary

In this task you registered your Hyper-V host with the Azure Migrate
Server Migration service.

Task 5: Enable Replication from Hyper-V to Azure Migrate

In this task, you will configure and enable the replication of your on-
premises virtual machines from Hyper-V to the Azure Migrate Server
Migration service.

1. Under Migration and modernization, select Replicate. This


opens the Replicate wizard

2. In the Specify intent tab enter the following configuration then


select Continue.
o What do you want to migrate: Servers or virtual
machines(VM)

o Where do you want to migrate to: Azure VM

o Are your machine virtualized? – Yes, with Hyper-V

3. On the Virtual machines tab, under Import migration settings


from an assessment, select Yes, apply migration settings
from an Azure Migrate assessment. Select the SmartHotel
VMs VM group and the SmartHotelAssessment migration
assessment.
4. The Virtual machines tab should now show the virtual machines
included in the assessment. Select
the UbuntuWAF, smarthotelweb1, and smarthotelweb2 virtual
machines, then select Next.

5. On the Target settings tab, select your subscription and the


existing SmartHotelRG resource group. Under Cache storage
account select the migstrgXXXXXX storage account and
under Virtual Network select SmartHotelVNet. Under Subnet
select SmartHotel. Select Next.
6. On the Compute tab, select the Standard_F2s_v2 VM size for
each virtual machine. Select the Windows operating system for
the smarthotelweb virtual machines and the Linux operating
system for the UbuntuWAF virtual machine. Select Next.
7. On the Disks tab, review the settings but do not make any changes.
Select Next

8. On the Tags tab click on Next, then on the on the Review +


Start replication tab, click on the Replicate button.

9. In the Migration tools blade, under Migration and


modernization, select the Overview button.
10. Confirm that the 3 machines are replicating.

11. Select Replication under Manage on the left.


Select Refresh occasionally and wait until all three machines have
a Protected status, which shows the initial replication is complete.
This will take several minutes.
Note: The replication of the Virtual machines, will take around 20-40
minutes to complete, please wait for the same.

You have completed the task. Do not close the window and proceed to the
next task.

Task summary

In this task you enabled replication from the Hyper-V host to Azure
Migrate, and configured the replicated VM size in Azure.

Task 6: Configure static internal IP addresses for each VM

In this task you will modify the settings for each replicated VM to use a
static private IP address that matches the on-premises IP addresses for
that machine.

1. Still using the Azure Migrate: Migration and modernization |


Replication blade, select the smarthotelweb1 virtual machine.
This opens a detailed migration and replication blade for this
machine. Take a moment to study this information.
2. Select Compute and Network under General on the left, then
select Edit.

3. Confirm that the VM is configured to use the F2s_v2 VM size


(or DS2_v2 or D2s_v3).
4. Under Network Interfaces, select InternalNATSwitch to open
the network interface settings.

5. Change the Private IP address to [Link]. Select OK to


close the network interface settings blade.
6. Save the smarthotelweb1 settings.

Note - Repeat these steps to configure the private IP address for the other
7. Still using the Azure Migrate: Migration and modernization |
Replication blade, select the smarthotelweb2 virtual machine.

8. Select Compute and Network under General on the left, then


select Edit.

9. Under Network Interfaces, select InternalNATSwitch to open


the network interface settings.
10. Change the Private IP address to [Link].
Select OK to close the network interface settings blade.

11. Save the smarthotelweb2 settings.


12. Using the Azure Migrate: Migration and modernization |
Replicating machines blade, select the UbuntuWAF virtual
machine. This opens a detailed migration and replication blade for
this machine

13. Select Compute and Network under General on the left,


then select Edit
14. Confirm that the VM is configured to use the F2s_v2 VM size
(or DS2_v2 or D2s_v3 if using an Azure Pass
subscription) .Under Network Interfaces,
select InternalNATSwitch to open the network interface settings.

15. Change the Private IP address to [Link].


Select OK to close the network interface settings blade.
16. Save the UbuntuWAF settings.

You have completed the task. Do not close the window and proceed to the
next task.

Task summary

In this task you modified the settings for each replicated VM to use a
static private IP address that matches the on-premises IP addresses for
that machine

Note: Azure Migrate makes a "best guess" at the VM settings, but you
have full control over the settings of migrated items. In this case, setting a
static private IP address ensures the virtual machines in Azure retain the
same IPs they had on-premises, which avoids having to reconfigure the
VMs during migration (for example, by editing [Link] files).

Task 7: Server migration

In this task you will perform a migration of the UbuntuWAF,


smarthotelweb1, and smarthotelweb2 machines to Azure.
Note: In a real-world scenario, you would perform a test migration before
the final migration. To save time, you will skip the test migration in this
lab. The test migration process is very similar to the final migration.

1. Return to the Azure Migrate: Servers, databases and web


apps blade using the link on the top, as shown in the image below.

2. Click on Overview under Migration tools section.

3. Under Step 3: Migrate, select Migrate.


4. On the Specify Intent page, ensure Azure VM is chosen, then click
on Continue

Note: You can optionally choose whether the on-premises virtual


machines should be automatically shut down before migration to minimize
data loss. Either setting will work for this lab.
5. On the Migrate blade, select the 3 virtual machines then
select Migrate to start the migration process.

6. The migration process will start.

7. To monitor progress, select Jobs under Manage on the left and


review the status of the three Planned failover jobs.
8. Wait until all three Planned failover jobs show
a Status of Successful. You should not need to refresh your
browser. This could take up to 15 minutes.

9. Navigate to the SmartHotelRG resource group and check that the


VM, network interface, and disk resources have been created for
each of the virtual machines being migrated.
Task summary

In this task you used Azure Migrate to create Azure VMs using the settings
you have configured, and the data replicated from the Hyper-V machines.
This migrated your on-premises VMs to Azure.

Summary

At the end of the Lab, we should have successfully replicated and then
Migrated the 3 VMs to the SmartHotelRG resource group.

 smarthotelweb1
 smarthotelweb2

 UbuntuWAF

We also need to Stop the Migrated VMs and the SmartHotelHost VM to


conserve the credit to ensure that the remaining labs can be completed.

We also need to Stop the Migrated VMs and the SmartHotelHost VM to


conserve the credit to ensure that the remaining labs can be completed.

You might also like