In this demo,
I'd like to add and initialize a new data disk to a virtual machine.
So, we're looking here at my vm2,
it's a Windows Server 2022 Datacenter box, and I'm going to come
down to Disks, and we'll come down to Data disks,
Create and attach a new disk.
Now notice there's two options. I'm going to do a create, but we
could also attach existing disks, but this would assume that you
have some in your subscription.
If you go up into the search and look for disks,
you can get to the manage disks area here and you can create disks,
you can upload VHDs from your on‑prem and then register them as disks.
That's just another story.
But what I'm going to do here is get rid of this entry
because I'm not going to attach an existing disk, we're
going to create a new one on the fly.
And let's say that this is going to be a disk that will host database files
and so it's going to need more predictable performance.
I'm going to call this db‑files, and notice that for the storage type I can
choose what type and what redundancy level I'm looking for here.
I'm going to choose Premium SSD and then the size in gigabytes,
I'm going to want that a lot bigger than 4,
let's say 60 will do for now.
And then we've got some other options that we don't need to get into right
now about caching, and encryption, and so on and so forth.
And once this is finished,
this will allow us to sign into the VM and see this, well, once
we initialize it we'll be able to work with this disk. Now, what
about the question of resizing and making other changes? Well a
lot of that has to be done,
particularly if you're looking to do surgery on the OS disk,
hopefully it makes sense that you're going to need to stop and
deallocate the VM for that to work.
But some of the controls that you see for OS in data
disks, let me bring you in right there.
You decide that you want to change the size of the disk.
When we go to the Size + performance blade,
we're going to see a number of stock‑keeping units, or SKUs,
and we can change the disk type right here.
Both Premium SSD, Standard SSD, which is meant to be a balance between
the Premium SSD where you get full predictable speed at high cost, and
the Standard HDD that's unpredictable,
low speed at low cost. Standard SSD is a good compromise.
But all three of these tiers come in discrete stock‑keeping units here,
but note that you can come down and set a custom disk size and there's
also various performance tiers that you can choose to boost or edit your
throughput in your input/output operations per second. And notice that
the blue up here says that Changes to the disk size can be made only
when the disk is unattached or the managed virtual machine is
deallocated.
That means fully stopped and hardware deallocated.
So I won't be able to actually change the size of the disk until I stop the VM.
Let's finish up by just reviewing how we would initialize that new
data disk. First, let me go back to the virtual machine disks page,
make sure that it's still there, yes,
it is, and then we're going to connect on the Overview page.
Now later in this module,
I'll show you more about Azure Bastion, but for now because
I already have a bastion configured in my subscription, I'm
going to do a Connect Bastion.
This'll link up to the bastion that I've already created, and
a bastion is simply a managed jump host.
It allows you to connect over the internet on TCP 443
using the encrypted HTTPS protocol.
Sign in here, and that bastion runs exclusively in an HTML5
browser. Supposedly the engineering team at Microsoft says that
they'll support client applications eventually,
but it's still just either an RDP desktop session or an
SSH terminal session in a browser tab.
It's better than nothing, for sure.
So now we're here, I'm going to, I'm using a black wallpaper so it kind of
hides it a little bit, I'm going to do a diskmgmt.msc, that's the shortcut
file name to the Disk Management console, and the very first thing that
pops up is this Initialize Disk.
Are we going to use the old Master Boot Record or the new GPT?
I'll go with MBR now and click Ok.
Let's maximize our Disk Management console, and now we have
our new 60GB disk online, but unallocated.
So what we'll want to do is right‑click and create a New Simple
Volume. Just like you would on‑premises, I'll use all the space
and I'll give it the label db‑files,
click Next, Finish, and before too long, I have my new drive
available, and we'll have a drive letter before too long.
Let me refresh the view.
There we go, my drive E. So I can right‑click and
explore my new Azure data drive. Oh, before I stop this demo,
just to show you, here's that D drive, this is the temp disk, and it's a 16,
for my VM size, it's only 16GB, and it's using solid state.
If I right‑click and explore it, we're going to see that in
Windows the D drive has this really scary message,
DATALOSS_WARNING_README, and let's open up this text file just so you can
take a look, I'll open it up in Notepad. And notice it says here, THIS IS A
TEMPORARY DISK, all data stored on this drive is SUBJECT TO LOSS and THERE
IS NO WAY TO RECOVER IT. And again, that's because your temp disk is
attached to the hardware host and your VM may be live migrated at any time
to a new hardware host. Let me close out of that Bastion session and call this demo done.