How to connect an on premesis program to a SQL Server in an Azure Lab VM

Bill D'Angelo 20 Reputation points
2024-01-18T19:54:11.58+00:00

Hi all, I am trying to set up my classroom that requires a desktop app and hardware, but the machines are not powerful enough to run some of the back end infrastructure (SQL, IIS mostly) for students to learn independently. I am trying to get the desktop application to talk to the SQL server on an Azure Lab VM (which would also reduce the reset time between classes). Thus far we have not been able to make the SQL Server on the VM visible to the desktop environments. Has anyone achieved this? If so, any suggestions? Thank you for reading and responding.

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
279 questions
{count} votes

Accepted answer
  1. deherman-MSFT 33,456 Reputation points Microsoft Employee
    2024-01-22T19:49:22.88+00:00

    @Bill D'Angelo
    Azure Lab Services has inbound port restrictions and is really only made to be accessible through SSH or RDP. Trying to access the SQL services on the Lab Services VMs from on premises is not something that is currently supported. If you were able to run the desktop services also in the same or separate lab this should be supported.

    For alternatives, you could have a single SQL Server and IIS VM that is outside of Lab Services, then provide connection instructions for the students. You could easily keep this VM available and just stop/start it as needed or you could create an image and then template of the server so you can easily recreate it. If you went the template route you could have each student launch from the template and they would have their own server to work with.

    Azure for Students is a program offered by Microsoft Azure to provide students at Higher Education Institutions with access to various Azure cloud services and resources. Joining Azure for Students will grant you $100 in Azure credits with no credit card required. This credit will be valid for one year and you can renew each year you're an active student to get an addition $100. You also receive access to a set of free services you can deploy once you join. Select versions of Azure Virtual Machines, Azure SQL Databases, Azure Blob Storage and more are all free with your subscription. Hope this better answers your questions. Let me know if you still need assistance or have further questions.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts. If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A! User's image

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. CosmogHong-MSFT 23,016 Reputation points Microsoft Vendor
    2024-01-19T03:13:07.5+00:00

    Hi @Bill D'Angelo

    Not an expert on Azure VM, but you might try set up a hybrid connection.

    Referring from this similar thread: How to access to on premise SQL server from an Azure VM.

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.