How To: Install SQL Server on an Azure VM


January 29, 2018 by Kenneth Fisher

Last month I demonstrated creating an Azure VM with SQL installed using one of the default templates. While this is a very easy way to stand up a SQL Server very quickly there are some downsides. Specifically, you have very few install options. For the most part, you can make changes after the fact but some things, like instance name, can’t be changed only set during install.

A simple solution is to create a VM and then install SQL after the fact.

First, you create a VM. I’m creating a windows VM here, but you could just as easily create a Linux server if you are using SQL 2017 +. I’m also using the Azure portal, which is great for a single VM. If you are going to be creating more than one or two you will probably want to set up a template and do it programmatically.

Next is the tricky part. You need to get install media. In my case, I downloaded it from my MSDN account directly onto my VM, but you could just as easily use something like AZCopy to transfer the files. You can also create a disk, copy the media to it, then you could re-use that disk on as many VMs as you need.

Once the media is available it’s a completely standard install.

3 thoughts on “How To: Install SQL Server on an Azure VM

  1. Hi,
    I have done this exercise but I am facing issue to connecting the SQL database using SSMS from other system. The both server and other system on the same domain and using same network.
    But it is showing the following error while connecting from SSMS –

    TITLE: Connect to Server

    Cannot connect to ea-dev4\solace.


    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

    For help, click:


    Please help

    • You say SSMS is on a machine that is on the same network/domain. By that do you mean the SSMS machine is also in the cloud? Or is it on premisis? That said you might look into a firewall issue. That’s been my most common problem.

  2. Sidney says:

    Hi Kenneth,

    Thanks for that video. It was very helpful. I was hoping to see how you specified the data & tempdb directories. I didn’t see this in the video. Did you use the local drive on the Azure VM, pointed to on-prem or something else?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,755 other subscribers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: