Reader small image

You're reading from  Learn Azure Administration - Second Edition

Product typeBook
Published inDec 2023
PublisherPackt
ISBN-139781837636112
Edition2nd Edition
Right arrow
Author (1)
Kamil Mrzygłód
Kamil Mrzygłód
author image
Kamil Mrzygłód

Kamil Mrzygłód is a technical lead and technology advisor, working with multiple companies on designing and implementing Azure-based systems and platforms. He's a former Microsoft Azure Microsoft Most Valuable Professional (MVP) and certified trainer, who shares his knowledge via various channels, including conference speeches and open source projects and contributions. Kamil lives in Poland with his two cats and one dog, dedicating some of his time to video games, cooking, and traveling.
Read more about Kamil Mrzygłód

Right arrow

Provisioning Azure Virtual Machines

As mentioned before, Azure Virtual Machines are one of the most important services when working as an Azure administrator. Each VM requires much more attention than managed services (such as Azure App Service, Azure SQL Database, or Azure Storage) as they are the only resource that gives you access to the operating system. What’s more, VMs are very often the backbone of advanced setups and services, thus requiring much more attention and knowledge.

The content of this chapter will help you understand how VMs in Azure are deployed and configured. We’ll cover not only fundamentals regarding their setup parameters but also different options for making a connection and availability.

In this chapter, we’re going to cover the following main topics:

  • Exploring the sizes and families of Azure VMs
  • Delving into Azure VM storage
  • Deploying a VM
  • Connecting to a VM
  • The availability of Azure VMs

Technical requirements

For the exercises in this chapter, you’ll need the following:

The Code in Action video for this book can be viewed at: https://packt.link/GTX9F

Exploring the sizes and families of Azure VMs

Each cloud provider, when provisioning a VM, gives you a selection of available sizes and machine families to choose from. Some applications don’t really care about the underlying hardware, while others may perform much worse if run on incompatible machines. Such workloads include machine learning (ML), video processing, and game development.

Azure offers 11 different series of VMs, ranging from entry-level VMs to advanced instances with dedicated GPUs and optimized networking setups. Let’s review them for better understanding:

  • Entry-level VMs: You don’t always need a VM that comes with advanced hardware and functionalities. Sometimes, all you need is a small, generic machine that you can quickly set up and use for initial development or testing. Azure offers a small subset of all machines available as entry-level machines. As of the time of writing, you can select between Basic (A0-A4) and Standard machines...

Delving into Azure VM storage

Each VM requires a disk that will be used by operating systems and applications run on it. In Azure, VMs have two types of disks:

  • OS disk
  • Data disk

Both types of disks have their own purpose, which we’ll discuss shortly. What’s more, each disk can be configured as either an HDD or an SSD disk, which will have a huge impact on the VM’s performance.

Azure VMs have also additional disks called temporary disks. They’re often labeled as D: disks and are not meant for storing data on them (that is, data stored there isn’t replicated to Azure Storage). Their main purpose is to act as storage for swap files or similar operations. They get erased when rebooting a machine, performing a failover, or any other operation that restarts an operating system. What’s more, some VMs in Azure don’t have temporary disks created for them. You don’t have control over that mechanism as it’s something...

Deploying a VM

In the previous chapters (Chapter 3, Understanding Azure Virtual Networks, and Chapter 4, Exploring Azure Load Balancer), we had a chance to deploy a couple of VMs using default parameters. We also made some connections and even ran some commands on them. In this chapter, we’ll extend our knowledge and see what additional options there are when deploying VMs.

Deploying a single VM

When you want to deploy a single VM, you can use one of the commands available in the Azure CLI:

az vm create -n <vm-name> -g <resource-group-name> --image <os-image>

This will create a single machine with the selected operating system. If you want to learn what possible choices for the system are, you need to use another command:

az vm image list --all -o table

This command will display a big list of all images available, including additional information (such as publisher, offer, or SKU). The list itself may be a little too long to quickly find useful...

Connecting to a VM

Each VM deployment can be used as a host to which you can connect. Depending on your infrastructure setup (availability of a public IP address and network security group (NSG) rules), such a connection is either a simple command in your terminal or a multi-step process including a variety of actions. In this section, we’ll focus on different methods of connecting to a VM, covering differences between operating systems and security measures. Let’s see how we can connect with a machine using SSH, RDP, and DNS name.

Connecting using SSH

A method of connection that works for both Windows and Linux is SSH connection. When connecting to a VM using this protocol, there is one prerequisite – port 22 accepting incoming connections. In the previous chapters (Chapters 3 and 4), we covered the topic of an NSG – a service that controls inbound and outbound access to the resource it’s connected to. From a connection point of view, it doesn...

The availability of Azure VMs

When working with VMs, you’ll face various scenarios:

  • Deploying a single machine
  • Deploying multiple machines as separate hosts
  • Deploying multiple machines as connected hosts

Depending on your scenario, different approaches will be needed to achieve what you need. For example, up until now, we deployed multiple VMs, which were mostly unrelated hosts. This is the simplest scenario from a deployment point of view, but gives us no real resiliency. It’s time to learn how to achieve HA in Microsoft Azure when deploying IaaS components. Learning about that topic will help in real-world scenarios, which very often require improved availability of your infrastructure due to business requirements.

Availability sets

Each deployed VM in Azure has specific hardware powering its capabilities. In other words, anytime you deploy something in Azure, the data center will select the proper placement for it in terms of physical location...

Summary

This chapter concentrates on general knowledge about VMs, including sizing, disks, deployment modes, and their availability. We discussed different ways of connecting to machines, including the differences between SSH, RDP, and Bastion. The knowledge gained from this chapter should help you in further investigating other capabilities of Azure VMs and possibilities when using them in your infrastructure.

The next chapter will focus on installing and configuring extensions for VMs. We’ll see what’s possible to do when you want to configure a deployed machine or automate its management operations.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learn Azure Administration - Second Edition
Published in: Dec 2023Publisher: PacktISBN-13: 9781837636112
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Kamil Mrzygłód

Kamil Mrzygłód is a technical lead and technology advisor, working with multiple companies on designing and implementing Azure-based systems and platforms. He's a former Microsoft Azure Microsoft Most Valuable Professional (MVP) and certified trainer, who shares his knowledge via various channels, including conference speeches and open source projects and contributions. Kamil lives in Poland with his two cats and one dog, dedicating some of his time to video games, cooking, and traveling.
Read more about Kamil Mrzygłód