question

SaurabhVyas-6461 avatar image
0 Votes"
SaurabhVyas-6461 asked AlanKinane commented

Establishment of connection between 2 VMs from different subnets

I want to access the DB server of azure VM 1 ( situated on a subnet 1, resource group 1 ) from azure VM 2 (located on a subnet 2, resource group 2 ), what appropriate steps should I take?

azure-virtual-machinesazure-virtual-network
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you provide more information? I'm assuming you want to connect privately but are these VMs on the same virtual network and just different subnets or have you deployed these two VMs to different VNETs? Can you RDP from VM2 to VM1 currently or is it just a SQL connectivity issue?

0 Votes 0 ·

1 Answer

pituach avatar image
0 Votes"
pituach answered SaurabhVyas-6461 commented

Assuming that both virtual machine has a public network (which they have if you connect to them directly from your local machine) then the simplest option is to use the connection string to remote server. It is not important if the VM is on azure or not for that step.

Obviously you will need to open the network firewall port according to the port that your database server use

You did not provided any information about which database you use, so we cannot provide the exact implementation of the request

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am using sql server 2019

0 Votes 0 ·