Jump to content

Steps to create a lab for classroom training/hackathons with Azure Lab Services


Recommended Posts

Guest rtripurani
Posted

This article is brought to you by the Nonprofit Tech Acceleration (NTA) for Black and African American Communities Program Technical Team. For information on how to take advantage of the granted offerings or free technical consultation, please visit: Supporting Black Community Nonprofits | Microsoft Nonprofits

 

 

 

Azure Lab Services is a cloud-based service that allows users to create and manage virtual machines for classroom or lab environments. It is a great tool for educators who want to teach a variety of courses without worrying about the costs and maintenance of physical equipment. It is a cost-effective solution that helps to simplify the creation, distribution, and management of lab environments, and provides an easy way to provide access to resources from anywhere in the world.

 

Azure Lab Services is a powerful tool that enables educators and instructors to create virtual computer labs for their students, providing them with the necessary software, configurations, and access to perform class-related activities. With Azure Lab Services, you can save time, reduce costs, and improve the learning experience for your students by eliminating the need to maintain on-premises lab environments.

 

In this article, we will guide you through the steps of using Azure Lab Services to conduct classes.

 

 

 

Step 1: Sign into Azure Account

 

Go to the Azure portal (Microsoft Azure) and sign in using your Azure credentials.

 

 

 

Step 2: Create a Lab Plan

 

You can create a lab by following these steps:

 

1. Search for "Azure Lab Services" and select it from the list of results.

 

 

 

largevv2px999.png.0dc8d63adbcdbb6826cd0492775d2433.png

 

2. Click on the "Create lab plan" button to start the creation process.

 

3. Fill in the required information in the Basics tab, such as the subscription, resource group, lab name, and region.

 

 

 

largevv2px999.jpg.9b8b9b19b7178d41f62d0e4a6e11afa2.jpg

 

4. If you do not plan to connect your new virtual machines to other existing virtual machines from your network, skip advanced networking options. Later, you can add a tag if you want (it is always a good idea to do so). Finally, Click on Review + Create and wait for the deployment to be completed.

 

Click on Go to resource and you will see some options to configure your labs.

 

largevv2px999.jpg.69760f2e6a04c08a41b003e6c99e283f.jpg

 

 

 

 

 

Step 3: Add Users to the Lab

 

 

 

