Cant delete virtual hub - porvisioning state "Failed"

van der Goot, Jaap 0 Reputation points
2024-08-07T08:47:28.9666667+00:00

The hub depoyment resulted in a failed state.

Tried to reset the router, reset the hub and updat the router to the lates version from the portal with no result. All attempts failed with error.

I also tried to delete it through resource explorer with put, patch and delete and nothing worked.

Now I'm stuck with a failed hub that can't be deleted..

Azure Virtual WAN
Azure Virtual WAN
An Azure virtual networking service that provides optimized and automated branch-to-branch connectivity.
229 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 47,206 Reputation points Microsoft Employee
    2024-08-07T10:26:00.24+00:00

    @van der Goot, Jaap ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you have a vHUB in failed state and you would like to delete it.

    I would suggest you first GET the vHUB and update any random property.

    So that the PUT operation would make it go into a succeeded state.

    You can follow the below commands to do it,

    $existingHub = Get-AzVirtualHub -ResourceGroupName "testRg" -Name "westushub" $route1 = Add-AzVirtualHubRoute -DestinationType "CIDR" -Destination @("10.4.0.0/16", "10.5.0.0/16") -NextHopType "IPAddress" -NextHop @("10.0.0.68") $routeTable1 = Add-AzVirtualHubRouteTable -Route @($route1) -Connection @("All_Vnets") -Name "routeTable1" Set-AzVirtualHub -VirtualHub $existingHub -RouteTable @($routeTable1)
    

    Post this, the vHUB should go into a Succeeded state.

    • Can you try the above and let us know if the vHUB went into Succeeded state?
    • If yes, you can now go ahead and delete the vHUB using Portal or Powershell Remove-AzVirtualHub

    Cheers,

    Kapil


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.