18 hours 58 minutes
Welcome back. In this episode, we're gonna discuss creating virtual machines.
My objectives include just creating virtual machines. And actually, we really don't have any slides to over. I just want to jump straight into the azure portal so we can start looking at How do we create first machines and discuss some additional properties and configurations we have there
back in our azure portal? Let's go ahead and click on virtual machines.
Let's create our first virtual machine by clicking on ad.
And as you can see, we're gonna have quite a few options to go through here. Up the top. Such is defining basic information, looking at our disks, networking management, some advanced stuff, and looking at our tags finally will review and created at the very end,
much like our other azure resource is, we do have to assign this to a subscription and a resource group. I don't have a resource group yet, so I'm gonna click on, create New
Next. I need to give my virtual machine and name. I'm gonna be super original and just call it Windows VM 01
I'm going to stick with our East US region and for right now, we're gonna skip the availability options, but we will discuss this in a later episode.
Next, we have our images available to us in the marketplace. Let's like the job down box and see what's available.
He will see some of the more popular ones here that are available. We have some boon to Red Hat Soucy or sent us images.
But for right now, I'm just gonna choose a Windows server 2019 data center image.
Next, we have the size available to us, and after selecting this image, it switches to a. D s one V two, which means it has one virtual CPU and three and half gigs of memory.
I'm gonna go ahead and change this just so I get a little bit faster VM for demo purposes
In our selected VM size, we have several different filter options here, such as the size the family or of premium dis are supported.
Then down below, we have matching VM sizes for us. Right now, we're just looking at general purpose and that's all I want to focus on right now.
For example, I'm going to switch over to the D two s, the 31 which is gonna give me two CP use and eight Gigs of Ram. You can also see on the right hand side estimated cost per month if it were to be running 24 7 for the entire month
next. Since this is a Windows virtual machine, we do need to create a local admin account and set a password for it
next week in Select Inbound Port rules. And these are gonna be very similar to our network security group rules that we talked about previously. You can go ahead and select if any inbound ports are allowed on the virtual machine
for our demo purposes. I want to allow 3389 or the Rdp port so we can connect to it later just to show that it's been created. And in that it's up and running.
So it's like allow selected ports.
I'm going to select our DP,
and it's gonna give us a warning that this does expose it to the Internet. And that's okay because this is just for demo purposes, and we're going to destroy the VM as soon as we're done
next. Let's go look at our disk options
for the Estes type we have a couple of different options. Let's like the drop down menu.
It's gonna default a premium SST. But we could also select standard H D D, which are magnetic disk or a standard SST. If we select one of these options, it's just going to give us some information saying the virtual machine sighs that was selected supports premium discs. And they also recommend premium SST for high input output workloads
and also selecting premium SST Will qualifies for a 99.9% S L A. Let's go ahead and go back to our premium discs.
Next, you can also attach a data disk. This would be like attaching a D or any drive for hosting additional data or installing applications to let's go ahead and select the disk and attach it to our virtual machine.
When creating and attaching a new virtual disk, you have a couple of different options for the source type. He could just create an empty disc. Or you can use this snapshot of another virtual just that you taken or even import data from a storage blob. For right now, let's just keep this at an empty disc
and then we can also select the size. I think it terror by here is a bit too much for a demo purposes. Let's go ahead and change the size
and let's just take this down to 32. Gig
Finally, let's look at some of our advanced options.
Now you have an option here that says to use to manage disc, and that's something we haven't quite talked about yet.
Managed. This means Microsoft is going to manage the storage around all these virtual machine discs previously, and the older model. You have to store your virtual machine discs inside of a storage account and had to keep up with how much space there using and also pay attention to the eye ops for storage account. Because there was a limit
with managed this, you don't have to worry about this. Microsoft will manage them on the back in for you. The recommendation is that continue using manage this,
but you may have to use them if you're still deploying virtual machines in the classic scenario, or you just want to manage the virtual hardest on your own. If you were to select no on this,
you would then have to select or create a storage account to put these virtual machine discs in. As I said, it's recommended to just go ahead and use Manage this. So let's change our option back
next. Let's go check out networking
inside a networking. This is where we can select which virtual network. We want to deploy it, too.
It has the option here to go ahead and create a new virtual network. But since we've deployed some previously, let's go ahead and select. One of those,
for example, are proud Webb the Net.
And once that Jeanette loads, we can select one of the subjects we previously created for that virtual network.
Now, as mentioned in the slides, if you want your virtual machine accessible from the Internet, you're gonna have to sign it a public i p address. And that's what this next step is doing. This is going to create a public i P resource to assign to our virtual machine,
and down here we can see the option that we selected previously that we're going to allow the Rdp port in to our virtual machine.
You can also then take a network security group that you previously created and assign it to the network interface card on this version machine.
Remember, network security groups can't be assigned at the sub net level or on individual network cards on virtual machines. And finally, if you already have a load balancer created that you want to place his virtual machine behind, you would go and select this year. Since we don't let's go ahead and select management
and we have some monitoring options here, such as boot diagnostics. This is going to capture consul output and screenshots of the verse machine and store them inside a diagnostic storage account.
We also have OS Guest diagnostics. You can get metrics on your virtual machine such a CPU usage, or bring him usage and create alerts around these. For right now, I'm just going to select these as both off
another nice feature. When creating virtual machine, you can enable auto shutdown, which means at the end of the day, every day you can shut down the social machine in order to
reduced cost, so it's not running 24 7 For example, I'm going to select 7 p.m. In the Eastern Time zone.
You can also receive an email notification before shut down and you can cancel that Shut down if you want the virtual machine to stay running. We also have the option to enable backup. But since we haven't touched that topic yet, we're gonna keep that office well
goes going to advance and check out some more options here. I just want to touch on extensions. Extensions apply after the virtual machine has been deployed. One example is a desired state configuration, or DSC, which allows you to run scripts to configure a virtual machine after it has been deployed.
Let's go ahead and look at tags.
We cover attacks previously and another episode, but this allows you to apply some governance around your virtual machines. And resource is,
for example, we can say department is finance, and this just allows tagging. A resource is so we can create metrics and alerts around them later.
Let's go ahead and review and create a virtual machine.
Now that Azure has validated all the settings for a virtual machine, we can go and click on create,
and this is going to start deploying our virtual machine
while we're waiting for that resource to be deployed. I want to go in and create another virtual machine just to show you a couple of different options that occur when you select a linen image.
And here I'm going to keep it at this, a boon to image.
And what you can see here is, instead of defining a user name and password like we did for our Windows account, we have a couple of different options for creating the administrator account.
We can use an SS H public key so we can connect to the virtual machine later.
Or we can just select the password option and define a username and password to connect over sssh later.
Otherwise, a lot of the other options are gonna be exactly the same
back here inside of our virtual machines, we can now see our Windows virtual mission that we created is running. Let's go check out some of its properties
here. We can see some of the properties for our virtual machine from our creation, such as the location, the computer name operating system and the virtual machine size. One thing I want to point out is when we created this virtual machine and selected the virtual network, we want to place it in we weren't asked for I p address for the virtual machine
when placing it inside of the virtual network
a private I P addresses automatically selected for us.
Here it is 10.21 dot one that four. Now, remember, the first couple of I P addresses in a virtual network are reserved for azure use, so that's why we're started at the 1.4. Also to take note is our public I p address. This comes from our public I p address azure resource that was created
when we set up the virtual machine.
Now that a virtual machine is created, we should be able to connect to it over remote desktop protocol. Let's click on Connect
is going to bring up a connect a virtual machine blade here and let's download the rdp file,
which is gonna contain our public i p address of our virtual machine that we're going to connect to.
We're going to get a credential prompt here when trying to connect to the virtual machine. You're gonna input the same information you used when you created the virtual machine.
And here we are inside of our virtual machine. And just to prove it. I'm going to go look at some of the information about the server
here. You can see the computer name we gave it when we created it,
As well as checking out the I. P. Address.
Here, you see the I. P. Address that matches up with what we see in the portal. One thing about this I p address is that it is static until the virtual machine is shut down. But if you go look at the properties of your virtual machine,
you'll notice that the I P V four is still set at D H C P.
So this completes creating a virtual machine inside of Azure. Let's jump back out to the slides to wrap this up.
Thanks for sticking it out during that demo coming up. Next, we're going to dive into virtual machine, high availability and scale sets. See you in the next episode.