To create or edit a lab in the Azure Lab Services website (https://labs.azure.com), your Azure account must be assigned the Lab Creator role in Azure AD. If you assign the Lab Creator role on the lab plan's resource group, the user can create labs for all lab plans in that resource group.

 

1. Click on Add lab creators to assign Role-Based Access Control (RBAC) to the Lab Creator.

 

In this article, the Lab Creator is added to the Lab Creator role f you need granular control check this out for a detailed description of the roles.

 

largevv2px999.jpg.b38c5571ee027cc4d5fde718ba3935b6.jpg

 

 

 

  1. From the Access control (IAM) page, select Add > Add role assignment.

 

 

 

largevv2px999.jpg.3b1a4184171a0f9d510e515f7fa1f10a.jpg

 

  1. On the Role tab, select the Lab Creator role.

 

largevv2px999.jpg.3921cdaad8319664d3808ccf632fa6fc.jpg

 

  1. On the Members tab, click in +Select member.

 

largevv2px999.jpg.aee3ff8dba730fed46dbb9ad77a79238.jpg

 

  1. Select the user you want to add to the Lab Creators role.

 

largevv2px999.jpg.c9a32169755766740ab60a78359bce17.jpg

 

 

 

  1. On the Review + assign tab, select Review + assign to assign the role.

 

largevv2px999.jpg.fddacaded4641b805079e627517f0393.jpg

 

 

 

  1. After you review and assign the role, this one will appear in the IAM panel.

 

largevv2px999.png.a92817ab19aafdd61fff4799200261d3.png

 

 

 

Step 4: Create a Lab

 

 

 

Most common use for this cloud service would be Classes and professional teaching. Imagine you are teaching a course to N number of students. Most likely, you would like to provide N Virtual Machines (one for each student) with the required software installed in every virtual machine and give each student a few hours to complete their homework.

 

A lab contains the configuration and settings for creating lab VMs. All lab VMs within a lab are identical. You use the Azure Lab Services website to create a lab in the lab plan. Follow these steps to add a lab to the lab plan you created earlier:

 

 

 

  1. Sign into the Azure Lab Services by using the credentials for your Azure subscription.
  2. Select Create lab.

 

largevv2px999.png.5a6340bff7099ec016ccbc6c369f211f.png

 

 

 

 

 

  1. On the New Lab page, First, you will need a lab name (this is not the lab plan name and is visible to your students) as you can have multiple labs in a single lab plan. Second, an image of the operating system (OS) (Linux or Windows), virtual machine size , location and then select Next.

 

largevv2px999.png.c87c80f57c8f34e6146dc0c0a5bb0b34.png

 

 

 

 

 

  1. On the Virtual machine credentials page, create a user for your template VM. Specify the default username and password. By default, all the lab VMs use the same credentials. You can create a non-admin account for the VMs, and you can opt to use that same password for all VMs or ask the user to create one immediately at his/her first login. And then select Next. Important: Make a note of username and password. They won't be shown again.

 

largevv2px999.png.44cfd2e17e5935815b66a084ff4ca6f7.png

 

 

 

  1. On the Lab policies page, you can set the number of hours that users can use their virtual machines outside of a scheduled event. This option could be useful for students who need some time to do the homework outside of class time. In the same step, you have some options to shut down the VMs automatically after user inactivity, after users have logged out or when a user did not log in. For now, let us leave the default values and select Next.

 

largevv2px999.png.3212e0fc0c4923689f499a5b7f2b0a3e.png

 

 

 

 

 

  1. On the Template virtual machine settings page, Azure Lab Services asks if you need to customize something else, if that is the case, then it will provide you a template VM where you can install everything you need. If that was not the case and you are ready to go with the selected OS image the process will be shorter as you will not customize the template VM. For this article, let us use The VM image can be created as-is, known as a templateless VM. Azure Lab Services also supports creating a template VM, which lets you make configuration changes or install software on top of the VM image. Keep the second option selected.

 

largevv2px999.png.25070a5c52587f5433ef4ff1c5f50a6d.png

 

 

 

 

 

  1. Select Finish to start the lab creation. It might take several minutes for the lab creation to finish.
  2. When the lab creation finishes, you can see the lab details in the Template page. You will be able to connect to your template VM over Remote Desktop Protocol (RDP). Initially, the VM will be stopped, you manage the template and the replicates directly from the Azure Lab Services Portal, not the Azure Portal.

 

largevv2px999.png.a243fceb1ea8f8a088a1a6087ec4558a.pngNotice at the top there is a button to publish. This one will be selected when the Lab Creator decides the VM has everything installed and is ready to be used by the students.

 

 

 

Publishing the lab

 

Before Azure Lab Services can create lab VMs for your lab, you first need to publish the lab. When you publish the lab, you need to specify the maximum number of lab VMs that Azure Lab Services creates. All VMs in the lab share the same configuration as the lab template. Let us say there are 5 students and each of them will use a VM.

 

To publish the lab and create lab VM’s:

 

  1. On the Template page, select Publish on the toolbar.
  2. On the Publish template page, enter 1 for the number of VMs, and then select Publish.

 

largevv2px999.png.8e1d97426db4bc3ea0bb79348b906cf8.png

 

 

 

  1. Wait until the publishing finishes. You can track the publishing status on the Template page.

 

largevv2px999.png.cd9f7606c9bc101cfa8600d08896cf71.png

 

 

 

  1. Once you have published the lab, the VM will be visible in the Virtual Machine pool. Confirm that there's one lab VM, named Unassigned, that is in the Stopped state.

 

 

 

largevv2px999.png.8f49765e5797c4d529d69bfe4d1d975d.png

 

 

 

 

 

 

 

Step 5: Start and connect to lab VM

 

Start the VM and connect as you would do with other VMs, log in with the username and password you have previously created, and you are ready to go!

 

  1. On the Virtual machine pool page, toggle the lab VM State, and then select Start to start the lab VM. Starting the lab VM can take a few minutes.

 

largevv2px999.png.dfb564c3b164b550cd39b5d7bd0c974a.png

 

 

 

 

 

largevv2px999.png.2f2955a1dd629784e4bc68ddf0fba926.png

 

 

 

largevv2px999.png.1f7b2e7d822bbb76e2a8ffc16d904173.png

 

 

 

  1. When the lab VM is in the Running state, select the Connect icon to download the remote desktop connection file to your computer.

 

largevv2px999.png.43f4b1f366f06e6044bf574337d0a6b6.png

 

 

 

  1. A remote desktop connection file will be downloaded. Open the downloaded file to connect to the lab VM.

 

largevv2px999.thumb.png.1bba154712cf46b87eab174f9ef69475.png

 

 

 

  1. Use the credentials you specified when you created the lab previously to sign in to the VM.

 

largevv2px999.png.811a2d246d42043accf4e168e6350e10.png

 

 

 

  1. Click Yes on the security certificate to verify the remote connection.

 

largevv2px999.png.e045840a3b14f4ca10e4950d905ee959.png

 

 

 

  1. Your VM is now connected! You can now explore and experiment within the lab virtual machine.

 

largevv2px999.thumb.png.67080d41f76cb4d37cfc03c0e0c2b8fb.png

 

 

 

 

 

Step 6: Add Users to the Lab

 

 

 

By default, Azure Lab Services restricts access to a lab. Only listed users can register for a lab and use a lab VM. Optionally, you can turn off restricted access.

 

To allow access for users to a lab, perform the following steps:

 

  1. Add the users to the lab.
  2. Invite the users to lab by providing them with a registration link.

 

 

 

Add users to the lab

 

Azure Lab Services supports multiple ways to add users to a lab:

 

  • Manually by entering an email address.
  • Upload a CSV file with student information.
  • Sync the lab with an Azure Active Directory group.

 

In this article, let’s manually add the users by providing their email address. Follow these steps to add the users:

 

  1. Select the Users page for the lab and select Add users manually.

 

largevv2px999.png.f0070af93fd8e14aa6c5109dc86241bc.png

 

 

 

  1. On the Add users page, enter the lab user email addresses on separate lines or on a single line separated by semicolons.

 

largevv2px999.png.44654075c197e2aa1e0b589086088e6d.png

 

 

 

  1. Select Add to add the users and grant them access to the lab.

 

You've now added users to the lab. On the Users page, you can see that their status is Not registered. You can now invite these users to the lab by sending them a registration link or invite them by email. You can also customize a message in the email and include the link to join.

 

 

 

To send invitation emails

 

  1. On the Users page for the lab, select Invite all on the toolbar.
  2. On the Send invitation by email page, enter an optional message, and then select Send. The email automatically includes the registration link. You can also get this registration link by selecting ... (ellipsis) > Registration link on the toolbar.

 

largevv2px999.png.c8c0f98edecf762e2390eb9d6a68c9cf.png

 

 

 

 

 

  1. You can track the status of the invitation in the Users list. The status should change to Sending and then to Sent on <date>.

 

largevv2px999.png.bd0aee789e95df9c06fc8667592ccc9e.png

 

 

 

  1. The email that is sent to the student looks like the below picture.

 

largevv2px999.png.979bfa4c3f97ef2bff39cc8404100d6a.png

 

 

 

  1. Once the user has accepted the invitation, the Status will change in the portal.

 

largevv2px999.png.48191608be30d859c92c1d7d886a8240.png

 

 

 

A list of the VMs to which he/she has access is displayed in picture.

 

largevv2px999.png.711e4d0326b3381a1d56aeee77350755.png

 

 

 

Step 7: Schedule a class / event

 

Now you can schedule the class so that the users do not spend the allowed time outside of events (i.e., 2 hours for this example)

 

Follow these steps to add a recurring schedule to your lab:

 

  1. On the Schedule page for the lab, select Add scheduled event on the toolbar.
  2. On the Add scheduled event page , add the information.

 

largevv2px999.png.dd89381548b8860034ada89f8c2296bb.png

 

 

 

  1. Select Save to confirm the lab schedule.
  2. In the calendar view, confirm that the scheduled event is present.

 

largevv2px999.png.11ac050e604203b92fb3ec9d6bd02559.png

 

 

 

 

 

There is also a dashboard where you have information about the lab. If you need to make changes to the template VM you need to republish it, but all VMs will be replaced again.

 

largevv2px999.png.b272a2ddb52098300ce9ee09d3aa89ec.png

 

 

 

 

 

That’s, it! You have everything you need to start your classes for the training as all the tools that were installed in the template VM are already there in each VM. Now, these VMs are different from each other. Thereby, each student has its own development environment.

 

 

 

Conclusion:

 

Azure Lab Services is a powerful tool that makes it easy for educators to create and manage virtual lab environments. By following the steps outlined in this tutorial, you can create a lab, add users, and start conducting classes quickly and easily. Whether you are teaching computer science, engineering, or any other technical subject, Azure Lab Services can help you create a high-quality learning experience for your students.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...