New-AzMigrateServerReplication
Starts replication for the specified server.
Syntax
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-MachineId <String>
-DiskType <String>
-OSDiskID <String>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-DiskEncryptionSetID <String>]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-MachineId <String>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-SubscriptionId <String>]
-DiskToInclude <IVMwareCbtDiskInput[]>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-DiskType <String>
-OSDiskID <String>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-DiskEncryptionSetID <String>]
[-SubscriptionId <String>]
-InputObject <IVMwareMachine>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-SubscriptionId <String>]
-DiskToInclude <IVMwareCbtDiskInput[]>
-InputObject <IVMwareMachine>
[-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 : 00001111-aaaa-2222-bbbb-3333cccc4444
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 : 00001111-aaaa-2222-bbbb-3333cccc4444
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskEncryptionSetID
Specifies the disk encyption set to be used.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
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 |
Required: | True |
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 |
Required: | True |
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 |
Required: | True |
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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LinuxLicenseType
Specifies if Azure Hybrid benefit is applicable for the source linux server to be migrated.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | True |
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 |
Required: | False |
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 |
Required: | True |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Azure Subscription ID.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
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 |
Required: | True |
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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetSubnetName
Specifies the Subnet name within the destination Virtual Network to which the server needs to be migrated.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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 |
Required: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TestNetworkId
Specifies the Virtual Network id within the destination Azure subscription to which the server needs to be test migrated.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TestSubnetName
Specifies the Subnet name within the destination Virtual Network to which the server needs to be test migrated.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMWarerunasaccountID
Account id.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |