question

DavidBeitler-2519 avatar image
0 Votes"
DavidBeitler-2519 asked RaviVarmanMSFT-5919 answered

Cannot move VM to another resource group due to Vpn Gateway connection in fail provisioning state.

Have two problems. The second of which is more time critical. I need to move a VM from one resource group to another. But the portal will not let me:
"Cannot proceed with operation because resource ..xxx.... either directly involved in the move or referenced by one of the resources involved in the move is not in Succeeded state. "

The resource mentioned is a connection configured in the virtual network gateway, which is not in either of the two groups involved in the transfer. And neither are the Vnet and VPN gateway components.


azure-vpn-gateway
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaviVarmanMSFT-5919 avatar image
0 Votes"
RaviVarmanMSFT-5919 answered

Hi @DavidBeitler-2519

When you get an error message that indicates a resource can't be moved because it isn't in a succeeded state, it may actually be a dependent resource that is blocking the move. Typically, the error code is MoveCannotProceedWithResourcesNotInSucceededState.

If the source or target resource group contains a virtual network, the states of all dependent resources for the virtual network are checked during the move. The check includes those resources directly and indirectly dependent on the virtual network. If any of those resources are in a failed state, the move is blocked. For example, if a virtual machine that uses the virtual network has failed, the move is blocked. The move is blocked even when the virtual machine isn't one of the resources being moved and isn't in one of the resource groups for the move.

If the vnet has peering enabled with the vnet where vnet connection is in failed state that could also cause this issue.
The best solution is to get the resource out from the failed state. You can use powershell command to get the resource out of failed state by doing an Get and Set action.

Ex: If the VPN connection is in failed state then use below commands to get it out of failed state.
$connection = Get-AzVirtualNetworkGatewayConnection -Name ConnectionName -ResourceGroupName RGname
Set-AzVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $connection

**Ref:**https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/move-resource-group-and-subscription#frequently-asked-questions

Hope this was helpful. Please let us know in case of any additional questions or concerns.

Please "Accept the answer" if the information helped you. This will help us and others in the community as well




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.