Hello Brett Hamill,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are unable to delete Azure VM secondary IP using Azure Cloud Shell without any reasonable error.
Kindly not just stop or pause the VM, shut it down.
The run these commands:
- Make sure the VM is shut down before you attempt this, meaning that VM is stopped and deallocated before attempting to delete the NIC configuration.
az network nic ip-config delete --resource-group GNAC-Deb-Svr_group --nic-name gnac-policysvr-deb-sec10_z1 --name HA-Virtual-IP
- If deletion fails, you can try updating the NIC to remove the IP configuration:
az network nic ip-config update --resource-group GNAC-Deb-Svr_group --nic-name gnac-policysvr-deb-sec10_z1 --name HA-Virtual-IP --remove ipConfigurations
- You need to be sure that the
--remove
parameter correctly matches the IP configuration name.
NOTE:
- If the DELETE command does not return errors but does not delete the configuration, it might be useful to verify if the operation was successful.
- If the command still doesn’t work, check if there are any errors or additional details returned
- If CLI commands are failing, you can try using the Azure Portal
Accept Answer
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam