Reset the network interface for Azure Linux VM

Applies to: ✔️ Linux VMs

This article shows how to reset the network interface for Azure Linux Virtual Machine (VM) to resolve issues when you can't connect to an Azure Linux VM after:

  • You disable the default network interface (NIC).
  • You manually set a static IP for the NIC.

The following article also introduces how to view and change settings for a NIC, which might help you:

Create, change, or delete a network interface

If your Azure issue is not addressed in this article, visit the Azure forums on MSDN and Stack Overflow. You can post your issue in these forums, or post to @AzureSupport on Twitter. You also can submit an Azure support request. To submit a support request, on the Azure support page, select Get support.

Reset the NIC using Azure portal, Azure PowerShell or Azure CLI

Note

We recommend using the az vm repair reset-nic command to reset the NIC. To run this command, see the following "Azure CLI" tab.

  1. Go to the Azure portal.

  2. Select the affected Virtual Machine.

  3. Select Networking and then select the network interface of the VM.

    Screenshot of the Network Interface VM selection under Networking.

  4. Select IP configurations.

  5. Select the IP.

  6. If the Private IP assignment isn't set to Static, change it to Static.

  7. Change the IP address to another IP address that is available in the Subnet.

  8. The virtual machine restarts to initialize the new NIC to the system.

  9. Try to sign in to your machine using secure shell (SSH). If successful, you can change the Private IP address back to the original if you would like. Otherwise, you can keep it.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.