T Techclick ← All lessons
Cloud · On-prem → Azure / AWS · Lesson 5 of 8

Move the VM: lift with a replica, or rebuild on purpose

Azure Migrate and AWS MGN copy disks and cut over. That is rehost. Rebuild when the OS is rotting or you actually want PaaS. Test the cutover for IP, DNS, and cert — separately. Changing all three the same night with no rollback is how payments die and nobody knows why.

Updated 2026-08-18·20 min read·L2 primary·Quiz at end

After this page you can

The ticket

OS on pay-api is still supportable. Junior wants to “use the move to upgrade to Ubuntu, change the hostname, issue a new cert, and point DNS at 10.41.1.40” in one change. That is three migrations wearing a rehost badge. The replica is fine. The plan is not.

Quick interview answer

Lift = Azure Migrate (agentless or agent-based) or AWS Application Migration Service (MGN) continuous block replication, test instance, then cutover. Rebuild when the OS is out of support, the image is unclean, or the target is PaaS (App Service, ECS/Fargate). On cutover you prove one of IP / DNS / auth at a time, with a written rollback. Do not change IP and DNS and auth in the same night without that rollback.

Hero · replica not rewrite
Azure Migrate and AWS MGN replica of pay-api
A healthy replica is not permission to redesign the app.
Lab data · dummy only

On-prem DC dc01 10.20.30.10 · FortiGate fgt-hq 203.0.113.10 · same Azure landing as the Azure series and same AWS landing as the AWS series. Wave-1 app pay-api today on VM 10.20.30.40.

Mental model

PathToolpay-api
Lift / rehostAzure Migrate or AWS MGNWave-1 — same OS, same svc-pay
RebuildImage + pipeline / App Service / ECSWhen OS is rotting or you want PaaS
Test instanceMigrate test / MGN launch test10.41.1.40 or 10.51.1.40 — isolated name
CutoverPlanned failover / MGN cutoverAfter test. One variable + rollback.
Two doors, one wave
pay-api10.20.30.40 Lift · Migrate/MGNwave-1 Rebuild / PaaSlater or if OS is dead 10.41.1.40 / 10.51.1.40 test name + certnot prod DNS yet

Test instance uses a test FQDN. Production DNS flips in the cutover lesson.

https://console.aws.amazon.com/mgn/home
Training mock · not live
OrganizationsVPCIAM Identity CenterApplication MigrationSecurity Hub
Application Migration Service → Source servers

pay-api

10.20.30.40 · agent installed · healthy replication
subnet in hub/app — not a public /28 leftover
10.51.1.40 · sg-web · isolated
After test: HTTP 200 on test name, cert SAN matches test name
Azure Migrate: same idea, target 10.41.1.40 in spoke
AWS MGN. Training mock. Azure Migrate is the twin tool.

How to choose

SignalLiftRebuild
OS in support, app is a black boxYes — this labNo
2008 R2 / SMBv1 / no owner of the imageOnly as a temporary jailYes
Target is App Service / ECSNo — that is not a VM liftYes — different program
You want a new hostname + new IdP tonightStopThat is three changes — sequence them

Runbook

  1. Side A — replicate

    Azure Migrate appliance or MGN agent on 10.20.30.40. Wait until lag is boring. Do not “cut over to see.”

  2. Side B — test launch

    Launch into spoke 10.41.1.40 or app 10.51.1.40. Test FQDN pay-api-test.techclick-lab.in. Cert SAN = that name. Do not touch the production A record.

  3. Side C — one variable

    If test IP works and test name works, you have earned a cutover window. You have not earned a domain leave + new cert CN + DNS flip in the same change.

test prove · dummy
# Azure
az migrate show --name pay-api --resource-group rg-migrate
# replicationHealth: Healthy

# AWS
aws mgn describe-source-servers --filters "sourceServerIDs=s-payapi"
# dataReplicationInfo.lagDuration: PT0S   lifeCycle.state: READY_FOR_TEST

curl -sk --resolve pay-api-test.techclick-lab.in:443:10.41.1.40 https://pay-api-test.techclick-lab.in/health
# 200  ·  do not flip pay-api.techclick-lab.in yet

Four failures

1 · Rotting OS lift as a strategy

You just paid to host an incident. Rebuild, or rehost into a jail with a 30-day rebuild date.

2 · Test cutover using production DNS

Half the clients follow the low TTL. You are in production without a window.

3 · IP + DNS + auth same night

Three failures, one rollback story. Change one. Keep the other two stable.

4 · No rollback disk

On-prem VM powered off and deleted “to save license.” You now have a one-way door.

How to prove it

Close only when

1) Replication healthy. 2) Test instance answers on a test name. 3) Cert SAN matches that name. 4) Production A record is still 10.20.30.40. 5) On-prem VM is still intact.

Traps

Tool saysYou still check
Ready for cutoverDid a human hit the test URL?
Test VM runningIP, name, cert — which of the three did you prove?
Agent healthyIs the landing zone the target, or a dirty sub?

Knowledge check

Judgment items. One best answer. Reasons send you back to the matching section.

Q1

Wave-1 tool for a supportable pay-api OS?

Correct: a. Lift.
Q2

Rebuild is the right first move when…

Correct: b. Choose.
Q3

Test instance DNS should be…

Correct: b. Failure 2.
Q4

Changing IP, DNS, and auth the same night is…

Correct: b. Ticket.
Q5

Dummy Azure lift address in this lab?

Correct: a. Spoke.
Q6

After a test launch, production on-prem VM should be…

Correct: b. Failure 4.

On-prem to cloud migration class series: 6 Rs · Landing zone first · Identity first · VPN / ER / DX · Lift vs rebuild · Map controls · Cutover + rollback · Hybrid interview

Sources

Related: Azure landing zone · AWS Org / OU.