Azure – It is possible to establish a VM-to-VM connection between Azure virtual machines

azurenetworkingvirtual-machines

How should I create and configure Azure virtual machines to allow VM-to-VM connections?

  • It is possible to connect using the private ip?
  • Do I need a Azure Virtual Network?

Basically I need to run some applications on each VM that need to talk to the other instances on the same azure subscription using TCP connection.

For now the only solution that I have found is to add the required endpoints and access the virtual machine using its public ip. There isn't a way to connect using the private ip? In this way it should be faster and with slow latency right?

thanks

Best Answer

VMs in the same Cloud Service can connect to each-other out of the box. You can connect to a VM in the same Cloud Service via its hostname.

Please see here for a detailed description.

So all you need to do is to make sure that your VMs are in the same Cloud Service.