-
Ensure that you are logged in to your Windows 10 Virtual Machine using the following credentials:
-
Username: Admin
-
Password: Pa55w.rd
-
-
Observe the Taskbar located at the bottom of your Windows 10 desktop. The Taskbar contains the icons for the common applications we will use in the labs:
-
Microsoft Edge
-
File Explorer
-
Bash on Ubuntu on Windows
-
Windows PowerShell
-
Microsoft Word 2016
Note: You can also find shortcuts to these applications on the Desktop and in the Start Menu.
-
-
On the Taskbar, click the Microsoft Edge icon.
-
In the open browser window, navigate to the Azure Portal (https://portal.azure.com).
-
Enter the email address of your Microsoft account.
-
Click the Next button.
-
Enter the password for your Microsoft account.
-
Click the Sign in button.
-
At the top of the portal, click the Cloud Shell icon to open a new shell instance.
-
In the Cloud Shell command prompt at the bottom of the portal, type in the following command and press Enter to create a new resource group:
az group create --name MOD06VMDK --location eastus -
Type in the following command and press Enter to show the details of your resource group:
az group show --name MOD06VMDK
-
Type in the following command and press Enter to create a new Virtual Network:
az network vnet create --resource-group MOD06VMDK --name ComputeNetwork --location eastus -
Type in the following command and press Enter to view your new Virtual Network in the list of networks using this command:
az network vnet list -
Type in the following command and press Enter to get a list of ids for Virtual Networks in your subscription:
az network vnet list --query [*].{AzureId:id} --out tsv -
Type in the following command and press Enter to create a new Subnet:
az network vnet subnet create --resource-group MOD06VMDK --name ComputeSubnet --vnet-name ComputeNetwork --address-prefix 10.0.1.0/24 -
Type in the following command and press Enter to view a list of Subnets associated with your Virtual Network:
az network vnet subnet list --resource-group MOD06VMDK --vnet-name ComputeNetwork -
Type in the following command and press Enter to show the details of your newly created Subnet:
az network vnet subnet show --resource-group MOD06VMDK --vnet-name ComputeNetwork --name ComputeSubnet
-
Type in the following command and press Enter to create a new Public IP Address:
az network public-ip create --resource-group MOD06VMDK --name ComputePIP --location eastus --allocation-method Dynamic -
Type in the following command and press Enter to view a list of all Public IP Addresses in your subscription:
az network public-ip list
-
Type in the following command and press Enter to create a new Network Security Group:
az network nsg create --resource-group MOD06VMDK --name ComputeNSG --location eastus -
Type in the following command and press Enter to view a list of all Network Security Groups in your subscription:
az network nsg list -
Type in the following command and press Enter to create a new Network Security Group Rule:
az network nsg rule create --resource-group MOD06VMDK --nsg-name ComputeNSG --name ComputeRule --access Allow --protocol Tcp --direction Inbound --priority 100 --source-address-prefix Internet --source-port-range "*" --destination-address-prefix "*" --destination-port-range 3389 -
Type in the following command and press Enter to view a list of Rules associated with your Network Security Group:
az network nsg rule list --resource-group MOD06VMDK --nsg-name ComputeNSG
-
Type in the following command and press Enter to create a new Network Interface Card:
az network nic create --resource-group MOD06VMDK --name ComputeNIC --location eastus --subnet ComputeSubnet --vnet-name ComputeNetwork -
Type in the following command and press Enter to view the details of your newly created Network Interface Card:
az network nic show --resource-group MOD06VMDK --name ComputeNIC -
Type in the following command and press Enter to update the Network Interface Card by applying a Network Security Group:
az network nic update --resource-group MOD06VMDK --name ComputeNIC --network-security-group ComputeNSG -
Type in the following command and press Enter to bind a Public IP Address to the Network Interface Card:
az network nic ip-config create --resource-group MOD06VMDK --name ComputeConfig --nic-name ComputeNIC --public-ip-address ComputePIP -
Type in the following command and press Enter to view the updated details of your Network Interface Card:
az network nic show --resource-group MOD06VMDK --name ComputeNIC -
Type in the following command and press Enter to view a list of Public IP Addresses bound to the Network Interface Card:
az network nic ip-config list --resource-group MOD06VMDK --nic-name ComputeNIC -
Type in the following command and press Enter to view a table showing all resources in your Resource Group:
az resource list --resource-group MOD06VMDK --query "[*].{Name:name, ReferenceUri:id}" --out table -
Record the unique Id and name for each of the four resources you created within the MOD06VMDK Resource Group.
-
Close the Cloud Shell prompt at the bottom of the portal.
Review: In this exercise, you created a Public IP Address, Network Interface Card, Network Security Group and Virtual Network for use with a Virtual Machine.
-
On the left side of the portal, click the Create a resource link.
-
At the top of the New blade, locate the Search the Marketplace field.
-
Enter the text Template Deployment into the search field and press Enter.
-
In the Everything search results blade, select the Template deployment result.
-
In the Template deployment blade, click the Create button.
-
In the Custom deployment blade, click the Build your own template in the editor link.
-
In the Edit template blade, click the Load file link.
-
In the Open file dialog that appears, navigate to the Allfiles (F):\Mod06\Labfiles\Starter folder.
-
Select the storageaccount.json file.
-
Click the Open button.
-
Back in the Edit template blade, click the Save button to persist the template.
-
Back in the Custom deployment blade, perform the following actions:
a. Leave the Subscription field set to it's default value.
a. In the Resource group section, select the Use Existing option.
a. In the Resource group section, locate the list and select the value MOD06VMDK option.
a. In the Network Interface Card Id field, enter the referenceUri you recorded of the Network Interface Card named ComputeNIC created earlier in this lab.
a. In the Terms and Conditions section, select the I agree to the terms and conditions stated above checkbox.
a. Click the Purchase button.
-
Wait for the creation task to complete before moving on with this lab.
Review: In this exercise, you deployed an ARM template that used the existing networking resources when creating a VM while maintaining the VM's hard disk as a separately managed resource.
-
On the left side of the portal, click the Resource groups link.
-
In the Resource groups blade, locate and select the MOD06VMDK Resource Group link.
-
In the MOD06VMDK blade, select the Virtual Machine you recently created.
-
In the Virtual machine blade, click the Delete button at the top of the blade.
-
In the confirmation dialog, click the Yes button.
-
Wait for the deletion task to complete before moving on with this lab.
-
On the left side of the portal, click the Create a resource link.
-
At the top of the New blade, locate the Search the Marketplace field.
-
Enter the text Template Deployment into the search field and press Enter.
-
In the Everything search results blade, select the Template deployment result.
-
In the Template deployment blade, click the Create button.
-
In the Custom deployment blade, click the Build your own template in the editor link.
-
In the Edit template blade, click the Load file link.
-
In the Open file dialog that appears, navigate to the Allfiles (F):\Mod06\Labfiles\Starter folder.
-
Select the manageddisk.json file.
-
Click the Open button.
-
Back in the Edit template blade, click the Save button to persist the template.
-
Back in the Custom deployment blade, perform the following actions:
a. Leave the Subscription field set to it's default value.
a. In the Resource group section, select the Use Existing option.
a. In the Resource group section, locate the list and select the value MOD06VMDK option.
a. In the Location field, select the East US location.
a. In the Network Interface Card Id field, enter the referenceUri you recorded of the Network Interface Card named ComputeNIC created earlier in this lab.
a. In the Terms and Conditions section, select the I agree to the terms and conditions stated above checkbox.
a. Click the Purchase button.
-
Wait for the creation task to complete before moving on with this lab.
Review: In this exercise, you deployed an ARM template that used the existing networking resources when creating a VM but used a new Storage Account for the VM's hard disk.
-
At the top of the portal, click the Cloud Shell icon to open a new shell instance.
-
In the Cloud Shell command prompt at the bottom of the portal, type in the following command and press Enter to list all resource groups in the subscription:
az group list
-
Type in the following command and press Enter to delete the MOD06VMDK Resource Group:
az group delete --name MOD06VMDK --no-wait --yes -
Close the Cloud Shell prompt at the bottom of the portal.
- Close the currently running Microsoft Edge application.
Review: In this exercise, you "cleaned up your subscription" by removing the Resource Groups used in this lab.