Azure Virtual Machine (VM) Tutorial | Infrastructure as a Service (IaaS) intro

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Nice, I'll queue this up. My first thought was if it's less than 10 minutes then it's not even worth watching, so thank you.

👍︎︎ 1 👤︎︎ u/blgdinger 📅︎︎ Dec 26 2019 🗫︎ replies
Captions
virtual machines are beating heart of any cloud out there when working with Azure it is critical that you know at least basics of them today a quick introduction into other virtual machines stay tuned so the other virtual machines so let's start - a virtualization virtualization is emulation of a computer system those virtual machines work similarly to how physical computer would work and what you're purchasing is a guest operating system being emulated plus the space to do your user configuration and in nature this is your virtual machine hosting environment it provides you a scale from even tens or hundreds to thousands of servers it's on-demand so you can purchase it whenever you need it and there's a bunch of tools allowing you to work with virtual machines very easily very fast one thing to remember is that when you're moving from on-premises you had to manage everything and when moving to the cloud there's already few things that you will not have to manage because cloud provider will manage this for you this will be a storage so actual hard drives underneath your virtual machines networking some networking cards and computes of those actual physical machines and what you'll still have to manage is the virtual machine itself operating system the runtime in case of let's say web application this could be IDs on the windows or nginx on Linux etc etc so you have to still manage that when compared to platform as a service you have to manage a bit more so if you would be using observers you wouldn't have to manage the runtime operating system or virtual machine underneath that system this is advice that you still use platform service whenever possible and only go back to virtual machines whenever necessary by your design and in case of sass of course the application is being managed by the cloud provider as well so how does virtual machine service work there's gonna be a couple of things that will be created when you create a virtual machine so I want to talk briefly about each one of them first of all you're gonna have a virtual machine this is your logical management resource so you're a single point of management for a virtual machine you can scale up and down at the disks configure extensions and a lot of different stuff when you create the virtual machine first of all you're always gonna create an OS disk so it's an operating system where your system is installed there's also boot volume under additionally with each VM you will also get a temporary disk the cool thing about this this is an SSD a very fast SSD that is included in the price of VM so you don't really pay for it additionally what is good use case for that is a short-term storage for your application data if you have some swap files caching you can use the temporary drive to put the data there just don't put anything permanent because you might lose it during the maintenance additionally each VM can have a data disk from one to many data discs and this should be used for application data under those this can be very large and the performance lies depending on the size of the virtual machine and the disk that you choose what virtual machine also has is a network interface in short n I see this is your connectivity between your virtual machine and your virtual network it is your place where you configure private IP for your virtual machine and this private IP is directly connected to a subnet which the network interface either cites n and subnet is part of the virtual network for you to segment your network just like in any on-premise environment and subnets are part of virtual networks and virtual networks are you networking building blocks in order where you'll configure your VPS and other spaces for the elements of your network so if you assign another space on a virtual network it is propagated to a subnet and then add to a network interface which assigns a private IP to a virtual machine it can be both dynamic or static so whenever and the other resource we and that network connects it can refer to the virtual machine using the private IP but what is important here is that there's another element here it's called network security group it's a logical object that allows you to filter all the traffic to that virtual machine either outbound or inbound and allows you to create a rules in order to filter that effectively additionally you can create a public IP for your virtual machine so this public IP will allow you to connect to your machine from the outside of your network and you can also assign fqdn name for that virtual machine if you want to lastly you also have a diagnostic storage so this is where you store your boot and always diagnostic logs for your virtual machines if you have any issues with starting virtual machines this is the place to look on and this is a standard storage container as you see there's quite a lot of resources that will be created when creating virtual machine but most of them are very simple in the use case so what are the key features of virtual machines first of all you can have both Windows and Linux OS you can use extension and automation options there's a lot of those options for you in order to configure virtual machines even without logging into the virtual machine itself you can do custom images if you want to so if you can pre build the image for your virtual machines and use that as a starting point for the new virtual machines you can configure high availability you have reached monitoring capabilities and three most important ones are availability sets availability zones and skill sets so let's talk about those a little bit scale set is a feature of virtual machine in order to allow for higher scale computing and it is created from a single image and with that image you create one or more identical virtual machines and what is additionally provided here it's a load balancer so whenever there's any traffic coming to your skill set it is automatically load balance across those servers and without the scaling features you can define either autoscaler rules based on a schedule or daemon to create more virtual machines based on those rules additionally you have something called a ability sets and the way they work is by grouping your virtual machines and you have something called fall domain those are the groups of virtual machines that they have the same power source and the same networking switch so they protect you from the hardware failures of that kind additionally each full domain has a lot of update domains update domains is again a group of virtual machines that can be restarted at the same time and if you configure a virtual machine availability set for instance for free and let's say you configure that set for free fall domains and for update events what other will do is will choose automatically which update domains and which full domains to use you can have up maximum three full domains but up to 20 update domains and when you start creating virtual machines are all ultimately put them in respective update and photo mains so that the high ability is achieved depending on your configuration one thing to remember is that if you're working with multi-tier applications remember to put different here of your application in different other limited set because you cannot choose which update domain and folder main does it go to therefore you would end up with a scenario where it is possible that your entire tier will go down because the thing that here will be put at the same for instance update domain so this is very important to remember here and lastly you have something called availability zone availability zone is also a group of servers but they share the same cooling power and networking across those servers and those are pretty much that separate data centers so they protect you from data center outages and you can choose which virtual chain lands in which of elitism those are the all available options for you to use when choosing high available and highly scalable environment for your virtual machines in order there are many typical scenarios for using virtual machines like on-premises gateway services or Bastion hosts high performance computing pod jobs cluster solutions like HD insights data breaks etc lift and shift scenarios where you just moving to the cloud without redesigning or your hosting service that is unavailable in your cloud otherwise like for instance in case of ETL this could be airflow so there's a lot of scenarios that you still want to use virtual machines for but if you have a service that is available in Azure as a platform service equivalent try to use that instead so what are they damaged for today there's a lot of demos first of all most of them are very quick but I will start with creating virtual machine then I will talk about what are the other resources that were created i will showcase those in a portal I will connect through Remote Desktop Services to a virtual machine on Windows then I will create another virtual machine using CLI to show you how fast this connect through SSH configure that virtual machine using extensions manage network security group and also manage disks from the portal perspective so let's jump to the portal typically I like to open this mini and hit create resource to create all the resources but in case virtual machines I much more prefer going here to the virtual machines tab and hitting up because brings me to the proper template and allows me to create a research group I'm gonna create a new resource group called DM demo next I'm gonna call my new VM called em1 I'm gonna choose a North Europe point for my region I'm gonna choose availability options on this is the place where you could configure one of those options that we're talking about like a scale sets up a widget zones and availability sets but I don't want to do any of that right now I'm gonna choose Windows Server 2000 19 I'm not gonna choose a spot instance spot instance is an interesting new thing in order where you are able to get reduced-price virtual machine for temporal time for some small batch processing in case of size I'm gonna choose something bigger because it's virtual machine with Windows Server I'm gonna choose ds3 V 2 I'm gonna need to choose a virtual machine user names that's going to be admin user and I need to type a password later you have inbound port rules so you need to specify how you're gonna connect to this you can either specify none which is the secure way of doing that and then opening specific ports yourself on a network security group or you can do it in a quick template here by specifying that you want to connect through Remote Desktop Services to this virtual machine over port three three eight nine of course you get a warning here that this should not be used for production and you should use specific IP addresses later on next you can go to the desktop in this tab you can specify the type of disks so you can have either standard a HDD standard SSD or premium SSD depending for your processing needs for the OS type of course the fastest the better and additionally you can create and add additional discs at that time of creation here if you want to next you go to the networking tab this is already pre-configured so there's gonna be a new virtual network VM demo v-net created with a default subnet this VM will also have a public IP assigned there's gonna be a network security group attached to it with a configuration for Remote Desktop Services and we don't put this behind the existing load balancing solution next we go to the management this is where you can get additional monitoring diagnostics and Security Center subscription identities auto shutdown which is one of the cool features you can enable your VM to be automatically shut down on the specific time when creating new virtual machine in a portal this is automatically enabled so make sure to change that if you don't want it and next in advanced you have some extensions if you want for now I'm gonna leave it and hit reviewing create and hit create remember to check the price if it suits your needs so let's wait for that deployment the virtual machine was created so we can go to the resource of course we're gonna be navigated to the virtual machine itself so I'm just gonna quickly show you what was created in a research group as you see seven resources were created and the ones that what we were talking about so diagnostic storage account the virtual machine for management IP address network security group network interface etc etc most of the things that you want to manage about the virtual machine are still under virtual machine settings so if you go here you'll have your name of your source group the status of the VM is currently running the public and the private IP address that were assigned from your network interface configuration so if you just gonna copy that you can start connecting the name of the subscription some of the most common information and here most of the things are actually just a quick overview tabs and quick navigation to the other elements for instance if you click disks this is the way you can actually manage disks post creation in extension you can manage extensions in configuration you can change everything about your virtual machine then you need to you can change that availability and scaling if you are using scale sets etc etc so the most important thing for us right now is this connect button you have three options to connect to the virtual machine through remote desktop SSH or Bastion host this is another service another which we're gonna cover in the future but for now we're gonna use Remote Desktop Services and to do that simply click on this download ntp file we're gonna get this RDP file on your drive which you can use to connect to this virtual machine and if you go to your downloads folder there's gonna be a VM 1 RDP file available for you hit connect and you need to choose more choices use different account and specify admin user and provide the password you typed during the creation hit ok hit OK again and you're connected to your virtual machine one thing that I like to do when working virtual machines is not using the default remote desktop experience I like to do it and use something called remote desktop connection manager this is a very small very old tool from Microsoft that is also very simple it allows you to create a list of virtual machines and connect to them and in here it create a profile I called mine RDP and it creates a small file new Drive which saves that configuration so it's very cool to that you can save entire application configuration when working with multiple virtual machines and to add new server you simply right click add a server and you need to provide the server name in this case it has to be a public IP of your virtual machine so let's paste it in you need to provide the discipline and so our display name was called VM one it's not required but it's nicer to know which of the function you are connecting to you need to provide logon credentials in which case it's again admin user with our password and no domain but one very cool thing is is the reason why I actually use it is the remote desktop connection settings because here you can unselect this box and select same as client area when you do it and you hit connect to this virtual machine it will initialize with the resolution that fits into this window which is much more convenient when connecting to virtual machine so let's try that let's not ask about the certificate again and let's connect to this virtual machine and as you see this is much easier to manage done with the full screen experience next I want to show you how easy it is to connect and create virtual machines using common line interface go back to the portal and open cloud shell inside of the cloud shall we can use our CLI in a posh to create new virtual machine you will actually need only two commands to do that first of all we're gonna create a resource group and to create a research group we're gonna use AZ group create call this group VM demo CLI and created in north Europe and group was created and now we're gonna create a virtual machine and to create a virtual machine you simply have a CV and create I'm gonna call it my Linux virtual machine and this will be residing in VM demo CLI research group again we're gonna create an admin user but this time we're gonna use SSH so we're gonna generate SSH keys and this will be open to machine in also North Europe so let's hit create a virtual machine was created and to confirm everything works when we can actually ssh to that virtual machine so let's try that SSH type SSH in a command line you need to specify admin user which is the one you're connecting to virtual machine odd and you need to specify a public IP which you actually have here so let's place that in and press Enter do you want to connect for sure yes I do and let's connect notice that we were able to actually connect to a virtual machine using SSH because the keys were generated locally and added to our drive let's let's logout from this virtual machine for a second and open our home folder and if you allows there and go to your atom folder and dot SSH you will actually see your keys being stored here so make sure not to leave those later on but don't load them for future use but also for security reasons because those are stored on your storage account so let's close this let's open resource group and notice that if I would actually go to our resource groups we would find VM demo CLI we've pretty much the same elements for the Linux virtual machine so let's go back to our Windows virtual machine and right now let's demos an extension I'm gonna use a quick extension when I will upload a PowerShell script a very simple partial script that will install a web server and say hello world with the name of our virtual machine the script is very simple it simply adds a Windows feature a web server which is IES and as a content to a default HTML file which responds with hello world with the name of the computer that we're on so let's go back to the extensions tab head add extension and in this case we're gonna use custom script extension hit create and you only need to provide the script files with optional parameters so I'm gonna upload my web ps1 script and hit OK and simply wait and the extension was installed you get the status of provisioning succeeded and would it work if I copy this public IP address into the browser will it work let's try that so let's place the IP and we're gonna get the response that the site is not reachable and why is that well it's actually very simple answer because we never opened a port for this website in our network security group and to do that you go actually a couple places to do so you can actually go to the resource group go to your network security group and in here in the inbound cell QT settings you need a new rule because we never open this virtual machine for a traffic over HTTP so we need to add a new rule that allows the traffic from any source any port range into our port 80 and we call it priority of hundreds of the highest priority and call it HTTP port and of course underscore here hey Dad now the role is being created we need to wait a second rules in network security group are being resolved by priority in going from the top to the bottom from the lowest to the highest number and when they are encountering each rule is specifying if the traffic is allowed or denied so in this case we allow two port HTTP that means we can go back to our site refresh it and as you see hello world from VM one so everything worked perfectly fine remember here you always get this information that your RDP is still open so if you don't need RDP anymore later they will lead that rule or specify a specific IP address maybe from your office or your work home so the very last demo that I want to show you is an adding and managing disks so I'm gonna go to my VM so let's scroll it up let's open VM one go to the disks and let's add a new data disc I'm gonna give it a number of one so this is the logical number we need to create a new disk because I don't have it now so my data disk I'm gonna place it in the same resource group as previously I want it to be empty so source type is known and I want to change the size either need as big as 1024 gigs which is one terabyte because I'm gonna pay for it very important remark here is that depending on the size of the disk you get maximum of operations per second maximum throughput for your disk but this also correlates to maximum throughput of your VM so the two needs to be aligned definitely check that documentation when choosing the DPM size and the disk size if the throughput of the disk is something that is important to you so right now I'm gonna choose 256 gigs hit create and wait for the creation of the disk when the disk is created remember to make sure to hit save for the virtual machine to update it to use that disk after creation once this is done go back to the remote desktop and perform very last step you can do it for your Y or partial in the UI you go to the file and storage services go to disks and you will see that there's a new volume that is currently unknown and if you would open your virtual machine PC you would see there is no partition currently using this new volume so what you need to do is create new volume hit next again next yes okay specify the volume size drive letter hit next file system type and hit create hit close and go back to your PC and now you are ready to use your newly attached volume on and manage disk in Azure the topic of virtual machines is so big that you could spend months or years researching it but you should at least cover the basics and know the basic by your heart that's it for today if you liked the video hit thumbs up leave a comment and subscribe if you want to see more and see you next time [Music]
Info
Channel: Adam Marczak - Azure for Everyone
Views: 40,179
Rating: undefined out of 5
Keywords: Azure, VM, VMSS, Availability Zone, Scale Set, Availability Set, Virtualization, Tutorial, Step by step, IaaS, Infra, Infrastructure, Virtual, Machine, Virtual Machines, hyper-v
Id: iUaTq06m26g
Channel Id: undefined
Length: 24min 33sec (1473 seconds)
Published: Thu Dec 26 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.