After I've broken the default user I created for VM, I wanted to reset password or create new user. I'm getting the following error:
Failed to restart the virtual machine 'vm'. Error: Cannot proceed with operation because resource xx-Pipeline-Agent/providers/Microsoft.Network/publicIPAddresses/xx-agent-ip'>xx-agent-ip used by resource /subscriptions/xxx/resourceGroups/xxx-Pipeline-Agent/providers/Microsoft.Network/networkInterfaces/xxx-agent442 is not in Succeeded state. Resource is in Failed state and the last operation that updated/is updating the resource is PutPublicIpAddressOperation.
I'm also trying to redeploy or restart the vm but Im getting the same error. Also I've tried this with no luck:
az network nic update --resource-group xx-Pipeline-Agent --name xx-agent442
How can I fix the state of NIC?
Try to go to Azure Resource Explorer, navigate to the path, subscriptions--->resourceGroups--->providers--->Microsoft.Network--->publicIPAddresses, find the failed public IP, click edit
and do a PUT
operation.
If it fails, you can check the error on the bottom, if its a success, you can check in the Azure portal whether the public IP address is in the succeeded state.
You could get more details about Azure Resource Explorer: a new tool to discover the Azure API