Azure provides Linux virtual machine images that have SQL Server 2017 CTP 2.0 installed. This topic provides a short walkthrough on how to use the Azure portal to create a Linux SQL Server virtual machine.
Create a Linux VM with SQL Server installed
Open the Azure portal.
Click New on the left.
In the New blade, click Compute.
Click See All next to the Featured Apps heading.
In the search box, type SQL Server 2017, and press Enter to start the search.
This filter shows the available Linux virtual machine image(s) for SQL Server 2017. Over time, SQL Server 2017 images for other supported Linux distributions will be listed. You can also click this link to go directly to the search results for SQL Server 2017.
Select a SQL Server 2017 image from the search results.
On the Basics blade, fill in the details for your Linux VM.
You have the choice of using an SSH public key or a Password for authentication. SSH is more secure. For instructions on how to generate an SSH key, see Create SSH keys on Linux and Mac for Linux VMs in Azure.
On the Size blade, choose a machine size. For development and functional testing, we recommend a VM size of DS2 or higher. For performance testing, use DS13 or higher.
To see other sizes, select View all. For more information about VM machine sizes, see Linux VM sizes.
On the Settings blade, you can make changes to the settings or keep the default settings.
On the Summary page, click OK to create the VM.
The Azure VM pre-configures the firewall to open the SQL Server port 1433 for remote connections. But to remotely connect, you also need to add a network security group rule as described in the next section.
To be able to remotely connect to SQL Server on an Azure VM, you must configure an inbound rule on the network security group. The rule allows traffic on the port on which SQL Server listens (default of 1433). The following steps show how to use the Azure portal for this step.
In the portal, select Virtual machines, and then select your SQL Server VM.
In the list of properties, select Network interfaces.
Then select the Network Interface for your VM.
Click the Network security group link.
In the properties of the Network Security Group, selct Inbound security rules.
Click the +Add button.
Provide a Name of "SQLServerRemoteConnections".
In the Service list, select MS SQL.
Click OK to save the rule for your VM.
If you already use a BASH shell, connect to the Azure VM using the ssh command. In the following command, replace the VM user name and IP address to connect to your Linux VM.
ssh -l AzureAdmin 100.55.555.555
You can find the IP address of your VM in the Azure portal.
If you are running on Windows and do not have a BASH shell, you can install an SSH client, such as PuTTY.
On the PuTTY configuration screen enter your VM's public IP address.
Click Open and enter your username and password at the prompts.
For more information about connecting to Linux VMs, see Create a Linux VM on Azure using the Portal.
Configure SQL Server
After connecting to your Linux VM, open a new command terminal.
Set up SQL Server with the following command.
Accept the License and enter a password for the system administrator account. You can start the server when prompted.
Optionally, install the SQL Server Tools.
Now that you have a SQL Server 2017 virtual machine in Azure, you can connect locally and run a test query.
If you configured the Azure VM for remote SQL Server connections, you should also be able to connect remotely. For an example of connecting to SQL Server on Linux from a remote Windows machine, see Use SSMS on Windows to connect to SQL Server on Linux.
For more general information about Linux virtual machines in Azure, see the Linux Virtual Machine Documentation.