New-AzMigrateServerReplication

Starts replication for the specified server.

Syntax

New-AzMigrateServerReplication
   -DiskType <String>
   -LicenseType <String>
   -MachineId <String>
   -OSDiskID <String>
   -TargetNetworkId <String>
   -TargetResourceGroupId <String>
   -TargetSubnetName <String>
   -TargetVMName <String>
   [-DiskEncryptionSetID <String>]
   [-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
   [-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
   [-PerformAutoResync <String>]
   [-SqlServerLicenseType <String>]
   [-SubscriptionId <String>]
   [-Tag <Hashtable>]
   [-TargetAvailabilitySet <String>]
   [-TargetAvailabilityZone <String>]
   [-TargetBootDiagnosticsStorageAccount <String>]
   [-TargetVMSize <String>]
   [-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
   [-VMWarerunasaccountID <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
New-AzMigrateServerReplication
   -DiskToInclude <IVMwareCbtDiskInput[]>
   -LicenseType <String>
   -MachineId <String>
   -TargetNetworkId <String>
   -TargetResourceGroupId <String>
   -TargetSubnetName <String>
   -TargetVMName <String>
   [-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
   [-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
   [-PerformAutoResync <String>]
   [-SqlServerLicenseType <String>]
   [-SubscriptionId <String>]
   [-Tag <Hashtable>]
   [-TargetAvailabilitySet <String>]
   [-TargetAvailabilityZone <String>]
   [-TargetBootDiagnosticsStorageAccount <String>]
   [-TargetVMSize <String>]
   [-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
   [-VMWarerunasaccountID <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
New-AzMigrateServerReplication
   -DiskType <String>
   -InputObject <IVMwareMachine>
   -LicenseType <String>
   -OSDiskID <String>
   -TargetNetworkId <String>
   -TargetResourceGroupId <String>
   -TargetSubnetName <String>
   -TargetVMName <String>
   [-DiskEncryptionSetID <String>]
   [-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
   [-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
   [-PerformAutoResync <String>]
   [-SqlServerLicenseType <String>]
   [-SubscriptionId <String>]
   [-Tag <Hashtable>]
   [-TargetAvailabilitySet <String>]
   [-TargetAvailabilityZone <String>]
   [-TargetBootDiagnosticsStorageAccount <String>]
   [-TargetVMSize <String>]
   [-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
   [-VMWarerunasaccountID <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
New-AzMigrateServerReplication
   -DiskToInclude <IVMwareCbtDiskInput[]>
   -InputObject <IVMwareMachine>
   -LicenseType <String>
   -TargetNetworkId <String>
   -TargetResourceGroupId <String>
   -TargetSubnetName <String>
   -TargetVMName <String>
   [-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
   [-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
   [-PerformAutoResync <String>]
   [-SqlServerLicenseType <String>]
   [-SubscriptionId <String>]
   [-Tag <Hashtable>]
   [-TargetAvailabilitySet <String>]
   [-TargetAvailabilityZone <String>]
   [-TargetBootDiagnosticsStorageAccount <String>]
   [-TargetVMSize <String>]
   [-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
   [-VMWarerunasaccountID <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

The New-AzMigrateServerReplication cmdlet starts the replication for a particular discovered server in the Azure Migrate project.

Examples

Example 1: When there is only OS disk

New-AzMigrateServerReplication -MachineId "/subscriptions/xxx-xxx-xxx4/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f" -LicenseType NoLicenseType -TargetResourceGroupId "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG" -TargetNetworkId  "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG/providers/Microsoft.Network/virtualNetworks/AzMigrateTargetNetwork" -TargetSubnetName default -TargetVMName "prsadhu-TestVM" -DiskType "Standard_LRS" -OSDiskID "6000C299-343d-7bcd-c05e-a94bd63316dd"

ActivityId                       : 68af14b4-46ae-48d1-b3e9-cdcffb9e8a93 ActivityId: 74d1a396-1d37-4264-8a5b-b727aaef0171
AllowedAction                    : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType         : AsrJobDetails
EndTime                          : 9/16/20 11:57:33 AM
Error                            : {}
FriendlyName                     : Enable
Id                               : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
                                   yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b
Location                         :
Name                             : 997e2a92-5afe-49c7-a81a-89660aec9b7b
ScenarioName                     : Enable
StartTime                        : 9/16/20 11:57:32 AM
State                            : Succeeded
StateDescription                 : Completed
TargetInstanceType               : ProtectionProfile
TargetObjectId                   : 42752b89-5fad-52fd-bf93-679fbdb6fed9
TargetObjectName                 : migrateAzMigratePWSHTc8d1sitepolicy
Task                             : {CloudPairingPrerequisitesCheck, CloudPairingPrepareSite}
Type                             : Microsoft.RecoveryServices/vaults/replicationJobs

This is for the scenario, when there is only one single disk that has to be protected.

Example 2: When there are multiple disks

$OSDisk = New-AzMigrateDiskMapping -DiskID '6000C299-343d-7bcd-c05e-a94bd63316dd' -DiskType 'Standard_LRS' -IsOSDisk 'true'
$DataDisk = New-AzMigrateDiskMapping -DiskID '7000C299-343d-7bcd-c05e-a94bd63316dd' -DiskType 'Standard_LRS' -IsOSDisk 'false'
$DisksToInclude += $OSDisk
$DisksToInclude += $DataDisk
New-AzMigrateServerReplication -MachineId "/subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f" -LicenseType NoLicenseType -TargetResourceGroupId "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG" -TargetNetworkId  "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG/providers/Microsoft.Network/virtualNetworks/AzMigrateTargetNetwork" -TargetSubnetName default -TargetVMName "prsadhu-TestVM" -DiskToInclude $DisksToInclude -PerformAutoResync true

ActivityId                       : 68af14b4-46ae-48d1-b3e9-cdcffb9e8a93 ActivityId: 74d1a396-1d37-4264-8a5b-b727aaef0171
AllowedAction                    : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType         : AsrJobDetails
EndTime                          : 9/16/20 11:57:33 AM
Error                            : {}
FriendlyName                     : Enable
Id                               : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
                                   yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b
Location                         :
Name                             : 997e2a92-5afe-49c7-a81a-89660aec9b7b
ScenarioName                     : Enable
StartTime                        : 9/16/20 11:57:32 AM
State                            : Succeeded
StateDescription                 : Completed
TargetInstanceType               : ProtectionProfile
TargetObjectId                   : 42752b89-5fad-52fd-bf93-679fbdb6fed9
TargetObjectName                 : migrateAzMigratePWSHTc8d1sitepolicy
Task                             : {CloudPairingPrerequisitesCheck, CloudPairingPrepareSite}
Type                             : Microsoft.RecoveryServices/vaults/replicationJobs

This is for the scenario, when there are multiple disks that has to be protected.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiskEncryptionSetID

Specifies the disk encyption set to be used.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiskTag

Specifies the tag to be used for disk creation. To construct, see NOTES section for DISKTAG properties and create a hash table.

Type:IVMwareCbtEnableMigrationInputTargetDiskTags
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiskToInclude

Specifies the disks on the source server to be included for replication. To construct, see NOTES section for DISKTOINCLUDE properties and create a hash table.

Type:IVMwareCbtDiskInput[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiskType

Specifies the type of disks to be used for the Azure VM.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the discovered server to be migrated. The server object can be retrieved using the Get-AzMigrateServer cmdlet. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IVMwareMachine
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LicenseType

Specifies if Azure Hybrid benefit is applicable for the source server to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MachineId

Specifies the machine ID of the discovered server to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NicTag

Specifies the tag to be used for NIC creation. To construct, see NOTES section for NICTAG properties and create a hash table.

Type:IVMwareCbtEnableMigrationInputTargetNicTags
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OSDiskID

Specifies the Operating System disk for the source server to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PerformAutoResync

Specifies if replication be auto-repaired in case change tracking is lost for the source server under replication.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SqlServerLicenseType

Specifies if Azure Hybrid benefit for SQL Server is applicable for the server to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubscriptionId

Azure Subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False
-Tag

Specifies the tag to be used for Resource creation.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetAvailabilitySet

Specifies the Availability Set to be used for VM creationSpecifies the Availability Set to be used for VM creation.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetAvailabilityZone

Specifies the Availability Zone to be used for VM creation.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetBootDiagnosticsStorageAccount

Specifies the storage account to be used for boot diagnostics.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetNetworkId

Specifies the Virtual Network id within the destination Azure subscription to which the server needs to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetResourceGroupId

Specifies the Resource Group id within the destination Azure subscription to which the server needs to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetSubnetName

Specifies the Subnet name within the destination Virtual Netowk to which the server needs to be migrated.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetVMName

Specifies the name of the Azure VM to be created.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetVMSize

Specifies the SKU of the Azure VM to be created.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMTag

Specifies the tag to be used for VM creation. To construct, see NOTES section for VMTAG properties and create a hash table.

Type:IVMwareCbtEnableMigrationInputTargetVmtags
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMWarerunasaccountID

Account id.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IJob

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

DISKTAG <IVMwareCbtEnableMigrationInputTargetDiskTags>: Specifies the tag to be used for disk creation.

  • [(Any) <String>]: This indicates any property can be added to this object.

DISKTOINCLUDE <IVMwareCbtDiskInput[]>: Specifies the disks on the source server to be included for replication.

  • DiskId <String>: The disk Id.
  • IsOSDisk <String>: A value indicating whether the disk is the OS disk.
  • LogStorageAccountId <String>: The log storage account ARM Id.
  • LogStorageAccountSasSecretName <String>: The key vault secret name of the log storage account.
  • [DiskEncryptionSetId <String>]: The DiskEncryptionSet ARM Id.
  • [DiskType <DiskAccountType?>]: The disk type.

INPUTOBJECT <IVMwareMachine>: Specifies the discovered server to be migrated. The server object can be retrieved using the Get-AzMigrateServer cmdlet.

  • [GuestOSDetailOstype <String>]: Type of the operating system.

NICTAG <IVMwareCbtEnableMigrationInputTargetNicTags>: Specifies the tag to be used for NIC creation.

  • [(Any) <String>]: This indicates any property can be added to this object.

VMTAG <IVMwareCbtEnableMigrationInputTargetVmtags>: Specifies the tag to be used for VM creation.

  • [(Any) <String>]: This indicates any property can be added to this object.