Skip to content

Commit 65670a0

Browse files
committed
switch to rel links
1 parent f5c933b commit 65670a0

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

azure-local/migrate/migrate-via-powershell.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
title: Migrate VMs to Azure Local with Azure Migrate using PowerShell
33
description: Learn how to migrate VMs to Azure Local with Azure Migrate using PowerShell.
4-
author: trumanbrown
4+
author: alkohli
55
ms.topic: how-to
6-
ms.date: 05/21/2025
7-
ms.author: trumanbrown
8-
ms.reviewer: alkohli
9-
ms.subservice: azurelocal
6+
ms.date: 08/05/2025
7+
ms.author: alkohli
108
---
119

1210
# Migrate VMs to Azure Local with Azure Migrate using PowerShell
@@ -18,10 +16,10 @@ This article describes how to migrate VMs to Azure Local with Azure Migrate usin
1816
Before you begin, you should complete the following tasks:
1917

2018
1. Complete the following prerequisites for the Azure Migrate project:
21-
- For a Hyper-V source environment, complete the [Hyper-V prerequisites](https://learn.microsoft.com/azure/azure-local/migrate/migrate-hyperv-prerequisites) and [configure the source and target appliances](https://learn.microsoft.com/azure/azure-local/migrate/migrate-hyperv-replicate#step-1-create-and-configure-the-source-appliance).
22-
- For a VMware source environment, complete the [VMware prerequisites](https://learn.microsoft.com/azure/azure-local/migrate/migrate-vmware-prerequisites) and [configure the source and target appliances](https://learn.microsoft.com/azure/azure-local/migrate/migrate-vmware-replicate#step-1-create-and-configure-the-source-vmware-appliance).
19+
- For a Hyper-V source environment, complete the [Hyper-V prerequisites](migrate-hyperv-prerequisites.md) and [configure the source and target appliances](migrate-hyperv-replicate.md#step-1-create-and-configure-the-source-appliance).
20+
- For a VMware source environment, complete the [VMware prerequisites](migrate-vmware-prerequisites.md) and [configure the source and target appliances](migrate-vmware-replicate.md#step-1-create-and-configure-the-source-vmware-appliance).
2321

24-
2. Install the [Azure PowerShell Az module](https://learn.microsoft.com/powershell/azure/install-azure-powershell).
22+
2. Install the [Azure PowerShell Az module](/powershell/azure/install-azure-powershell).
2523

2624
<!-- Update version to 2.X.X in this paragraph-->
2725
3. Verify the Azure Migrate PowerShell module is installed **and version is >=2.8.0**. Azure Migrate PowerShell is available as part of the Azure PowerShell Az module. Run the following command to check if Azure Migrate PowerShell is installed on your computer and verify the version is >=2.8.0:
@@ -49,12 +47,12 @@ Use the `Get-AzSubscription` cmdlet to get the list of Azure subscriptions you h
4947
Set-AzContext -SubscriptionId "00000000-0000-0000-0000-000000000000"
5048
```
5149
52-
You can view the full list of Azure Migrate PowerShell cmdlets by visiting the [Azure Migrate PowerShell reference](https://learn.microsoft.com/powershell/module/az.migrate) or by running command `Get-Command -Module Az.Migrate`.
50+
You can view the full list of Azure Migrate PowerShell cmdlets by visiting the [Azure Migrate PowerShell reference](/powershell/module/az.migrate) or by running command `Get-Command -Module Az.Migrate`.
5351
5452
## Retrieve discovered VMs
5553
5654
You can retrieve the discovered VMs in your Azure Migrate project using the `Get-AzMigrateDiscoveredServer` cmdlet. This cmdlet retrieves the list of VMs discovered by the source appliance in your Azure Migrate project. SourceMachineType can be either `HyperV` or `VMware`, depending on your source VM environment.
57-
Learn more about the `Get-AzMigrateDiscoveredServer` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratediscoveredserver).
55+
Learn more about the `Get-AzMigrateDiscoveredServer` cmdlet [here](/powershell/module/az.migrate/get-azmigratediscoveredserver).
5856
5957
**Example 1**: Get all VMs discovered by an Azure Migrate source appliance in an Azure Migrate project:
6058
@@ -82,11 +80,11 @@ Write-Output $DiscoveredServers | Format-List *
8280
## Initialize VM replications
8381

8482
You can initialize the replication infrastructure for your Azure Migrate project using the `Initialize-AzMigrateLocalReplicationInfrastructure` cmdlet. This cmdlet sets up the necessary infrastructure and metadata storage account needed to eventually replicate VMs from the source appliance to the target appliance. Running this cmdlet multiple times will not cause any issues, as it checks if the replication infrastructure is already initialized.
85-
Learn more about the `Initialize-AzMigrateLocalReplicationInfrastructure` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/initialize-azmigratelocalreplicationinfrastructure).
83+
Learn more about the `Initialize-AzMigrateLocalReplicationInfrastructure` cmdlet [here](/powershell/module/az.migrate/initialize-azmigratelocalreplicationinfrastructure).
8684

8785
You can use a default created storage account or a custom-created storage account that will store the replication metadata. You will need the source and target appliance names from the Azure Portal by navigating to your Azure Migrate project -> Appliances -> Registered appliances.
8886

89-
![alt text](appliances.jpg "Appliances in Azure Migrate project")
87+
:::image type="content" source="./media/migrate-via-powershell/migrate-appliances.png" alt-text="Screenshot showing Appliances in Azure Migrate project page." lightbox="./media/migrate-via-powershell/migrate-appliances.png":::
9088

9189
**Option 1**: Initialize replication infrastructure with the default storage account:
9290

@@ -137,7 +135,7 @@ Get-AzStorageAccount `
137135
## Replicate a VM
138136

139137
You can replicate a VM using the `New-AzMigrateLocalServerReplication` cmdlet. This cmdlet allows you to create a replication job for a discovered VM.
140-
You can specify the target logical network, storage path, resource group, VM name, and target VM settings like OS disk, CPU, memory, and more. Learn more about the `New-AzMigrateLocalServerReplication` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratelocalserverreplication).
138+
You can specify the target logical network, storage path, resource group, VM name, and target VM settings like OS disk, CPU, memory, and more. Learn more about the `New-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/new-azmigratelocalserverreplication).
141139

142140
To further customize the replication job, you can define local disk and NIC mappings ahead of time using `New-AzMigrateLocalDiskMappingObject` and `New-AzMigrateLocalNicMappingObject` (see **Create a local disk mapping** and **Create a local NIC mapping object** below). These allow you to customize the disks and network interfaces are included during replication.
143141

@@ -199,7 +197,7 @@ foreach ($DiscoveredServer in $DiscoveredServers)
199197

200198
Create a local disk mapping PS object using the `New-AzMigrateLocalDiskMappingObject` cmdlet. You can store multiple such objects in a list using `@()`.
201199
You can customize the disk mapping object with parameters like `DiskID`, `IsOSDisk`, `IsDynamic`, `Format`, and `PhysicalSectorSize`.
202-
Learn more about the `New-AzMigrateLocalDiskMappingObject` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratelocaldiskmappingobject).
200+
Learn more about the `New-AzMigrateLocalDiskMappingObject` cmdlet [here](/powershell/module/az.migrate/new-azmigratelocaldiskmappingobject).
203201

204202
>[!NOTE]
205203
> If you are going to use the `-DiskToInclude` parameter in the `New-AzMigrateLocalServerReplication` cmdlet, you must create a local disk mapping object for **each** disk you want to include in the replication job.
@@ -236,7 +234,7 @@ $DiskMappings | Format-List *
236234
### Create a local NIC mapping object
237235

238236
Create a local NIC mapping PS object using the `New-AzMigrateLocalNicMappingObject`. You can store multiple such objects in a list using `@()`.
239-
Learn more about the `New-AzMigrateLocalNicMappingObject` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratelocalnicmappingobject).
237+
Learn more about the `New-AzMigrateLocalNicMappingObject` cmdlet [here](/powershell/module/az.migrate/new-azmigratelocalnicmappingobject).
240238

241239
**Example**
242240

@@ -332,7 +330,7 @@ foreach ($DiscoveredServer in $DiscoveredServers)
332330

333331
### Retrieve replication jobs
334332

335-
Use the `Get-AzMigrateLocalJob` cmdlet to retrieve jobs about creating, updating, migrating, and removing replications. Learn more about the `Get-AzMigrateLocalJob` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratelocaljob).
333+
Use the `Get-AzMigrateLocalJob` cmdlet to retrieve jobs about creating, updating, migrating, and removing replications. Learn more about the `Get-AzMigrateLocalJob` cmdlet [here](/powershell/module/az.migrate/get-azmigratelocaljob).
336334

337335
**Example**
338336

@@ -353,7 +351,7 @@ $ReplicationJob.Property.Error | Format-List *
353351

354352
### Retrieve (get) a replication protected item
355353

356-
Use the `Get-AzMigrateLocalServerReplication` cmdlet to retrieve (get) protected item. Learn more about the `Get-AzMigrateLocalServerReplication` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratelocalserverreplication).
354+
Use the `Get-AzMigrateLocalServerReplication` cmdlet to retrieve (get) protected item. Learn more about the `Get-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/get-azmigratelocalserverreplication).
357355

358356
**Example**
359357

@@ -367,7 +365,7 @@ $ProtectedItem.Property | Format-List *
367365
### Update a replication protected item
368366

369367
Use the `Set-AzMigrateLocalServerReplication` cmdlet to update a replication protected item.
370-
Learn more about the `Set-AzMigrateLocalServerReplication` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/set-azmigratelocalserverreplication).
368+
Learn more about the `Set-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/set-azmigratelocalserverreplication).
371369

372370
**Example**
373371

@@ -380,7 +378,7 @@ $SerReplicationJob.Property | Format-List *
380378

381379
### (Optional) Delete a replicating protected item
382380
Use the `Remove-AzMigrateLocalServerReplication` cmdlet to delete a replicating protected item. This is useful if you want to stop a VM from replicating or if you want to start fresh with a new replication job if protected item became corrupted.
383-
Learn more about the `Remove-AzMigrateLocalServerReplication` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/remove-azmigratelocalserverreplication).
381+
Learn more about the `Remove-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/remove-azmigratelocalserverreplication).
384382

385383
**Example**
386384
```powershell
@@ -393,7 +391,7 @@ Write-Output "Protected item removed successfully."
393391

394392
Use the `Start-AzMigrateLocalServerMigration` cmdlet to migrate a replication as part of planned failover.
395393
You can use the `-TurnOffSourceServer` parameter to turn off the source VM after migration. This is useful for scenarios where you want to ensure that the source VM is no longer running after migration.
396-
Learn more about the `Start-AzMigrateLocalServerMigration` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/start-azmigratelocalservermigration).
394+
Learn more about the `Start-AzMigrateLocalServerMigration` cmdlet [here](/powershell/module/az.migrate/start-azmigratelocalservermigration).
397395

398396
> [!IMPORTANT]
399397
> Before starting migration, verify replication succeeded by checking `$ProtectedItem.Property.AllowedJob` and ensuring it contains `PlannedFailover`.
@@ -418,7 +416,7 @@ $MigrationJob.Property | Format-List *
418416

419417
Use the `Remove-AzMigrateLocalServerReplication` cmdlet to remove a protected item to complete migration.
420418
Do not use this cmdlet until you have verified that the migration is successful and you no longer need the protected item in Azure Migrate.
421-
Learn more about the `Remove-AzMigrateLocalServerReplication` cmdlet [here](https://learn.microsoft.com/powershell/module/az.migrate/remove-azmigratelocalserverreplication).
419+
Learn more about the `Remove-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/remove-azmigratelocalserverreplication).
422420

423421
**Example**
424422

@@ -433,4 +431,4 @@ $RemoveJob.Property | Format-List *
433431

434432
## Next steps
435433

436-
- Alternatively, you can [replicate and migrate using Azure portal](https://learn.microsoft.com/azure/azure-local/migrate/migration-options-overview).
434+
- Alternatively, you can [replicate and migrate using Azure portal](migration-options-overview.md).

0 commit comments

Comments
 (0)