Azure Local - Logical Network failed to delete

Josh Litton 0 Reputation points
2025-04-15T15:14:25.04+00:00

Post-deployment of Azure Local stack, I added and attempted to delete a Logical Network, after a while the operation timed out with the following error:

serviceClient returned an error during deletion: The logical network service returned an error during deletion: rpc error: code = Unknown desc = rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp <Node2IP>:45000: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.": Failed

I attempted to remove the network via Azure Shell using:

Remove-AzStackHCIVMLogicalNetwork -

Additionally I also tried the steps outlined here with no success:

https://learn.microsoft.com/en-us/answers/questions/2123150/azure-stack-vm-network-cannot-delete

Is there any other way to forcibly delete the logical network? Alternatively, am I able to restore the logical network without deleting?

Windows for business | Windows Server | Windows cloud | Deploy Azure Local
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hieu Nguyen0424 80 Reputation points Independent Advisor
    2025-04-24T16:35:12.8766667+00:00

    A few options to move forward:

    Option 1: Check the service and bring it back online

    1. Log in to the problematic node (in this case, <Node2IP>).
    2. Check if the "AzStackHCI" or related logical network service is running:
    Get-Service -Name *HciNetworkService*
    
    1. Restart the service if it's down:
    Restart-Service -Name <ServiceName>
    
    1. Once the service is responsive, retry the deletion.

    Option 2: Forcibly delete the Logical Network via WMI or database cleanup

    This method should only be done if you're absolutely sure the Logical Network is orphaned, and you can't restore connectivity to the node.

    1. Use WMI to remove the resource:
    Get-WmiObject -Namespace "root\wmi" -Class MSFT_NetworkLogicalNetwork | Where-Object { $_.Name -eq "<YourLogicalNetworkName>" } | Remove-WmiObject
    
    1. If WMI doesn't help, you may have to remove the reference manually from the AzStack HCI state database, but this is risky and not documented for general users. Microsoft support usually handles this.

    Option 3: Restore or Reconnect the Logical Network

    If you're open to restoring instead of deleting, and the backend service was just temporarily unreachable

    1. Restart the related services on all nodes:
    Restart-Service -Name "AzStackHCI*" -Force
    
    1. Re-attempt a Get and Set operation on the logical network:
    Get-AzStackHCILogicalNetwork -Name "<YourLogicalNetworkName>" | Set-AzStackHCILogicalNetwork -Tags @{ restored = "true" }
    
    0 comments No comments

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.