The course is part of these learning paths
Overview of the course
What is a Virtual Machine?
Creating and Connecting to Azure VMs
Scaling Azure Virtual Machines
Design and Implement VM Storage
Configure Monitoring & Alerts for Azure VMs
Azure Resource Manager Virtual Machines
Virtual Machines are a very foundational and fundamental resource in Cloud Computing. Deploying virtual machines gives you more flexibility and control over your cloud infrastructure and services, however, it also means you have more responsibility to maintain and configure these resources. This course gives you an overview of why use virtual machines as well as how to create, configure, and monitor VMs in Azure Resource Manager.
Azure Resource Manager Virtual Machines: What You'll Learn
|Lesson||What you'll learn|
|Overview||Overview of the course and the Learning Objectives|
|What is a Virtual Machine?||Understand what are Azure Virtual Machines and what workloads are ideal for VMs|
|Creating and Connecting to Azure VMs||Learn to deploy Windows and Linux VMs as well as how to connect to these VMs|
|Scaling Azure Virtual Machines||Understand VM scaling, load-balancing, and Availability Sets in Azure Resource Manager|
|Configuration Management||Understand the basic concepts of Desired State Configuration and the options available to Azure VMs|
|Design and Implement VM Storage||Gain an understanding of the underlying Storage options available to VMs as well as Encryption|
|Configure Monitoring & Alerts for Azure VMs||Learn to monitor VMs in Azure Resource Manager as well as configure alerts.|
|Summary||Course summary and conclusion|
Now that we’ve learned to build a Windows virtual machine, let’s see if we can build a Linux VM. There are only slight differences mainly in how we connect to the VM itself. To view a list of our current VMs, we select “Virtual Machines” from the left panel, or type “virtual machines” into the search box at the top of the screen. Here you can see our Windows VM. This time let’s click the “Add” button from the top bar. We are now back at the Marketplace or the Azure Image Gallery for VMs which is a subset of the Azure Marketplace. Let’s select “Red Hat Enterprise Linux 7.3.” When you read the description you’ll notice this is a “Pay-As-You-Go Premium Image” which basically just means it carries a separate hourly charge in addition to Microsoft’s own VM rates. I wanted you to see this because unfortunately my current subscription has a spending limit so I will be prevented from creating an OS from this image since it requires a non-trial and a no-spending limit subscription. Let’s go back and search for CentOS. Let’s select CentOS-based 7.3 by Rogue Wave Software (formerly known as OpenLogic). As we’ve done previously, let’s leave the default option of “Resource Manager” and select “Create.”
Once again we’re presented with configuration steps for our VM. We’ll call this VM “Linux1”, keep the disk as SSD and create the same username “cj.” Authenticating to Linux is different than authenticating to Windows. Here we have two options for the Authentication type: an SSH public key which you can generate on Linux/OS X by using ssh-keygen or PuTTYGen on Windows, and we have Password authentication. To use an SSH public key, you’d generate a public key and copy/paste the text for the public key below and reference your private key when connecting, but for our sake we will just go with Password authentication and create a password. Also, let’s use our existing Resource Group “rsGroup1” and the same location “East US.” Click “OK.”
For the VM Size we’ll just use the “DS1 Standard” and click “Select.” In Step 3 we’ll again leave all the default options and if you notice because we are deploying to the same resource group, by default it wants to put our VM on the same Virtual Network and default subnet where it will get an IP address via DHCP on the 10.0.1.0/24 address space. Click “OK”. The summary looks correct so let’s click “OK” to begin deploying our Linux VM.
Now that our Linux VM is complete and running let’s connect to it. We are presented with the same type of “Overview” screen as we’ve had with our Window VM, except now we have a different OS, Public IP, etc. You will also notice we have the same action buttons at the top, including the “Connect” button. When clicking “Connect” the only thing we get is a pop-up messaging saying “To connect to your Linux virtual machine using SSH, use the following command: ssh cj@<ip address>.” If you’re connecting from a Linux machine or OS X you can use the SSH command as is (including referencing your private key file if you’re using SSH keys), but for Windows we have to install a Windows SSH client such as PuTTY.
Here I have PuTTY open. I will put in the public IP address and connect to SSH port 22. I’m also going to name this session and save it so that I may easily reconnect later. Remember, we could have used SSH keys, and had we generated public/private keys we could navigate in PuTTY to Connection -> SSH -> Auth, and browse to the Private Key file. But we are using password authentication so let’s launch the connection. We get prompted to add the VM’s rsa key fingerprint to PuTTY’s cache to say that we trust this machine. Click “Yes.” And now we login with our username and password.
And now we’re connected. You can see the username@host. Let’s run “ifconfig” to see the network details. If you notice we have the 10.0.1.5 internal address from our Virtual Network. Our Windows host has the 10.0.1.4 address. We can even ping the other host. Let’s do that. Ping 10.0.1.4. If you notice, ping fails. That’s because ping uses ICMP, and in Windows Server 2016 ICMPv6 is enabled by default in the firewall rules and ICMPv4 is not. The ping we just did from our Linux VM uses ICMPv4.
Let’s hop back over to our Windows VM. Let’s open PowerShell and do Test-Connection 10.0.1.5 which uses ICMP just like Ping. There we’re able to communicate with our Linux machine. In Server Manager, let’s navigate to Tools -> Windows Firewall with Advanced Security. ICMP are enabled via File and Print Sharing. As you can see File and Print Sharing is disabled for Server 2016, however, you can see ICMPv6 enabled via “Core Networking.” Let’s enable ICMPv4 inbound. Now let’s go back to our Linux VM and try again. There we have it, our Linux VM is able to successfully communicate to our Windows server.
About the Author
Chris has over 15 years of experience working with top IT Enterprise businesses. Having worked at Google helping to launch Gmail, YouTube, Maps and more and most recently at Microsoft working directly with Microsoft Azure for both Commercial and Public Sectors, Chris brings a wealth of knowledge and experience to the team in architecting complex solutions and advanced troubleshooting techniques. He holds several Microsoft Certifications including Azure Certifications.
In his spare time, Chris enjoys movies, gaming, outdoor activities, and Brazilian Jiu-Jitsu.