Join Mike Benkovich for an in-depth discussion in this video Provision a VM in Azure portal, part of Azure Enterprise Development: 1 Governance and Infrastructure Deployments.
- [Instructor] Alright, so to create a virtual machine, you'll see that on the Quickstart tutorials, you've got a tutorial on how to do this, although, if you click that, it'll actually link you off the site because you see that little icon that's right there? That actually would take you off the site. In order to provision a new one, we actually click on the create a new resource, for your hamburger menu is out, you would see it says new. But we'll click that and then we can pick what it is that we want to go out and create. Commonly used services are on the right and we can select one of them or we can search the marketplace.
So, for instance, if I'm looking for a Windows machine, type in Windows and search. And then, you will see all of the different options of the types of Windows server machines that we could go out and create. Other things that are available in the marketplace for Compute, you've got just a collection of different things. So, if I wanted to create, for instance say, a WordPress site, in Linux with multiple tiers, we could go out and select that and then be able to provision it.
Scroll back over here, you'll see that there are other categories of things that we can create. We have Compute, networking, storage, things like a storage account where we want to put our files and be able to store blobs and tables and work with cues. We could also set up data lake store, store simple, back up and recovery sites, lots of different things in there. Under the web and mobile, we've got web apps, mobile apps, logic apps, web apps for containers, content delivery network, media services.
In the containers specifically, we have Azure Container Service. Just a lot of different options here for the types of things that we want to be able to go out and create. But, we're going to get started and create a Windows Server VM. Click the link and what happens when you're provisioning a new service in the portal is it's going to go out and get all of the required pieces of information it needs. And it has done a good job of reorganizing them into steps that we can go through and fill out the basic information and then make our way to the end.
What I'm going to do is I'm going to create a demo VM. And, I'm going to create a demo VM for our class here. If you didn't notice, I'm using a naming standard where I've got the owner, I've got the purpose, I've got a what it is. I'm going to select a disk type depending on whether or not the VM needs to be running on solid state drive or just a regular spin disk. I can choose one or the other. Standard disks are going to be less performance. I wouldn't recommend using it for a production workload especially since most things are going towards SSD.
Put in our username and a password. We do have to type the password twice. And then, we pick the subscription we're going to put this in and then select resource group that we want this to be created. Resource groups are collections of services that share a common lifecycle. So, for this, we're going to create a resource group for our deployment. I'm going to call rgDemo and we're going to put this in a location, east U.S.
Click OK. And it takes us to where we can pick the size of the machine. If I want to go back a step, so for instance suppose I wanted to change one of the settings I can always click back in the steps and they will give me the opportunity to make to any of the items that are here. One of the things I wanted to point out is that sometimes it'll offer options, for instance, where you can save money. If you already have licenses as part of a, say an enterprise agreement with Microsoft, you can use that Windows license inside of Azure. So, if you do, then you can click on yes here and this is going to give you a lower price because you already own that license as part of it, but it has to be part of a software assurance that it attached to Azure.
So, before you click yes, you do need to confirm and make sure that you have that and that you're eligible, but that is one way that you can save money. One of the things in the Azure portal that's nice is that if you have a question or are looking for more information, the little icon that gives you help let's you go out and get the information about what that option means. So, when you hover over it, it just shows it. And, if you move your mouse then it goes away. But, if you want it to stay, just click on it and then you can click up on the learn more which then would up that window with more details about the Azure hybrid benefit.
Anyway, continuing on. The next step is to choose the size of machine that fits our needs. Out of the recommended VM sizes are the DS2, version two, series of VMs where you have multiple CPUs, you have different numbers, amounts of memory. When I look at a give tile, so each of these different tiles is a different VM, I can see what the estimated price per month is and I can also see what the features are for that particular machine.
Notice that the differences in this is primarily how much memory we have in RAM. Also, we have four disks versus eight, we have 3,200 IOPS versus 6,400 IOPS, and then the amount of local hard drive goes up with each version. You can also, as I said there's a lot of different choices, you could go out and you could say, show me where we've got at least four CPUs and you can then apply that, click on the view all, and it'll show you all the machines that have at least four CPUs. You can see these machines can go up in price pretty quick, but there's a lot of different options and I encourage you to look at them.
For instance, if we wanted to run a four CPU machine with 112 gig of memory, we could do that for $1,500 dollars a month. But, let's go back to our recommended. I'm going to just select a fairly inexpensive machine because I'm putting together a demo. Go out and select this and then we define out the settings and this is where we define how it's going to connect and run in the network and also what kinds of availability requirements we want to apply to this. First one is do we need high availability? If so, availability sets let us create a load balanced environment where we can have multiple instances of the same machine.
We need to make sure we deploy that instance the same way to each of them. And, it will load across them. If one of them goes down, the other one will take up the load. And, if you want to achieve the service level agreement, the high SLA, then you would use an availability set. Click this to create one. We're going to create a demo availability set. My demo VM AS. I specify how many fault domains which are racks that it's going to be running across and then, also, update domains.
How many different domains do I want to put out there for rolling upgrades on the system. Say OK. And then we come down and we talk about storage. Now, with the availability set turned on, I'm going to automatically use managed disks. This is a newer way of storage inside of the virtual machine. Instead of having to create a storage account that backs up what the disks are, Azure will manage that for me. And I generally get better performance and more reliability. This is a newer feature, like I said, and there are some things that aren't quite ready for manage disk, but we'll use it for now.
Then we come down to our network. How do we want this machine to run and where do we want it to run? Well, we're going to need a virtual network, so in this, you'll see I can create a new virtual network or I can select an existing one. If I go out and use the existing virtual network, then I can define how I want that to be configured. Called rgDemo-vnet. The address space is in CIDR notation where you specify slash 24 which means 256 addresses.
If I wanted more addresses, I could make that number smaller. So, if I go to a slash 23, then it would be 512 addresses or I can do slash 21 and I think that would give me 2048. And then it says, what's the next available block that I could use? So, in there, it says, the 0.1 is not a valid instance for the CIDR address. So, if I was to do slash eight that would work because that's on a border of where that block of 2,000 addresses is.
We give our default subnet a name, we'll call this our web subnet, and then, we select the subnet address range. So, since I have 2,048 addresses, I might want to use just a limited number of web servers. I know I'll never have 256, so I'm going to make this maybe a slash 27. If I do slash 27 then it says I have 32 addresses out there and we'll put this inside of it, so this is going to be the first block in there. And then, we can go out and create this and what it will do is it'll provision a virtual network that has a subnet for web where I'll put my first 32 machines.
And I know I'll have never more than 32 machines. They always come back and say they want more so, let's make it a 26. Go out and say OK. Now, we've got our virtual network set. We have our web subnet defined. We also have public IP address. So, I can specify how do I want my IPs to be created. In this case, I do want a public IP since it's going to be a web server. So, we'll create a new one. Say OK. And then we have security rules. This is where we define the routing rules for how applications can talk in or out of my network.
For this application, I have inbound rules which are going to allow TCP/3389. I can add additional inbound rules by clicking inbound, putting in a name, port range, priority, and then the port and then saving it. We'll come back and do some more stuff with that later. We could also define outbound rules. Close part of these, if you want. You can click on the X or you can click on OK. So, this is going to create a new network security group and then, I have the option down here, scroll down a little bit further, of defining some extensions.
Learn best practices for resource governance with resource groups, policies, tags, and role-based access control. Discover how to configure the infrastructure you need by provisioning virtual machines and creating virtual networks that connect your existing data centers to the cloud. Review the Azure disaster recovery features, and then learn how to use templates and automation to provision and deploy services more efficiently and consistently.
By the end of this overview, you will better understand the potential Azure has and be able to get the most value from the cloud. Watch part two of the series to learn how to modernize your apps with application services and the Azure PaaS offerings.
- Setting up an Azure subscription
- Implementing tags and policies
- Provisioning virtual machines
- Using Azure templates
- Operationalizing a virtual machine
- Using SQL Azure for data storage