Migrate Azure classic VM to ARM. error in Virtual

2019-07-16 00:25发布

问题:

I tried to migrate Azure classic ASM virtual machine to ARM by following the instruction.

At the beginning of Step 5, the validation command in Option 1;

$validate = Move-AzureService -Validate -ServiceName $serviceName `
  -DeploymentName $deploymentName -CreateNewVirtualNetwork
$validate.ValidationMessages

gives following error.

ResourceType : Deployment

ResourceName : database-vm

Category : Error

Message: Deployment database-vm in HostedService database-vm belongs to Virtual Network Group database-east-asia DatabaseNetwork. Please migrate Virtual Network Group database-east-asia DatabaseNetwork to migrate this HostedService database-vm.

VirtualMachineName:

Option 2 validation also gives same error.

This kind of error message cannot be found in the list. I also try to validate VirtualNetwork command as below in order to migrate virtual network firstly.

Move-AzureVirtualNetwork -Validate -VirtualNetworkName $vnetName

But, the command gives below error.

OperationId : 8b66a5c9-a657-3a91-af8d-2c29ceXXXX9f

Result : Validation failed. Please see ValidationMessages for details

ValidationMessages : {DatabaseNetwork}

How to resolve this issue?

+ Append

I applied below arguments to do Move-AzureService in Option 2.

$existingVnetRGName = "database-east-asia"
$vnetName = "Group database-east-asia DatabaseNetwork"
$subnetName = "default"

I changed $vnetName argument to DatabaseNetwork but no luck.

I can see very long Group database-east-asia DatabaseNetwork in classic portal. Note that VM and Vnet does not in same resource group. I don't know this is matter.

The error message is nothing more detail than above. I found VirtualMachineName is empty in error message.

回答1:

Could you please post the detailed ValidationMessages of your second command?

According to the error message, the VNET named "DatabaseNetwork" can not be migrated for some reasons.

Normally, this error message is caused by unsupported features configured on the VNET.

  • Endpoint ACLs.
  • Virtual network gateways (Azure ExpressRoute Gateways, Application gateway).
  • Virtual networks using VNet Peering.
  • Traffic Manager profiles.

You need to disable these features and then migrate the VNET. After the migration, you can enable it back on Resource Mode.

==========================================================

Update:

  1. To get the detailed ValidationMessages of your second command, please run the following commands:

    $validate=Move-AzureVirtualNetwork -Validate -VirtualNetworkName $vnetName $validate.ValidationMessages

  2. To migrate a VM connected to a VNET, we just need to migrate the VNET, the VM will be migrated with the VNET automatically.