You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-local/migrate/migrate-via-powershell.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Before you begin, you should complete the following tasks:
22
22
2. Install the [Azure PowerShell Az module](/powershell/azure/install-azure-powershell).
23
23
24
24
<!-- Update version to 2.X.X in this paragraph-->
25
-
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:
25
+
3. Verify the Azure Migrate PowerShell module is installed **and version is 2.8.0 or later**. 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 or later:
26
26
27
27
```powershell
28
28
Get-InstalledModule -Name Az.Migrate
@@ -52,7 +52,7 @@ You can view the full list of Azure Migrate PowerShell cmdlets by visiting the [
52
52
## Retrieve discovered VMs
53
53
54
54
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.
55
-
Learn more about the `Get-AzMigrateDiscoveredServer` cmdlet [here](/powershell/module/az.migrate/get-azmigratediscoveredserver).
55
+
For more information, see the `Get-AzMigrateDiscoveredServer`](/powershell/module/az.migrate/get-azmigratediscoveredserver).
56
56
57
57
**Example 1**: Get all VMs discovered by an Azure Migrate source appliance in an Azure Migrate project:
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.
83
-
Learn more about the `Initialize-AzMigrateLocalReplicationInfrastructure` cmdlet [here](/powershell/module/az.migrate/initialize-azmigratelocalreplicationinfrastructure).
83
+
For more information, see the `Initialize-AzMigrateLocalReplicationInfrastructure`](/powershell/module/az.migrate/initialize-azmigratelocalreplicationinfrastructure).
84
84
85
-
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.
85
+
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 going to your Azure Migrate project, then navigating to **Appliances > Registered appliances**.
You can replicate a VM using the `New-AzMigrateLocalServerReplication` cmdlet. This cmdlet allows you to create a replication job for a discovered VM.
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).
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. For more information, see the [`New-AzMigrateLocalServerReplication`](/powershell/module/az.migrate/new-azmigratelocalserverreplication) cmdlet.
139
139
140
-
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.
140
+
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**sections). These allow you to customize the disks and network interfaces are included during replication.
141
141
142
142
143
143
## (Option 1) Start Replication without disk and NIC mapping
@@ -197,7 +197,7 @@ foreach ($DiscoveredServer in $DiscoveredServers)
197
197
198
198
Create a local disk mapping PS object using the `New-AzMigrateLocalDiskMappingObject` cmdlet. You can store multiple such objects in a list using `@()`.
199
199
You can customize the disk mapping object with parameters like `DiskID`, `IsOSDisk`, `IsDynamic`, `Format`, and `PhysicalSectorSize`.
200
-
Learn more about the `New-AzMigrateLocalDiskMappingObject` cmdlet [here](/powershell/module/az.migrate/new-azmigratelocaldiskmappingobject).
200
+
For more information, see the [`New-AzMigrateLocalDiskMappingObject`](/powershell/module/az.migrate/new-azmigratelocaldiskmappingobject) cmdlet.
201
201
202
202
>[!NOTE]
203
203
> 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.
@@ -234,7 +234,7 @@ $DiskMappings | Format-List *
234
234
### Create a local NIC mapping object
235
235
236
236
Create a local NIC mapping PS object using the `New-AzMigrateLocalNicMappingObject`. You can store multiple such objects in a list using `@()`.
237
-
Learn more about the `New-AzMigrateLocalNicMappingObject` cmdlet [here](/powershell/module/az.migrate/new-azmigratelocalnicmappingobject).
237
+
For more information, see the [`New-AzMigrateLocalNicMappingObject`](/powershell/module/az.migrate/new-azmigratelocalnicmappingobject) cmdlet.
238
238
239
239
**Example**
240
240
@@ -265,7 +265,7 @@ $NicMappings | Format-List *
265
265
266
266
**Start Replication with Disk and NIC Mappings**
267
267
> [!NOTE]
268
-
> If you use the `-DiskToInclude` and `-NicToInclude` parameters, you must create both local disk and NIC mapping objects as shown in the sections **Create a Local Disk Mapping** and **Create a local NIC mapping object**above. You cannot use one without the other.
268
+
> If you use the `-DiskToInclude` and `-NicToInclude` parameters, you must create both local disk and NIC mapping objects as shown in the **Create a Local Disk Mapping** and **Create a local NIC mapping object**sections. You cannot use one without the other.
269
269
>
270
270
```powershell
271
271
# Get VM(s) that match $SourceMachineDisplayNameToMatch. Could return multiple items.
@@ -330,7 +330,7 @@ foreach ($DiscoveredServer in $DiscoveredServers)
330
330
331
331
### Retrieve replication jobs
332
332
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).
333
+
Use the `Get-AzMigrateLocalJob` cmdlet to retrieve jobs about creating, updating, migrating, and removing replications. For more information, see the [`Get-AzMigrateLocalJob`](/powershell/module/az.migrate/get-azmigratelocaljob) cmdlet.
To retrieve more information about any error messages or job details, you can examine the $ReplicationJob.Property output and specifically look for the `Error` property, which contains detailed error messages if any issues occurred during the replication job.
344
+
To retrieve more information about any error messages or job details, you can examine the `$ReplicationJob.Property` output and specifically look for the `Error` property, which contains detailed error messages if any issues occurred during the replication job.
Use the `Get-AzMigrateLocalServerReplication` cmdlet to retrieve (get) protected item. Learn more about the `Get-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/get-azmigratelocalserverreplication).
354
+
Use the `Get-AzMigrateLocalServerReplication` cmdlet to retrieve (get) protected item. For more information, see the [`Get-AzMigrateLocalServerReplication`](/powershell/module/az.migrate/get-azmigratelocalserverreplication) cmdlet.
### (Optional) Delete a replicating protected item
380
380
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.
381
-
Learn more about the `Remove-AzMigrateLocalServerReplication` cmdlet [here](/powershell/module/az.migrate/remove-azmigratelocalserverreplication).
381
+
For more information, see the [`Remove-AzMigrateLocalServerReplication`](/powershell/module/az.migrate/remove-azmigratelocalserverreplication) cmdlet.
Use the `Start-AzMigrateLocalServerMigration` cmdlet to migrate a replication as part of planned failover.
393
393
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.
394
-
Learn more about the `Start-AzMigrateLocalServerMigration` cmdlet [here](/powershell/module/az.migrate/start-azmigratelocalservermigration).
394
+
For more information, see the [`Start-AzMigrateLocalServerMigration`](/powershell/module/az.migrate/start-azmigratelocalservermigration) cmdlet.
395
395
396
396
> [!IMPORTANT]
397
397
> Before starting migration, verify replication succeeded by checking `$ProtectedItem.Property.AllowedJob` and ensuring it contains `PlannedFailover`.
0 commit comments