Migrate Azure classic VM to ARM. error in Virtual Network validation
<p>I tried to migrate Azure classic ASM virtual machine to ARM by following <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-ps-migration-classic-resource-manager" rel="nofollow noreferrer">the instruction</a>.</p>

<p>At the beginning of <strong>Step 5</strong>, the validation command in Option 1;</p>

<pre><code>$validate = Move-AzureService -Validate -ServiceName $serviceName `
  -DeploymentName $deploymentName -CreateNewVirtualNetwork
$validate.ValidationMessages
</code></pre>

<p>gives following error.</p>

<blockquote>
  <p>ResourceType       : Deployment</p>
  
  <p>ResourceName       : database-vm</p>
  
  <p>Category           : Error</p>
  
  <p>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.</p>
  
  <p>VirtualMachineName:</p>
</blockquote>

<p>Option 2 validation also gives same error.</p>

<p>This kind of error message <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-migration-errors" rel="nofollow noreferrer">cannot be found in the list</a>. I also try to validate VirtualNetwork command as below in order to migrate virtual network firstly.</p>

<pre><code>Move-AzureVirtualNetwork -Validate -VirtualNetworkName $vnetName
</code></pre>

<p>But, the command gives below error.</p>

<blockquote>
  <p>OperationId        : 8b66a5c9-a657-3a91-af8d-2c29ceXXXX9f</p>
  
  <p>Result             : Validation failed.  Please see ValidationMessages for details</p>
  
  <p>ValidationMessages : {DatabaseNetwork}</p>
</blockquote>

<p>How to resolve this issue?</p>

<p><strong>+ Append</strong></p>

<p>I applied below arguments to do <code>Move-AzureService</code> in <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-ps-migration-classic-resource-manager#step-5-run-commands-to-migrate-your-iaas-resources" rel="nofollow noreferrer">Option 2</a>.</p>

<pre><code>$existingVnetRGName = "database-east-asia"
$vnetName = "Group database-east-asia DatabaseNetwork"
$subnetName = "default"
</code></pre>

<p>I changed <code>$vnetName</code> argument to <code>DatabaseNetwork</code> but no luck. </p>

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

<p>The error message is nothing more detail than above. I found <code>VirtualMachineName</code> is empty in error message.</p>