Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✔️ Windows VMs ✔️ Linux VMs
Summary
This article helps you troubleshoot the MissingMoveDependentResources error code that occurs when you move Microsoft Azure virtual machine (VM) resources to another resource group or subscription. The error indicates that the move request doesn't include all dependent resources. To resolve this issue, identify the missing resources that are listed in the error details, and include them in the move operation.
Symptoms
When you try to move Azure virtual machine resources to another resource group or subscription, the operation fails and returns an error message that resembles the following message:
{
"code": "MissingMoveDependentResources",
"target": "Microsoft.Network/networkInterfaces",
"message": "The move resources request does not contain all the dependent resources. Please check details for missing resource Ids.",
"details": [
{
"code": "0",
"message": "/subscriptions/<subscription-id>/resourceGroups/<rg-name>/providers/Microsoft.Network/publicIPAddresses/<ip-name>"
},
...
]
}
The details array lists the resource IDs that you must include in the move request.
Cause
When you move a resource, Azure Resource Manager requires that all dependent (linked) resources must satisfy either of the following conditions:
- They already exist in the destination resource group or subscription
- They're included in the same move request
VM resources have a chain of dependencies. For example, to move a VM, you must also move:
- The VM's managed disks
- The VM's network adapter
- The virtual network that the network adapter is attached to
- All other network adapters that are attached to the same virtual network
- Any public IP addresses that's associated with those network adapters
- Any network security groups (NSGs) that are associated with the network adapters or subnets
This chain can extend to additional resource types, depending on your configuration.
| Resource provider | Resource types that might be required |
|---|---|
| Microsoft.Compute | virtualMachines, disks |
| Microsoft.Network | networkInterfaces, publicIPAddresses, networkSecurityGroups, virtualNetworks |
| Microsoft.Storage | storageAccounts (if using unmanaged disks or boot diagnostics) |
If you don't include any dependent resource in the move request, the operation fails before it starts.
Resolution
To resolve the issue, follow these steps:
Collect the full error message: The
detailsarray contains the complete list of missing resource IDs. To review all entries, copy the raw error text to a text editor.Parse the missing resource IDs: Each entry in
detailscontains a full resource ID in the format:/subscriptions/<sub>/resourceGroups/<rg>/providers/<type>/<name>To build your list of missing resources, extract the resource type and name from each entry.
Add all missing resources to your move request: In the Azure portal, return to the Move resources blade, and add each missing resource to the selection before you retry.
If you're using Azure PowerShell or Azure CLI, add the missing resource IDs to the
-ResourceIdparameter array.Azure PowerShell example:
$resourceIds = @( "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Compute/virtualMachines/<vm-name>", "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Compute/disks/<disk-name>", "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/networkInterfaces/<nic-name>", "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/virtualNetworks/<vnet-name>", "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/publicIPAddresses/<ip-name>", "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Network/networkSecurityGroups/<nsg-name>" ) Move-AzResource -DestinationResourceGroupName "<destination-rg>" -ResourceId $resourceIdsRetry the move: After yo add all missing resources, retry the move operation.
Note
The error message might list a resource in a resource group other than the one that you expect. In this case, the difference might occur because that resource is shared across multiple VMs or resource groups. You must include all resources in the dependency chain regardless of their current location.
Check which resources support move operations
Not all Azure resource types support the move operation. Before you process the move, verify that all resources in your move request are supported.
See Move operation support for resources for a complete list.
Note
For a detailed explanation of this error code, see What does the error code "MissingMoveDependentResources" mean?