title | description | ms.topic | ms.date | ms.custom |
---|---|---|---|---|
Azure Lab Services Quickstart - Create a lab using Bicep |
In this quickstart, you learn how to create an Azure Lab Services lab using Bicep |
quickstart |
05/23/2022 |
template-quickstart |
In this quickstart, you, as the educator, create a lab using a Bicep file. For detailed overview of Azure Lab Services, see An introduction to Azure Lab Services.
[!INCLUDE About Bicep]
If you don't have an Azure subscription, create a free account before you begin.
The Bicep file used in this quickstart is from Azure Quickstart Templates.
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.labservices/lab/main.bicep":::
-
Save the Bicep file as main.bicep to your local computer.
-
Deploy the Bicep file using either Azure CLI or Azure PowerShell.
az group create --name exampleRG --location eastus az deployment group create --resource-group exampleRG --template-file main.bicep --parameters adminUsername=<admin-username>
New-AzResourceGroup -Name exampleRG -Location eastus New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -adminUsername "<admin-username>"
Note
Replace <admin-username> with a unique username. You'll also be prompted to enter adminPassword. The minimum password length is 12 characters.
When the deployment finishes, you should see a messaged indicating the deployment succeeded.
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
az resource list --resource-group exampleRG
Get-AzResource -ResourceGroupName exampleRG
When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the VM and all of the resources in the resource group.
az group delete --name exampleRG
Remove-AzResourceGroup -Name exampleRG
In this quickstart, you deployed a simple virtual machine using a Bicep file. To learn more about Azure virtual machines, continue to the tutorial for Linux VMs.
[!div class="nextstepaction"] Configure a template VM