Microsoft Azure AZ-800 — Section 13: Manage Azure Virtual Machines that run Windows Server
102. Manage data disks
I’d like to talk now about storage in regards to Azure virtual machines now, when you first set up an Azure virtual machine. It is going to automatically create you to disk. The first disk is going to be the disk that contains your operating system disk and is usually labeled as the OS disk. And the second disk is a temporary disk. And believe it or not, the second disk gets created when you turn your virtual machine on and then it gets destroyed when you turn your virtual machine off when you shut it down. The second disk is actually used for the page file the virtual memory, and you really shouldn’t store anything on that second disk when your operating system is booted up because it is simply used for that virtual memory purpose. The first disk is the operating system disk again, and that’s where your operating system goes.
Now, for decades, it’s been a pretty common practice for administrators to want to store data on a separate disk. It’s generally a good idea for the way that we used to deal with redundancy and raid and all of that that we have, you know, separate hardware, separate set of hard drives for operating system and then separate hard or separate set of hard drives for our data. All right. And so this practice is actually also used in Azure. You when you set up your Azure virtual machine, you can have a disk that’s got your operating system on it and then another data disk that stores your data on it. All right. And so Azure does give you the option of setting up another disk now. The one thing I will say on this point is if you’re going to do this, you should probably start by looking at the pricing calculator to figure out kind of an estimate on what the cost is going to be per month for you.
So to get to the pricing calculator, if you just go to Google, just do Azure pricing calculator. If you just put that in a Google, you can find the pricing calculator for the for the area of the world where you live.
So once you get there, at that point, you’re going to click on storage account. And then you’re going to click View.
Now I’m going to go right here where it says Typekit, and if you look under disc stores, you have two options Page Blob or managed disc page blob is what we call an unmanaged disk. And then you have managed just now. Unmanaged disk is a newer concept that just came out the last few years. It used to only be called a managed disk. An unmanaged disk is where we’re going to let Azur handle the management of the disk, where it’s at in the data center and how much load it can handle at a time maximum, interestingly enough, by by using an unmanaged disk. Microsoft gives us sleep, usually slightly better performance, because they can move the disk around data centers and and handle it themselves and give us a higher throughput by utilizing that. It also can sometimes be cheaper to go with an unmanaged test. A managed disc is going to be tied with a storage account. You absolutely have to create a storage account to do a manage this. The benefit of a managed disk is that we get to control the storage account it’s associated with and we can have limitations and things like that that are put on that storage account. And so there’s kind of some ups and downs there on whichever you go with when you select this. This how you can kind of estimate the cost so you can look at, you know, the gigs per month. By change that to four, you can see that on average on storing up 4000 gigs, basically four terabytes a month. That is one hundred and eighty dollars a month. And you can adjust the numbers here based on the AIOps, the operations per second input output operations per second. All of that also you have different tiers. Standard is basically hard disk drive and then premium is, of course, salty, so you can choose which of those you want to go with. And you also have the option to choose redundancy that gets into where they replicate your data between data centers.
So local whodunits storage. This going to basically let you have redundancy just within one data center. If a data center was to go down, unfortunately, you would lose access to your data, but there’ll be three copies of your datand then Xerox is zero storage. Essentially, I’m sorry zones and redundant storage. And what that is they’ll store your data in different, different data centers.
So data center goes down, you’ve got another copy of your datand different data center.
So you can get to play around with this a little bit. And you definitely cankind of figure out like monthly what all of this going to cost. And it’s it’s a helpful way to kind of get a good visualization. Let’s jump over now into Azure and take a look at this in Azure.
So here I am on Portal Dot Azure .com, and I’m just going to click on the little menu button here and I’m going to go to virtual machines. And as you can see, I have a couple of virtual machines that are created in previous lectures. I’m going to click on this one here, which is called Azure DC one. All right. I’ve already started this virtual machine up, so, it is up and running. And now what I’m going to do is click on this little blade called disks. All right. All right.
So right now, as you can see. We have the operating system disc up and running. And you can see what the stores type is, the size, the maximum IOPS and this was all chosen. When I configured this, OK, and if I jump over into that VM, I can actually connect into it, which I have right here. I can now right click start. I can go to disk management and I can look at the disks that are in the machine.
So you can see that I have two disk disk zero, which is actually my operating system. And here is the temporary disk that I mentioned, the temporary storage. That, of course, is what’s going to contain your page file, which is for virtual memory, right? Which is what your server does whenever it starts running out of physical memory or utilized virtual memory. Swap memory is sometimes called in the Linux world.
So anyway, from there, I’ve just got these two disk currently. All right.
So, I have not added any additional deaths.
So close out of that. Let’s jump back over to Azure.
OK, back here in Azure, if I click on the disk blade here, as you can see, I can click to create an attach. I’d also like to point out that another way to add a data disk is if I go to the menu option here and go to all services, I can just do a search for the word disk. And I can click this right here, and you can create a disk from within here, and then you can attach it to your virtual machine so you can attach existing disk as well. But I’m going to go back over to my virtual machine here. Click on Disk and we’ll click to create. Let me just move this. Click to create and hatch a new disk.
OK, so first off, it says, OK, you’ve got to have a line for a data disk. That’s a logical unit number you’ve ever worked with storage area networks. You probably are aware of that. Every disk has to have a unique number as it’s associated with your storage of your server. Then you can give it a disk name is going to call it data disk, and then you can specify the storage here so you can go with premium solid state. That’s high end, fast, solid state storage. You can go standard. It’s obviously going to be a little slower if you go over your calculator again. You can look at all of this a little bit more in depth for the cost and all that. You got standard HDD.
So this, you know, non-critical data. It’s not going to be the fastest. Obviously, it’s a hard disk drive as opposed to solid state. And then you can go with their best option, but most expensive option, which is ultra disk, which of course, is going to be more expensive just because of the high end performance. This the best of the best solid state that they’ve got. All right. In my case, I’m going to go standard HDD. All right. And then what size do you want? So, I can specify size right here. I could specify that this just setting to 32 gigabytes, but you could adjust that to what you want. You got the max IOPS based on the type of disk you chose, the maximum throughput, maximum throughput as well. And then you got encryption.
So encryption here your disk is automatically going to be encrypted by the Azure platform. You really have to go with that. Even though it says disk encryption set not required, you either have to go with their encryption or outside of this interface. There is a way to do what’s called a customer managed key encryption where you handle the encryption key and it’s going to use a BitLocker type encryption to encrypt your disk. Either way, one way or the other, you are going to encrypt your data, so don’t let that mislead you. There’s no way that you can actually host the disk in Azure without it being encrypted. Last thing we got is something called host caching. Host caching is another newer feature that’s come out in the last couple of years with Azure. And it allows your host server to use some storage directly on the server. That’s very fast for using what’s called caching. Caching is the data that Azure is working with right now. It can cache that storage on the host server itself and speed things up. Currently, it’s set to none, So, it’s not going to do that. You can set it to read only. This would be for a disk that is set to read only. Essentially, if it caches from a hard drive, it’ll not allow that read only information to be modified, it’ll just be reading from it if it needs to write it right back to the actual disk.
OK. You’re going to get the highest level performance out of host caching if you go read only. But it’s not going to give you the highest level performance if you’re having to do a lot of writing.
So that’s where you would want to read, right? OK.
So at that point, you can. Then you’re ready to create the disk. You’ve selected what you want there.
OK, we’re going to go ahead. All right, we’re going to create the disk. All right, what kind of desk we’re going to go with? We got what’s called source type. You’ll notice that with a source type, it tells you that can create a disk from a snapshot of another disk or a blob in storage or create an empty disk. In my case, I’m just not an empty disk because I don’t actually have an existing guests to create a disk from. All right. And Ari, you talked about the encryption a little bit. You got to have encryption, but you’ll notice here it says you want to do encryption at rest of the platform and its key, the encryption and rest of the customer’s key, or use the double encryption platform and custom manage key. Basically, you can have your own key that’s being managed and you can create custom or manage keys in a different interface here. All right. Or you can just go with the default. Obviously, double manager is going to, you know, secure things even more, but I’m just going to go with the default and then I’m going to click, OK. All right. And I’ve now officially created my second disc here. I’m just going to click Save and you’re going to notice that it’s finalizing everything. All right.
So just let that run through real quick. All right, after that is done processing through, you may need to refresh your web browser, but at that point, it should show the data disk is over here and it’s now up and running.
Now let’s jump in to our virtual machine and take a look at it.
OK, so here we are in our virtual machine. And of course, there’s a couple of ways we can handle setting up this desk. One way, of course, is to right click, start and go to disk management, and you’ll get a little pop up telling you that it’s detected a new disk that you want to go with in VR. As the basically the partition style or what we call the master boot code.
So the NBR is the older style master boot record format that that Microsoft has had for decades. It’s really in the original IBM standards that would allow you to set up a partition in a for. You were able to partition the disk into four sections. You were also limited on how many disk you could only go up to the letters in the alphabet and all that, or you can go with GPT. GPT would partition Table was the newer standard, and you can have as many partitions of, you know, letters and all the way through the alphabet. You can also call partitions by names. You can have a 228 partitions. And so that’s the newer style type of disk that you can go with.
Now, another option that you can go with for setting up this second disk is instead of doing it, the disk management. You can click start and you can go to server manager and you can do it through Server Manager, which was introduced when server manager came out a few years ago.
So, if I go over here to file with storage services, click on Disk. I can go right down here or says volumes and I can click task new volume next. And there is the new disc right there, so, we’ll click next on that says, all right, you’re going to create this new disc and go ahead and initialize it as a DVD.
So you notice it doesn’t even give you the option to do in VR if you do it through here.
So there we go. We’ll say 32 gigs next. It’s going to give it the drive letter E. That’s fine. Formatted as NTFS. That’s the file system. Click next. Click Create. And we’ve now officially created our new disk. Well, officially, as soon as it’s done formatting it, all right. And now we’ve officially created it so, we can click close and we should be able to open up File Explorer. And at that point, we can start storing data on our new disk. All right. Of course, I haven’t done anything I could go in here and, you know, create a folder called Hello World and we’ve created a we’ve now stored some information on there will just a folder, but as you can see, the new disk is now up and running.
OK, now the last thing I’ll show you here is that on my desk, if I come back over here in Azure and I click on the data desk, you can click on size and performance and you can actually resize it.
So, if you wanted to go with something higher, more powerful, you can adjust all of this here. Go to a higher size, but warning they tell you up here that changes to the disk size can be made only when the disk is unattached or the main virtual machines or geolocation.
So, if you want, you can go back and you can unattached the disk from the server. Make sure that you unattached it and then reboot your server. And at that point, you can resize it. But ultimately it is possible to resize a disk that’s kind of cool. We weren’t able to do that years ago, so this was a newer feature that Azure just added.
So very cool and very easy to manage these data disk in Azure.
103. Resize Azure Virtual Machines
Another great feature that we have in regards to virtual machines and Azure is the ability to resize virtual machines.
So, when you set up a virtual machine, you generally have to choose the power that that virtual machine, the computing power that that virtual machine is going to have. And you know, in the years ago, it used to be that you were you were kind of stuck with it. And more recently, Microsoft is now out of the ability to do what’s called resizing. All right. And so here I am on the pricing calculator, which again, you can just go to Google, do a search on Azure pricing calculator. You can pull this up if you go right here. You can click on compute and then virtual machines, and you can play around with the different sizes that are available to you. All right. And so you can kind of look through these different sizes here. You can see how many quarters you’re going to get, how much memory temporary stores, all that, and you can click on this and see what the monthly cost would be. And my experience has been that it’s pretty accurate when I’ve implemented this for companies in the past. It actually is very accurate. And unless you’re really, really pushing the server extremely hard all of the time, then your monthly fee is going to be around what they’re estimating right here.
OK? I’ve also had a situation where I provided an Azure virtual machine for a company, and we ended up going with something way higher than they needed, and we had to resize it to a lower number because they’re spending more money. They weren’t really using all the processing power and memory that was needed.
So, you know, you could up this if you needed more power or you could you could scale back if you didn’t need so much power.
OK, but here is where you can kind of play around with this. Play around with the numbers and figure out what the monthly fee is now. Let’s take a look at how we actually do this over Azure.
So, if I go over to Portal Dot Azure .com, click the little mini button. Here I’m going to go to virtual machines and I’m going to choose this Azure DC one virtual machine that I created in an earlier lesson. And then from there. I can kind of scroll down a little bit here and you’ll see a blade called size.
So, we’re going to click on the size blade. And from there, you’ll see these options, the same options you saw earlier, and you can see the virtual CPU’s and RAM the day to day as the maximum IOPS, temporary storage, all that fun stuff. All right. And so as you can see, I can see what I’m at right now, and if I wanted to resize to something else, then I could. I could go and resize to another option.
So, I got to do two resize and just click this other option right here and then go down here and click Resize. And as you can see, it is resizing it right now. And if you’re familiar with Hyper-V and doing what’s known as a live migration, actually live, migrate your virtual machine over to this equipment. And and that’s how it’s going to go ahead and set the resize for you.
OK, and it only takes about a minute after the resize is done. You’re good to go. Notice that it does warn you here so that the virtual machine is currently running. Changing size will cause it to be restarted. Stock in the virtual machine may reveal additional sizes.
So that is one thing to consider when you’re doing this. But ultimately you’ll notice that I have officially resized it, and in my case, I don’t really need all the power that I’ve got here, so, I’m going to switch it back to the size that I had chose earlier, and I’m just going to go ahead and let that run through. But again, resizing a virtual machine is a very helpful feature that we have is very easy to use, very friendly, as you can see here.