Azure Stack VM Network cannot delete
Cannot delete the AzStack VM Network, even i have clear out all of the related connection and interface.
Already tried in webUI and powershell, still got the same result.
admission webhook "deletionvalidationwebhook.infrastructure.azstackhci.microsoft.com" denied the request:
| Deletion of default/**network name** failed. It is in use by other resources. Resource type:
| *v1alpha1.AzStackHCILogicalNetwork
Azure Stack HCI
Azure Virtual Machines
-
anashetty 1,145 Reputation points • Microsoft Vendor
2024-11-26T18:59:52.3533333+00:00 Hi Tang, Ken,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Check that there are no resources dependent on the VM Network which are Network Interfaces, Logical Networks.
Try this command to delete the network:
az network vnet delete --name <NetworkName> --resource-group <ResourceGroupName>
Please try this Azure CLI commands to delete Network Interface: https://learn.microsoft.com/en-us/cli/azure/azurestackhci/networkinterface?view=azure-cli-latest#az-azurestackhci-networkinterface-delete
If you still find any difficulties, please let me know I would like to work closer on this issue.
-
Andriy Bilous 11,616 Reputation points • MVP
2024-11-26T21:08:03.08+00:00 Hello Tang, Ken
This is common issue where the network is still in use by other resources, even after clearing out connections and interfaces.
Try to delete it by az cli command
az azurestackhci networkinterface delete --name "test-nic" --resource-group "test-rg"
-
Tang, Ken 0 Reputation points
2024-11-27T03:17:55.53+00:00 All Network interface has been clear-out , only left the logical network, which can't remove.
-
Tang, Ken 0 Reputation points
2024-11-27T03:18:33.09+00:00 Tried run the az network vnet delete, but no helps. the Logical network still remain
-
anashetty 1,145 Reputation points • Microsoft Vendor
2024-11-27T15:51:01.35+00:00 Hi Tang, Ken,
Thanks for getting back, once check if there are any dependencies on the logical Network:
az azurestackhci logicalnetwork show --name <LogicalNetworkName> --resource-group <ResourceGroupName>
Check for Azure Stack HCI logs or event logs for any specific details on why the deletion is being blocked.
Try to force delete:
az azurestackhci logicalnetwork delete --name <LogicalNetworkName> --resource-group <ResourceGroupName> --yes
Try to Restart Azure Stack HCI Services and then delete Logical Network.
If you still find difficulties, please let me know. Please provide any error message or screenshot of it.
-
Tang, Ken 0 Reputation points
2024-11-28T01:52:46.8666667+00:00 Hi anashetty,
When i get running with az stack-hci-vm network lnet show command, it shows still have 2 NIC attached on it. But the web azure portal already show "No connected device". Do you have any idea how to detach it ?
-
Tang, Ken 0 Reputation points
2024-11-28T02:44:50.98+00:00 Hi Anashetty,
I have run the command "az stack-hci-vm network lnet show " which show 2 NIC still attached on the "IPConfigurationReference" which has been deleted few days ago.
When i access to Azure portal, the Logical Network shows no network device connected to it.
DO you have any idea how to detach it ?
-
anashetty 1,145 Reputation points • Microsoft Vendor
2024-11-28T14:56:34.06+00:00 Hi Tang, Ken,
If the NIC appears in the 'IPConfigurationReference' but not in the portal, it might be a stale reference. Try force deleting it:
az network nic delete --ids <nic-resource-id>
Replace '<nic-resource-id>' with the full resource ID of the NIC, which you can get from the 'az network nic list' command.First list all NICs with Resource IDs then identify stale NICs and delete them. Next verify if Logical network is free of dependencies. If the 'IPConfigurationReference' is empty you can delete logical Network.
Thank you
-
Tang, Ken 0 Reputation points
2024-11-29T01:22:23.8233333+00:00 Hi Anashetty,
Unforuntaely this no help. Can't del the nic even i have run the command " az stack-hci-vm network nic delete", and the lnet still keep those 2 nic on the Ipconfigurationreference.
-
anashetty 1,145 Reputation points • Microsoft Vendor
2024-11-29T15:58:31.26+00:00 Hi Tang, Ken,
Check that there are no dependencies to the NIC:
az resource show --ids <nic-resource-id>
If there are any dependencies linked to the NIC, remove them and try deleting NIC.You can also force delete via Rest API, by using Azure resource explorer navigate to NIC then delete it directly.
-
-
-
Tang, Ken 0 Reputation points
2024-12-05T06:42:23.8966667+00:00 Dear Anashetty,
Sorry for late reply, just busy on working other stuff related on az stack.
Just tried to run the command. it gives out this information.
(ResourceNotFound) The Resource 'Microsoft.AzureStackHCI/networkInterfaces/AVDI-OPTest-1-nic' under resource group 'ct-axxxxxxrg' was not found.
-
anashetty 1,145 Reputation points • Microsoft Vendor
2024-12-05T06:46:48.85+00:00 Hi Tang, Ken,
Thank you for providing information. I suggest filing a support case to investigate this matter further. The support team will be able to examine and assist with resolving the issue. If you don't have the ability to open a technical support ticket, please let me know and I can help you further with this. Here are the steps to raise support case: Azure support request https://azure.microsoft.com/en-in/support/create-ticket
-
Tang, Ken 0 Reputation points
2024-12-05T06:54:11.7066667+00:00 Dear anashetty,
I don't have ability to create a support ticket.
Sign in to comment