Learn how to create your first virtual machine on Azure.
- [Instructor] Our previous applications, both the one that we created in Azure and the one that we created in Visual Studio and deployed to Azure were actually running in virtual machines. However, we did not need to know or deal with that virtual machine. We can, on the other hand, create our own virtual machines. Let's use the hamburger to expand this menu. Come down to Virtual machines. And as you see, we have none, so we'll create a virtual machine.
And up will come the various kinds of virtual machines that we might want. We're going to scroll down. And what we're looking for is Visual Studio so that we have a virtual machine that is set up for Visual Studio, and here we are. Click on that. And a blade comes up for Visual Studio, asking which Visual Studio we want. Do we want the Community Edition or the Enterprise Edition? And do we want it on Windows 10 or Windows Server? Let's keep things simple and use the Community Edition on Windows 10.
We'll go ahead and click that and come to a summary, which will tell us all about the Visual Studio that we're creating, including which bits it's going to use. And as you can see, it says this image was created from the latest bits on July 13th, 2017, which at the time of this recording are the latest bits available. And we'll go ahead and click Create. This is going to create a virtual machine for us with Visual Studio.
On the left we see the Create virtual machine blade which has four steps, and on the right is the Basics blade. We need to give this virtual machine a name. I'm going to again prepend with jl and I'll call this virtualmachine1. You might want to use a more creative name. The next question is what type of disk should our virtual machine have? Should it be a solid state disk or a conventional disk? It makes a tremendous difference in performance to use an SSD, so I'm going to go ahead and select that.
Notice that it's telling me it does not like the name jlvirtualmachine1, and it says that I have to have between one and 15 characters. So let's go ahead and rename this to jlvm1. And that made it happy. The disk type is SSD. We need to give it our username. And I'm going to use the username for this jesseliberty.
And a password, which I'll fill in. And then I need to confirm that password, not surprisingly. Next it wants to know which of my subscriptions to use, as we saw before, and which resource group to put this in. I'm going to choose Use existing, take the drop-down, and pick the resource group I created earlier. That will make it simpler, having all of this bundled together when I want to delete all of the resources in that group.
We'll pick a location. And you can see that there's quite a number of potential locations. We'll choose Western U.S. Click OK. That configures the basics and takes us to the size. We want a virtual machine that supports SSDs. You'll remember that we chose that. And we'll click View all. Okay, here we see some virtual machines that do support SSDs.
And we can add one, two, or four core. We can slide down and see a great number of choices depending on how much money we want to spend. I'm going to go ahead and choose this. It's a promo. It takes two core, seven gigabytes of RAM, and will support my SSD, so I'll go ahead and select that. Next it wants to know should I use managed disks. We'll leave the default.
The network that it's going to be on, the virtual network. The first question that it's going to have is should we use managed disks? And notice next to that is a little question mark. And when I hover over it, it tells you what that means to use a managed disk. And this has to do with redundancy and fault tolerance and so on. Managed disks are generally available in all of the major distribution points for Azure, but not in every location.
Next it wants to know what virtual network we should use. As you can see, once again it gives us help. It tells us that they are logically isolated from one another. But you can explicitly configure the IP addresses, subnets, and so forth. We're going to go ahead and leave the default. Similarly with the subnet and public IP address, we're going to let Azure configure that for us. You would change this if you had specific needs for the IP address.
For example, for corporate VPNs and so on. Let's come down to the extensions. We have no extensions, but this is where you would do configuration of antivirus protection or other things that you might want to add to your virtual machine to extend its capabilities. High availability has to do with the redundancy of your application, how many sites your application is going to be deployed to.
You can enable boot diagnostics, that is to say, how much you want it to monitor your program. And you can set whether guest operating systems have diagnostics enabled. We're not using a guest operating system, and so we have that disabled. And then we're going to set the account for the diagnostic storage that is where your log file is going to go. Once our settings are set, we can go ahead and click OK.
You can see on the far right that Azure is going to now deploy our virtual machine using within that virtual machine Visual Studio Community 2017 running on the Microsoft Windows 10 platform.
- Examining and personalizing the Azure portal
- Creating an app service
- Creating an ASP.NET application with Visual Studio
- Viewing your published app
- Creating a virtual machine
- Triggering Azure functions