1. The 5 R's of Migration

  • Rehost (Lift-and-Shift) — Move VMs/workloads as-is to Azure IaaS. Fastest path, lowest initial effort.
  • Refactor (Replatform) — Minor changes to leverage PaaS (e.g., move SQL to Azure SQL, app to App Service) without rewriting logic.
  • Rearchitect — Significant code changes to adopt cloud-native patterns (microservices, event-driven).
  • Rebuild — Rewrite from scratch using cloud-native services (Functions, Cosmos DB, AKS).
  • Replace (SaaS) — Retire custom code entirely; adopt a SaaS product (e.g., Dynamics 365, Microsoft 365).

2. 5 R's Spectrum

3. 5 R's Comparison

StrategyEffortCloud BenefitRiskTimeline
RehostLowLow (IaaS costs similar)LowDays–weeks
RefactorMediumMedium (PaaS savings, managed ops)MediumWeeks–months
RearchitectHighHigh (scalability, resilience)HighMonths
RebuildVery HighVery High (full cloud-native)High6–18 months
ReplaceLow (adopt SaaS)High (zero ops)Medium (vendor lock-in)Weeks

4. Azure Migrate: Discovery & Assessment

  • Azure Migrate Appliance — Lightweight VM deployed on-premises; discovers servers, apps, and dependencies via agentless scanning.
  • Dependency Mapping — Agent-based or agentless visualization of inter-server communication to group related workloads.
  • Assessment Reports — Azure readiness, recommended VM sizes, monthly cost estimates, and confidence ratings.
  • TCO Calculator — Compare on-premises costs (hardware, power, licensing, labor) against projected Azure spend.

Workflow: Deploy appliance → Discover inventory → Map dependencies → Generate assessment → Plan waves → Execute migration.

5. Rehost Tools

  • Azure Migrate (Server Migration) — Agentless or agent-based replication of VMware/Hyper-V/physical servers to Azure VMs.
  • Azure Database Migration Service (DMS) — Online (minimal downtime) or offline migration for SQL Server, MySQL, PostgreSQL to Azure SQL/MI.
  • Storage Migration Service — Migrate file servers to Azure VMs or Azure Files, preserving permissions and shares.

6. Refactor Patterns

  • App Service Migration Assistant — Scans IIS apps for compatibility, generates migration package, deploys to App Service in minutes.
  • Containerization — Azure Migrate app containerization tool converts ASP.NET or Java apps to containers for AKS or App Service.
  • Database replatform — Use DMS to move from SQL Server to Azure SQL Database with schema/data validation.
  • Managed disks & networking — Swap unmanaged disks, set up VNet integration, configure Private Endpoints post-migration.

7. Migration Waves

  • Dependency Grouping — Never split tightly-coupled servers across waves; group by application boundary.
  • Phased Approach — Start with low-risk, well-understood workloads; build confidence before migrating critical systems.
  • Cutover Planning — Schedule maintenance windows, pre-stage replication, validate with test failovers, update DNS/load balancers.

8. Post-Migration Optimization

  • Right-Sizing — Use Azure Advisor to identify underutilized VMs; downsize SKUs based on 14–30 day metrics.
  • Reserved Instances — Commit to 1- or 3-year reservations for stable workloads (up to 72% savings).
  • Governance Setup — Apply Azure Policy, management groups, tagging standards, and cost budgets immediately.
  • Monitoring — Enable Azure Monitor, Log Analytics, and Application Insights; configure alerts for performance baselines.
  • Security Hardening — Enable Defender for Cloud, configure NSGs, enable JIT VM access, rotate credentials.

9. Real-World: 200-Server Datacenter Migration

Scenario: A manufacturing company needs to vacate its datacenter lease in 8 months. They have 200 servers running ERP, custom .NET apps, SQL Server clusters, and file shares.

Approach:

  • Month 1: Deploy Azure Migrate appliance, discover all 200 servers, map dependencies, generate TCO report showing 35% savings.
  • Month 2: Wave 1 — Migrate 40 standalone VMs (dev/test, file servers) via lift-and-shift. Validate connectivity and performance.
  • Months 3–4: Wave 2 — Migrate 90 application servers + refactor SQL to Azure SQL MI using DMS online mode (< 5 min downtime per DB).
  • Months 5–6: Wave 3 — Migrate 70 complex/legacy servers including ERP. Containerize 3 .NET apps for AKS. Decommission on-premises.
  • Month 7: Post-migration — Right-size VMs (saved additional 20%), purchase 3-year reservations, apply governance policies.

Result: Full migration in 6 months with 2-month buffer. Total cost reduced 45% vs on-premises. Zero unplanned downtime during cutover weekends.

10. Exam Tip

AZ-305 frequently tests when to choose Rehost vs Refactor. Choose Rehost when time is critical and workloads are compatible as-is. Choose Refactor when PaaS benefits (auto-patching, scaling, reduced ops) justify the additional migration effort. Always mention Azure Migrate for discovery/assessment and DMS for database migrations — these are the expected tooling answers.

11. Knowledge Check