Azure VM Nic With Loopback Address and No Connectivity - azure

we have a vm which is in Azure but we're not able to connect to it. I checked the serial log under boot diagnostic and it has the following error:
======== Microsoft Azure VM Health Report - Start 2020-02-19T20:50:47.2786733Z ========
{"reportTime":"2020-02-19T20:47:44.9492172Z","networkAdapters":[{"name":"Loopback
Pseudo-Interface
1","status":"Up","macAddress":"","ipProperties":[{"protocolVersion":4,"address":"127.0.0.1","isDhcpEnabled":false},{"protocolVersion":6,"address":"::1","isDhcpEnabled":false}]}],"remoteAccess":null,"accounts":{"windows":{"adminAccountPasswordExpired":false,"adminAccountDisabled":false}},"services":[{"errorControl":"Normal","exitCode":0,"name":"TermService","processId":2708,"serviceType":"Share
Process","startMode":"Auto","startName":"NT
Authority\NetworkService","state":"Running","status":"OK"}
The key part I think is the "name":"Loopback Pseudo-Interface 1"It has no mac address as above and uses IP of 127.0.0.1, Has anyone come across this before and know how to get the NIC to be recognised. I've changed the NIC and changed IP, but cannot seem to resolve this.

By default, 127.0.0.1 is assigned to a loopback interface. It represents the localhost address. The captured health report is meanless and not enough to identify why you are not able to connect to that Azure VM.
First, you can verify if the VM status is running on the overview of the virtual machine portal. Then check if there is any port blocking in the NSG on the networking of VM, then try to RDP or SSH to that Azure VM. You can get more details on diagnose and solve problems under overview.
If you still could not connect to it. Try to resize or redeploy your Azure VM. If you have important data, please backup your OS and data disk before you redeploy it. You also could get more details on how to use boot diagnostics to troubleshoot virtual machines in Azure.
Hope this could help you.

Related

Azure Connection SSH and RDP

i'm using the portal : https://portal.azure.com, and log in with your Azure account.
I made 2 VM one Windows and other Linux.
But when i want to open them with RDP (win2016) and SSH (linux) with the Key Public/Private made correctly (puttyGen, Putty) i can't run them.
What i have to understand.
I'm connected on public wireless (SSID MacDonald or SSID Airport), my VM IP are founded with :
Get-AzNetworkInterfaceIpConfig
i set a Static IP from the Configuration NetWorking of my VM (Linux and Windows).
But what i can do to resolde this issue that i can't connect on my VM, with RDP or SSH ?
thank you
I think more info will be needed for someone to be helpful here.
first wall, what error message did you get when you try to connect using RDP or SSH?
did you allow RDP or SSH port when you create these VMs? These can be checked in VM settings page on the Azure portal. below is a screenshot of my Linux VM, for your reference:
update:
I'm not allowed to comment at the moment, so I'm posting my response to the additional info here.
if you're able to connect to the VMs using another connection, it means things work as expected on these VMs. Most likely the wireless connection you mentioned blocks outgoing RDP or SSH traffic. check with its admin on that.

Azure Windows VM - RDP issues

I currently need to run some windows-specific software for part of a workflow, and I can't run it on my personal computer.
I have got the free account at Azure, so I thought I would use the remote windows machine. I created the VM, and I can see the login screen on Boot Diagnostics.
However, I can't connect to RDP. Tried several issues and solutions (all provided on Azure docs), to no avail.
A few steps I already did:
Checked network configs. Tried different external ports for RDP (if somehow the RDP port could be blocked somewhere). I also tried basic configuration, advanced configuration.
Re-created the external IP's. The machine can't be pinged, and I don't seem to be able to trace routes for them.
Re-deployed the machine, deleted and created a new machine.
Switched and tried different Linux RDP connectors, and even used a friends Windows computer to try to connect, to no avail.
I could gladly use any help troubleshooting this.
My machine is currently running Linux Mint, on the eduroam Wifi networks.
Thanks in advance, and feel free to ask for any additional information or configuration.
Properly, you could check if the RDP port is blocked on NSG(vm nic level or subnet level NSG), you could follow this to open the port.
Also, you could verify if the networking connectivity issue from your local computer to Azure following by Using Telnet to Test Port 3389 Functionality. For example, run telnet VMpublicIP 3389 in CMD as the administrator account.
If the RDP port is already enabled in NSG, see Troubleshoot an RDP general error in Azure VM and Troubleshoot Azure VM RDP connection issues by Event ID
Tried on another network and it worked. It seems eduroam blocks RDP even when it is on other ports.

Cannot SSH access Azure VM after persitenly mount File Share(storage account)

I've got an issue: after I create a persistent mount point following instructions in https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux and rebooting my VM, I cannot SSH access my VM, any idea to fix?
It looks like this could be a two way issue, a VM credential issue, or a problem from the node you are using to connect to the VM. This article refers to how to troubleshoot the VM side on Azure: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/troubleshoot-rdp-connection
TLDR from the link:
Quick troubleshooting steps
After each troubleshooting step, try reconnecting to the VM:
Reset Remote Desktop configuration.
Check Network Security Group rules / Cloud Services endpoints.
Review VM console logs.
Reset the NIC for the VM.
Check the VM Resource Health.
Reset your VM password.
Restart your VM.
Redeploy your VM.
I'd suggest also trying to ssh from/to different nodes to check where the problem is, VM or starting point.

Cannot migrate Azure VMs from Classic to ARM: RoleStateUnknown

I have successfully used this recipe in the past to migrate a virtual network including attached VMs: https://learn.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-cli-migration-classic-resource-manager
But today, and also when I tried last week, no matter the number of reboots, I get this error (Azure CLI):
> azure network vnet prepare-migration "<RG-NAME>"
info: Executing command network vnet prepare-migration
error: BadRequest : Migration is not allowed for HostedService
<CLOUD-SERVICE> because it has VM <VM-NAME> in State :
RoleStateUnknown. Migration is allowed only when the VM is in one of the
following states - Running, Stopped, Stopped Deallocated.
The VM is in fact running smoothly, and so says the Azure portal.
So any ideas how to get out of this mess?
Have you edited the NSG or local firewall of the VM? Please do not restrict the outbound traffic from the VM. It may break the VM Agent.
Also, please check if the VM Agent is running properly. If the VM Agent is not reachable, this issue may occur.
==============================================================================
Only issue is that I don't seem to be able to moved the Reserve IP to my new load balancer.
If we migrate the cloud service with a preserved public IP address, this public IP address will be migrated to ARM and be assigned to a load balancer automatically. (The load balancer is auto-created.) Then, you are able to re-assign this static public IP address to your load balancer.
Here is the screenshot of my lab:
Before the migration
After the migration
I can re-associate the IP with new load balancer after I delete the auto-created one.

Azure VMs Virtual Network inter-communication

I'm new to Azure (strike 1) and totally suck at networking (strike 2).
Nevertheless, I've got two VMs up and running in the same virtual network; one will act as a web server and the other will act as a SQL database server.
While I can see that their internal IP addresses are both in the same network I'm unable to verify that the machines can communicate with each other and am sort of confused regarding the appropriate place to address this.
Microsoft's own documentation says
All virtual machines that you create in Windows Azure can
automatically communicate using a private network channel with other
virtual machines in the same cloud service or virtual network.
However, you need to add an endpoint to a machine for other resources
on the Internet or other virtual networks to communicate with it. You
can associate specific ports and a protocol to endpoints. Resources
can connect to an endpoint by using a protocol of TCP or UDP. The TCP
protocol includes HTTP and HTTPS communication.
So why can't the machines at least ping each other via internal IPs? Is it Windows Firewall getting in the way? I'm starting to wonder if I've chose the wrong approach for a simple web server/database server setup. Please forgive my ignorance. Any help would be greatly appreciated.
If both the machines are in the same Virtual Network, then just turn off Windows Firewall and they will be able to ping each other. Other way is to just allow all incoming ICMP traffic in Windows Firewall with Advanced Settings.
However there is a trick. Both the machines will see each other by IP Addresses, but there will be no name resolution in so defined Virtual Network. Meaning that you won't be able to ping by name, but only by direct IP address. So, if want your Website (on VM1) to connect to SQL Server (on VM2), you have to address it by full IP Address, not machine name.
The only way to make name resolution within a Virtual Network is to use a dedicated DNS server, which you maintain and configure on-premises.
This article describes in details name resolution scenarios in Windows Azure. Your particular case is this:
Name resolution between virtual machines and role instances located in
the same virtual network, but different cloud services
You could potentially achieve name resolution, if you put your VMs is same cloud service. Thus you will not even require dedicated virtual network.
If your VMs are inside a Virtual Network in Azure, then you have to make sure two things.
Required Port is enabled.
Firewall is disabled on the server.
I was trying to connect to one VM where SQL Server DB was installed, from another VM. I Had to enable 1433 port in the VM where SQL was installed. For this you need to add an MSSQL endpoint to the VM on the azure management portal. After that i disabled windows firewall. Then i was able to connect to the VM from another.

Resources