Set up a lab to teach a networking class
This article shows you how to set up a class that focuses on allowing students to emulate, configure, test, and troubleshoot virtual and real networks using GNS3 software.
This article has two main sections. The first section covers how to create the lab. The second section covers how to create the template machine with nested virtualization enabled and with GNS3 installed and configured.
To set up this lab, you need access to an Azure subscription. Discuss with your organization's administrator to see if you can get access to an existing Azure subscription. If you don't have an Azure subscription, create a free account before you begin.
Once you have an Azure subscription, you can create a new lab plan in Azure Lab Services. For more information about creating a new lab plan, see Tutorial: Set up a lab plan with Azure Lab Services. You can also use an existing lab plan.
For instructions on how to create a lab, see Tutorial: Set up a lab. Use the following settings when creating the lab.
|Virtual machine (VM) size||Medium (Nested Virtualization)|
|VM image||Windows 10 Pro, Version 1909|
Template machine configuration
Once you create a lab, a template VM will be created based on the virtual machine size and image you chose. You configure the template VM with everything you want to provide to your students for this class. For more information, see Create and manage a template in Azure Lab Services.
To configure the template VM, we'll complete the following major tasks.
- Prepare the template machine for nested virtualization.
- Install GNS3.
- Create nested GNS3 VM in Hyper-V.
- Configure GNS3 to use Windows Hyper-V VM.
- Add appropriate appliances.
- Publish template.
Prepare template machine for nested virtualization
Follow instructions to enable nested virtualization to prepare your template virtual machine for nested virtualization.
- Follow the instructions for installing GNS3 on Windows. Make sure to include installing the GNS3 VM in the component dialog, see below.
Eventually you'll reach the GNS3 VM selection. Make sure to select the Hyper-V option.
This option will download the PowerShell script and VHD files to create the GNS3 VM in the Hyper-V manager. Continue installation using the default values.
Once the setup is complete, don't start GNS3.
Create GNS3 VM
Once the setup has completed, a zip file "GNS3.VM.Hyper-V.2.2.17.zip" is downloaded to the same folder as the installation file, containing the drives and the PowerShell script to create the Hyper-V vm.
- Extract all on the GNS3.VM.Hyper-V.2.2.17.zip. This action will extract out the drives and the PowerShell script to create the VM.
- Run with PowerShell on the "create-vm.ps1" PowerShell script by right-clicking on the file.
- An Execution Policy Change request may show up. Enter "Y" to execute the script.
- Once the script has completed, you can confirm the VM "GNS3 VM" has been created in the Hyper-V Manager.
Configure GNS3 to use Hyper-V VM
Now that GNS3 is installed and the GNS3 VM is added, start up GNS3 to link the two together. The GNS3 Setup wizard will start automatically..
- Use the Run appliances from virtual machine option. Use the defaults for the rest of the wizard until you hit the VMware vmrun tool cannot be found error.
- Choose Ok, and Cancel out of the wizard.
- To complete the connection to the Hyper-V vm, open the Edit -> Preferences -> GNS3 VM and select Enable the GNS3 VM and select the Hyper-V option.
Add appropriate appliances
At this point, you'll want to add the appropriate appliances for the class.
Prepare to publish template
Now that the template VM is set up properly, and ready for publishing there are a few key points to check.
- Make sure that the GNS3 VM is shut down or turned off. Publishing while the VM is still running will corrupt the VM.
- Close down GNS3, publishing while and running can lead to unintended side effects.
- Clean up any installation files or other unnecessary files.
Publishing while the VM is still running will corrupt the template VMs and create unusable lab VMs.
If you would like to estimate the cost of this lab, you can use the following example:
For a class of 25 students with 20 hours of scheduled class time and 10 hours of quota for homework or assignments, the price for the lab would be:
25 students * (20 + 10) hours * 84 Lab Units * 0.01 USD per hour = 630 USD.
Cost estimate is for example purposes only. For current details on pricing, see Azure Lab Services Pricing.
This article walked you through the steps to create a lab for network configuration using GNS3.
The template image can now be published to the lab. For more information, see Publish the template VM.
As you set up your lab, see the following articles: