Create a Windows virtual machine in Azure

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to walk through the microsoft lab about creating a windows virtual machine in azure now in other videos i've done we've created linux machines mostly because the instructions told us to and because they were kind of the easier ones to create in this video we're going to actually create a windows virtual machine and we're going to highlight some of the differences that you'll see there as well as dive into some of the aspects of working with virtual machines in azure working with windows virtual machines sure uh so here it is uh beginning of the lab it tells us a few learning objectives uh and then we'll go ahead and jump to the introduction uh so here they give us a various scenario about working for a company that does video data processing you're building a pla a prototype in order to test the environment but you need a lot of data basically you're getting several cities to collect their traffic data um it's not all in the same format oh some some put them in mpeg format some put them in mp4 some put them in avi uh basically you have to convert the video data from one format to another so in order to do that you're using virtual machines to do the initial processing and therefore you need to build up some vms for it uh because you only need this temporarily you're gonna put this into azure one of the great uses of azure all right next so creating a windows machine in azure it's sure uh not super hard but we'll walk through it anyways uh introduction to azure yep gives you processor cpu memory storage network uh pretty much everything you would expect from a windows machine whether it was physically in front of you or on the other side of the world uh we can deploy these virtual machines in a lot of different ways we can use the azure portal we use the azure cli we can use powershell but then we can even use what's called an arm template basically once we've created our first machine or prepared to create our first machine we can actually save that along with other components into a single arm template that we can then deploy the entire environment in together when we're going to create them there are a lot of pre-configured options like we can see right here in this screenshot there's windows red hat ubuntu and so on as well as some specific applications that are already installed on that uh let's see specifics yep virtual machine storage virtual disks virtual network a network interface as well as an ip it can be a public ip or just a private ip depending on what you're doing choosing the image you can upload your own image when you're doing this so it says you can also create and upload your own images which is extremely helpful if you're running a customized operating system or if you have specific applications that you want to run across multiple machines you create one image and then deploy from there however the built-in templates oftentimes are a really good starting point for most of the environment sizing the vm yep normally you want to make these as big as you need for to meet your goals but not so big that they end up wasting money yep talks about them talks about the various needs you might have for them such as graphics rendering general use large memory data storage and so on mapping disks data unmanaged of managed versus unmanaged disks basically an unmanaged disk you will have the option to choose one of these the unmanaged disk is kind of the older way to do it there's a lot of extra overhead that you have to put in for the environment to work properly managed microsoft takes care of it all makes it completely transparent to you you don't have to worry about it if you have an existing environment that uses unmanaged you probably want to stay with that at least for those machines but move to managed if possible all right let's go ahead and start off the exercise i'm actually firing up the sandbox right this moment i accidentally did that in a different tab okay so it's creating my sandbox getting it all ready and when that's done we'll fire up the azure portal uh if you're working in these sandboxes and you're going from one sandbox to another uh just a word of caution you'll want to close down your browser or at least the azure portal between the different sandboxes uh sometimes the azure portal doesn't like changing like that so we'll go ahead and open up the azure portal there we go and right now i should have zero resources oh okay i've got some network security groups that doesn't look right why do i have a sample vm in there i should not have a sample vm this is the closing of the portal like i was mentioning there we go that's looking better uh yeah so if things aren't working look don't look proper in your azure portal close it open it back up and hopefully that will resolve the problems all right so according to the instructions i want to start off by going and creating a new virtual machine so for that i'm going to actually click on the hamburger menu and click choose create resources gives me lots of choices to choose from i can choose from these popular options or i can also choose let's say for compute i could choose that and then that shows me even more compute options i can even start typing in various names in here such as windows and it will filter based on the windows tab or windows name oh there's a lot of windows a windows server searching oh wow even more of them uh windows server 2016 and even more oh actually uh the instructions are telling me 2019. whole bunches of them um let's go ahead and let's get back to what the instructions say windows server choose windows server image and choose windows server 2019 data center all right so windows server that's what i wanted there we are plan and here i want the small disk it says small disk server 2019 data center so i don't want containers right there all right create is that correct yes create maybe all right so this is where we're dealing with possibly just some random web browser issues i'm going to go ahead and hit f5 to refresh the whole web page and let me actually go back to home create resource we'll start the whole thing over again uh let's say compute see all windows server no server small disk 2019 data center and create there we go all right so subscription concierge resource group i'll choose the resource group that's available for me go ahead and give it a name so ecg test that works uh with regards to the region does the instructions tell me specific regions uh west us two looks good there we go uh availability options if i want an availability set or availability zone i would specify those here because this is a lab environment and i only need to test i'm going to set that to none uh image this is pretty much the same image we chose up above but you can see there are others available to me as well as a browse option so i can find even more virtual machines to pull from as far as change size let's see it's telling me i want to choose ds1 v2 and we're currently in ds2 so let's go ahead and ts1 v2 right there recommended by image publisher uh if none of those sizes work for me i could choose see all sizes or select size down here in order to get a larger list administrator name again i cannot use administrator uh because admin [Music] well it can if you typo it yeah cannot use included may not include special reserved words the name administrator is a special reserved name that literally everybody in the world knows about therefore you don't want to use administrator because everybody knows about it and everybody will try to attack it in that case i'm going to change it to test admin that's still not a good name but for my test lab that is perfectly fine password has to be at least 12 characters has to have three of the four complexities so uppercase lowercase number symbol three of those four items as far as the inbound ports by default 3389 which is rdp is allowed which will allow me to remote desktop into this machine which is perfect and then licensing do you own a license to this or not i'm gonna say no this allows me to rent not only the virtual machine but it allows me to rent the windows license at exactly the same time if i've already purchased the license somewhere else maybe i'm replacing a physical machine into the cloud i could say yes i own the license it saves me some money but i also have to keep track of that license and make sure i am actually using it properly all right so next desks so by default it tells me yeah we want to use a premium os disk or premium ssd drive for the os disk perfect it even includes some encryption so that nobody at microsoft can necessarily read the data on this drive unless they have approval great if i scroll down here it talks about data disks and we can create a data disk on here we can add into it so i'm going to say create and attach uh let's see data disk zero that seems like a good name for now source type i'm not cloning i could actually have this cloned from another drive i'm not going to do that i'm just going to leave it as is 10 24 gigabytes sure a one terabyte drive that looks pretty good uh encryption type sure and okay i see there goes ahead and attaches i can specify some caching options if i want i'll leave those blank for now next for networking uh this is where i would be able to specify what kind of ip addresses i want and what type of ip ranges i might want for so i instance i want to keep that create new under virtual knock no i want to change that yes okay i don't want to use the 10.000 wrench i want to use something else so i'm going to create a new network and i'm going to call this i don't know my network horrible name uh what i'm going to do is instead of 10.000 i'm going to use 172. oops 72.16.0.0.16. so the entire class b 172.16 range to be available to this network and inside of this network i'm gonna have a subnets yeah uh inside of this i'm going to have a subnet 172 16 1.0 24 and let's call this uh oh i've been getting these backwards let's call this uh test network 172 16 1 0 24. so this is the actual subnet in this entire space that i want to specify there we go the idea here my the network maybe i have a building on the east coast and so that's going to be the ip range for all the everything that's on the east coast and then here i specify a subnet so maybe this is the first floor of that building on the east coast all right management do i want to do boot diagnostics um sure says it's recommended i'll leave it uh os guest diagnostics does that tell me um metrics every minute from your vm sure why not oh it's asking me to create something i'll come back to that maybe later do i have an azure active directory to include yes or no do i want to turn on auto shutdown so the machine saves me money yes or no so i want to do os patch installations um sure see advanced any kind of extensions tags any kind of customized tags i might want and then finally review and create and we have a brief breakdown of what we're creating here including our os and our disks and i'll say create all right so while that's creating it's gone uh we can watch that right there uh but while that's creating let's go ahead and go to the next page of our instructions which is using rdp so rdp remote desktop protocol it's a way of of remotely accessing a desktop on a windows machine across the network uh let's see it talks about how you can use a site site vpn in order to access this or you can use rdp rdp amazingly is actually customized or includes encryption built in so you don't really have to worry about security around it there is still some security concerns but not the initial default i just created a machine so talks a little bit about it there is a tool built into windows that will help you with rdp it will look [Music] something similar to this this is actually an expanded version if you click the hide options down here you'll get a shorter version which just shows like the logon settings let's see connecting to azure how to connect we'll actually go through that here in just a second all right so connecting to the windows machine uh hopefully our windows vm has deployed it takes a few minutes so it may not be so i'm actually killing a little bit of time here uh see it talks a little bit about how we're getting files we're then going to upload them and change them sure all right so connect to azure with rdp we need the public ip address of the vm right and we need the port number that rdp is running on port number by default is 33.89 and then the public ip is actually really simple to find in azure let's see are we done yes we're done all right let's go and go to that resource and we are going to download an rdp file now in order to download the rdp file the rdp file contains the ip address and the port of the machines that we're connecting to and in order to do that what we do is we click this connect button right here now we could manually connect to this for instance we can see over here on the right hand side here's our public ip address and we could manually connect to that but if we simply use the connect button right here it takes care of it all for us so i click connect asks me what type i want rdp says okay here's the ip here's the port number download your rdp file uh we see it went ahead and downloaded down here at the bottom if i open this um i get a little pop-up on another screen here says you haven't connected to this machine before do you trust it i'm gonna say yes uh then again opens up another window which asks me for my credentials you can see here in fact it's trying to log in as edgard uh specifically with my microsoft account i don't want it to do that i want to log in with my test admin credentials that i created for this virtual machine so to say more choices use different account change the name to test admin and then my super secret password and hopefully i typed that in right i don't think i did and okay all right we then get another window here saying hey there's a certificate error do you trust it again do i trust it yes i trust it and then we get a remote desktop connection window which then opens up on my screen and it goes black for the first couple of seconds just because what this machine just turned on it's the first time logging in it takes a little while for it to connect all right now at this point let me actually maximize this window and it should take over my full screen here there we go it gives me the standard hey there's a network connected here what do you want to do with it it opens up server manager and will ask me what kind of services or features i want to install uh once that's done go ahead and look at the local drives we'll look at this pc actually can i make this bigger uh apparently doesn't like to scale oh can't be changed from a session okay um we'll start off and we'll see yes there's two drives there's a c drive uh which is where the os is stored installed and then there's this temporary storage if we open this up there's a file in here called data loss warning readme and tells me hey this is a temporary disk any data stored on this drive will be lost don't use this for storing any applications in fact here's a url or a link to look at with more details basically this is some free storage you're given by microsoft for things that can and will be deleted lots of uses for that such as a swap folder or a temporary database on a windows server one thing we may notice in here is our second data disk we created a one terabyte data disk in the gui when we created this virtual machine and i'm not seeing it here well it's because we haven't created it yet we haven't actually provisioned it if i come into computer manager of different ways to do this i like typing it from the command line uh computer manager shows up and we go to disk management and what we'll see is first off hey i've got an uninitialized disk do you want to initialize it okay sure i then see disk number two down here it's my one terabyte unallocated if i right click on that and say new next next next i'll leave it as new actually i'll change that to data data 1 and finish it then formats it and my data one disk should be showing up here in my list here there we go as drive f and one terabyte in size yay so i've got my second disk again three different disks the os drive on the c drive only put on there the operating system put as little on there as necessary your data drive put all your applications and all your data on your data drive and then temporary storage put stuff that can and will be deleted there's lots of reasons why it maybe may be deleted but definitely only put your deletable items in there all right let's see what else have we got here as far as our instructions download the rdp file connect to the vm at this point this is where we install any kind of roles or software so if we were to set up a web server or mail server or database or something like that we would install those at this point again try to install as much as possible on your data drive that way if the os crashes you can simply throw away the whole virtual machine and then reconnect the data drive to a new vm configuring the virtual machine network settings all right first one opening up ports oh there's lots of reasons why we might open up ports uh for instance maybe this server maybe the server is going to be hosting a website but we want to open up uh ports on that website all right oh we do that through here uh see we go to the networking tab now we see we've got some inbound rules right there for the overall uh nick and then down here for the specific server so i can say add inbound ports a couple of different options right now in the advanced mode if i click right here where it says basic it will take me into the basic mode and so then i can choose specific custom or a specific port such as 80 443 um 22 for ssh and so on let's go and say 80 and then add now we'll go ahead and add the port in here with and then take effect within a moment or two the firewall will sometimes take a few seconds to run let's see come in here also change it to [Music] actually so that was the basic mode right there so if i wanted to allow for instance ftp just simply choose ftp as the service it no it finds the port and everything or i can go into the advanced mode and i can start being a little specific do i want anyone to access this specific ips specific tags service tags in my environment or specific application security groups to access this i might say any i can specify the source ports i can specify the destinations [Music] well let's see this was 172 16 1.0 24. so now i can say anybody can access machines on this network on port 21 udp icmp tcp allow deny this name allow ftp and a description detailed description here so this would be allow ftp of video files and then add that was a different rule maybe i was doing like 10 different things i'm not exactly sure what that arrow was for so we will assume that that worked uh so let's see that's opening ports uh network security groups and security group rules uh how is your users rules and then the summary all right i will throw in here before we run out of time uh there is one common thing that people will want to do especially if you're coming from a windows server administrative background uh you may log into this machine and you may look at the nick and you may want to change its ip address uh let's see network and sharing center or even actually this would work as well local server uh and then here i will be able to see that the ip address is come on uh ip address is assigned via dhcp hmm that's interesting what is my ip address my ap address right now is 172 16 1.4 what if i wanted to change that to like 1.10 well if i'm coming from a windows server background well i simply would go into my change adapter settings and come in here and edit this guy and manually type in the ip address i will tell you from experience this actually breaks things you don't actually want to change your ip addresses in here so very important not to what you do is you actually come into azure again in the network settings close that uh virtual machine networking and you want to change the interface this guy right there uh this one's always kind of hard for me to find but you basically what you want to do is you want to change the ip address through repeat config through azure is what it is and i think the browser's there we go um there we go uh so it's currently dynamic set at 1.4 i can change that to 1.10 and then say save that does actually cause the machine to reboot and you know we're afford to accept the new ip address but that is how you would change the ip address of the individual machines that's something i've learned the hard way uh yeah definitely do it that way if i exit out of that let's look at the other resources that are available to me when i look at the virtual machine on the left hand side we can see our disks right here when i have this disk i can actually disconnect it from the virtual machine and then have it saved to be able to connect to a different virtual machine at a later date i can change the size of my vm right here just simply size up size down this will require the machine to reboot and be offline for a short period of time monitoring definitely lots of metrics and logs and connection monitors are down here um that's including my boot diagnostics which will take screenshots of the machine so if i get a blue screen or kernel panic or some other error it will actually show right here and then probably the most important one i forgot what my password was well there's a reset password option right here so you can go ahead and you can change uh you can change the username and type in new passwords and then have it reset the virtual machine to those new passwords so even once you've set it up if you've forgotten what they all are you can easily come back and get them working again all right so there we have it that was creating a virtual machine in windows a windows virtual machine and azure um pretty easy to be able to do that there are the few catches that you have to worry about with regards to like ip addresses and passwords and how to configure these where your drives are there's a few quirks you have to pay attention to but overall the process to be able to set up and get a vm working in azure is super easy especially when compared to setting up a physical machine in a physical data center
Info
Channel: Ed Goad
Views: 1,673
Rating: undefined out of 5
Keywords:
Id: o3s2H26Plco
Channel Id: undefined
Length: 31min 54sec (1914 seconds)
Published: Thu Sep 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.