Virtual machines in Azure can replace on-premises servers or even build a completely born-in-the-cloud solution. In this video, learn how to create a basic Azure virtual machine using the portal.
- [Instructor] Let's face it. When we move into Azure as an IT Pro the first place you'll probably want to start is with the virtual machines, as these will feel the most comfortable to you. Azure virtual machines are on demand and fully scalable. We're going to be talking about a lot of the components of Azure virtual machines throughout this chapter here, we're going to focus on two parts, specifically the SLA, as this is important to know when you're building your Azure virtual machines and your environment. Microsoft has a 99.9% SLA. If you use a virtual machine with premium storage disks, there is also a 99.95% SLA, When you have two or more virtual machines in an availability set. We talked about availability sets in the last chapter. And there were several considerations that you need to be aware of when you're building your Azure virtual machines. As I said, we're going to cover most of these options throughout this chapter, but at a high level, you need to be aware of the virtual machine sizes that are available, the limits, locations, pricing, the types of disks, the supported operating systems, storage options, and finally connections that will allow you to connect to, and from your Azure virtual machine. With that, let's go ahead and build our first Azure virtual machine. We are going to create a virtual machine in the resource group that I've already created. I'm going to select add, and I go ahead and look for virtual machines, but to keep life a little bit easier, I'm going to use the Windows Server 2016 Data Center Image. You'll need to provide the subscription and resource group, or you can create a new one. Now we can provide the instance details, starting off with the virtual machine name. I'm going to call it AZ104portal, select your region. This will typically be closest to you or your users. Next, select the availability options. You will have a few different choices here, depending on your region. In my example, I can either offer no infrastructure or an availability set. Availability zones are not supported in this region. I have my image and I can choose to run this image as a spot instance. A spot instance is your virtual machine that is being run in unused capacity. This is less expensive for you, but when Azure requires that capacity, your virtual machine will be evicted. Only use a spot instance for virtual machines that can tolerate reprovisioning. We can select the size for our virtual machine. I'm going to use the recommended size, provide the administrator account for the VM. And finally, you can select your inbound port. I'm going to leave three, three, eight, nine open. This is for RDP. Moving on to disks, you can select from one of three disk types. We have standard HDD, standard SSD and premium SSD. Microsoft does recommend premium SSD for workloads that require high IOPS. And don't forget about the SLA that we talked about. For my demonstration, I'm going to use standard SSD. And I understand that I do not meet the SLA requirements. Moving on to encryption type. This encryption setting is used for the encryption options for managed disks and CMK, it is not for Azure disc encryption, which we'll cover later in this chapter. The next setting is alter disk. This is grayed out because I'm in a region that doesn't support it. If you require high throughput and high IOPS and consistent low latency, then you'll want to enable alter just compatibility. We're going to cover data disks in much more detail later in this chapter, therefore, I'm going to leave the rest as this and move on to networking. Your virtual machine must be connected to a network and like this we'll be covering networking in depth a little bit later, the virtual network subnet and public IP have all been prepopulated for me. I could create new names or select existing network subnets or public IPs. Let's move into management. It's here, we can turn on monitoring, enable, system assigned managed identities, turn on auto shutdown and enable backup for the virtual machine. For our demo, I'm going to turn off boot diagnostics. This will remove the requirement for a diagnostic storage account. and I'm going to enable auto shutdown ensuring that I'm not being charged when I'm sleeping. The advanced tab is where we can install extensions and scripts. And again, we'll be covering this in more detail in an upcoming lesson. It's also here we can set up our virtual machine to use a dedicated host. This will allow you to provision and manage a physical server in the data center. We could place this virtual machine in a proximity placement group, which would group the resources physically closer together in the same region, reducing latency. And finally, you can select the virtual machine generation, either Gen 1 or Gen 2. And you'll notice the little note at the bottom. As of this recording, Gen 2 does not support some of the Azure platform features including Azure disc encryption. That's all I need to do. I'm not going to assign any tags to this virtual machine. I'm going to review and create. And this will take five to seven minutes depending on your configuration options. Our VM has now been deployed. Let's go ahead and take a look at it. And we can see our virtual machine is up and running. We have a public IP address. Our networking has all been configured, an OS disk has been assigned to this VM, et cetera. One thing I do want to point out here is the other resources that were created when we provision the VM. I'm going to pop back into the resource group. And we can see that not only was the VM provisioned, but the public IP, the network security group, the network interface, the disk and the virtual network. We'll be exploring several of the VM settings in the upcoming lessons.
- Configuring high availability
- Deploying scale sets
- Creating virtual machines
- Configuring Azure Disk Encryption
- Managing virtual machine sizes
- Provisioning a virtual machine
- Automating VM deployment and configuration with templates
- Creating containers with AKS and ACI
- Creating web apps with Azure App Service