hello everyone my name is Abhishek and welcome back to my channel so today is day three of our devops Zero to Hero three hero course so if you haven't watched the previous videos uh day one and day two and also Day Zero so you can watch them on the devops playlist so I have created a devops playlist and uh I'll keep uploading all this devops Zero to Hero uh videos on the same playlist so you know you can go back and watch the playlist and then come back to the day three and today we are going to talk about virtual machines which is very very important concept of devops so you know if you don't know what is a server itself then we will also learn that if you don't know the concept of physical servers we'll also learn that today and we will try to learn everything with a real world example let's say you watched a lot of videos on Virtual machines and you still don't understand what a virtual machine is so today I'll make sure that all of you will understand the concept of virtual machines with a real world example and trust me after this video you're not going to have any notes on what is a virtual machine why are they different from physical servers why is it an overhyped concept or I mean is it a overhype concept or why there is a lot of hype around virtual machines so we'll try to learn all of those things so uh keep watching the entire video uh even if you know the concept of virtual machine we'll try to uh understand this is a very uh real world perspective so that you know you you might have missed something while learning about virtual machines and I might cover uh those specific scenarios so uh yeah I mean let's proceed and try to understand what a virtual machine is and we'll also see what is the hypervisor is and we will uh talk about like uh how to create these virtual machines also will not create a virtual machine today probably we'll do it in the next video but we'll talk about like what are the different ways to create virtual machines and like I mentioned a real world scenario okay so without wasting any time uh let me uh quickly start with the concept for the day that is virtual machines okay so let's say uh I mean I'm taking a real world uh is there a change in the speaker again no perfect so let's say uh you have a plane land okay so I'm talking about a real world scenario so don't get confused why is Abhishek talking about uh land or uh this kind of thing so if you put devops aside let's say you have a plane land okay you are in your village or you are in your hometown and you have a plane land okay so now what you have done is in this plane land you have constructed a house okay so you took this plane land and you built a house around it okay and maybe you along with your family members you started Living in this plane land okay so let's say this plane land is a one acre land okay and in the entire one acre land you have constructed your team Hall dream house and you started Living in this uh one acre land okay so you are essentially using all the water resources and you're also using the entire land probably you are uh you know you have built a park here or you have a built a prey area and you are enjoying this one acre of land and you are happily living in this one acre of land Okay so one sudden day what you uh realized was okay although you are just a family member like you know you are two or three people or four or five people who are living in this one acre land you all of a sudden you realize that okay I understood that I'm living happily or I'm enjoying this entire property but I don't need this entire one acre okay even though I have a built-in Park I have Garden I have everything I'm still not using most of this land okay so what you have realized is you only require half acre of this land even to live lavishly right you know even if you want to live very happily you just require half acre of it but what you are doing is you are only using uh half acre of it and you are wasting this half acre okay nobody is really using this Africa and it is going unused so what you have thought is okay let me come up with an idea and let me build the same one acre land what you have done is in this one fourth of acre or in this half acre that you have unused what you have done is you have built another property okay alongside with the property that you are staying okay this is the property that you are staying with your family members and what you have done is apart from this you have built another property and you gave this property for rent okay so your comfort or your convenience hasn't changed from step one to step two okay in step one you have the same land you are using the same property that you are using in step two but in step two what you have done is Additionally you have gained access to rent okay so what happened is along with your lavishness or your property that you are using you also got access to rent okay so that means along with you there is one more person who is staining in the same property and you are not interfering interfering in one other things right so he is having access to this one fourth or one one by two icker of the property and you have access to the remaining acre of the property and nobody is Disturbed right because he has his own resources let's say he has built this park in one fourth of acre you have Park in this three fourth of acre he has his own Water Resources nobody is interfering in each other like he is leaving he's he's leading his life happily and you're also leading your life happily so now what happened was instead of wasting these resources what you have done is you have built another land and instead of two people here four people are living in the same land that means now you have efficiently started using the resources so this is an efficiency right or this is inefficient way and this is the efficient way okay and if you are following my videos from day one I'm always telling you that devops is all about efficiency okay where will devops come into picture devops will come into picture in improving the efficiency so whenever you do automation or whenever you do devops your end goal is efficiency so this is the end goal so that's why as a devops engineer you should be looking at improving the usage or you know let's say you're on AWS or let's say you're on Azure you should always make sure that you use your resources efficiently so that's where the virtual machines come into picture okay so I hope you understood this example no I'll turn this example into a real world software industry problem okay so this is a real world problem now let's convert this into a real world software industry problem that is we take the same example here let's say there is a server okay now firstly for somebody who don't understand the concept of server what is a server so server is nothing but you want to deploy your applications right let's say you have your application in your local laptop okay so this is your local laptop and you have it you are a developer you developed a application feature okay you developed an application and now you want to deliver it to the customer or real world for example today you're using google.com Okay or today using amazon.com so all of these things are hosted on a public server so that's why you are able to access these things so that is nothing but a server okay so inside This Server let's say that uh your organization that is example.com what they have done is okay so there is example.com and what example.com has done is they bought five servers okay one two three four and five so they bought five different servers if you see here they're of different different sizes okay so one two three four five so they're about five different servers from HP okay let's say HP is selling the servers so what this example.com or the devops engineered example.com or the CIS admin okay at example.com what they have done is they bought five servers one two three four five from HP okay so what happened is they deployed this application let's say we call it as app one okay so app one is deployed on server one okay now this app one let's say it required 4GB Ram this is just an example in general applications might use less or less uh more GB but let's say this application is using 4GB RAM and it is using four processors okay 4GB RAM and four CPUs so now what happened is this server is actually of size 100 GB and 100 core but you deployed an application of 4GB and 4 CPU okay and all your developers and testers are using this to test your application okay you installed the application server probably Tomcat or web square or web logic and you started this application on this server but of late you realize that this application only requires 4GB and 4 CPU so you are wasting the entire resources okay or there are five different teams in your organizations and what you have done is you give each and every server like you know one server you give for team one two server you give to team two and fifth server you gave to team five you realize that these teams are inefficiently using this servers that is the team fire has deployed application file but application 5 might only require 10 percentage of excel resources that this server is providing again if the server is 50 GB in Ram and if team Phi only requires 5gb of RAM okay what is happening you are wasting the 45 GB that is you are only using 10 percent of the resources and you are unutilizing the 90 percentage of the resources or you are not utilizing the 90 of resources so there came the actual problem or the big rock that is inefficiency okay so always I'm using the same word I'm repeating the same thing that is because devops is all about improving the efficiency so now here the teams are under utilizing the resources or they are not using the resources efficiently so that's why the concept of virtualization came into picture so now what virtualization does is the concept of virtualization will let's say you have this physical server that you bought from HP or IBM okay primarily these are the players who sell the physical servers or microsoftware anybody okay so you uh bought the physical server let's call it as server one from HP or IBM and what you have done is you have typically I mean previously you just gave it to team one okay but with the concept of virtualization what you will do is that on this one physical server you will install a hypervisor okay what is hypervisor hypervisor is a software okay that can install virtual machines on your bare metal or physical servers and what you have done is instead of one server you have created Five servers okay what you are actually doing is you are doing a logical partition okay you are not breaking the server physically right like you don't take your laptop and you break it or you didn't take a server and break it instead you do a logical separation okay remember this one I am talking about logical isolation okay so what you are doing is you are doing a logical isolation of these ones and you are calling this as virtual machine one Virtual Machine 2 virtual machine three four and five okay why we are calling them as virtual machines because they are only logical okay they don't exist physically so they are a virtual machine so that's why we call them VMS Okay so in this case you added efficiency using devops okay so what did you add efficiency how did you add the efficiency by automating the process using a hypervisor what are some of the popular uh hypervisors okay some of the popular hypervisors are VMware Zen okay these are some of the popular hypervisors okay using this popular hypervisors what you would do is you do a logical separation okay you bake this physical server into logical machines or virtual machines and now instead of just team one what can I mean what happens is team one can use Virtual Machine one team two can use Virtual Machine two team three can use Virtual Machine 3 and 4 and 5 respectively this is advantage of using a virtual machine just to repeat or just to make you understand the concept of virtual machine is nothing but you are basically creating virtual environments that function as virtual computer systems okay so here you are only breaking them logically okay you are not breaking your physical server but you are only doing a logical isolation so that's why virtual machines are nothing but they are virtual environments which function as a virtual computer systems and this virtual computer systems has their own CPU has their own memory okay and they also have their own Hardware right so this Hardware or this vm1 is not depending on vm2 for either memory it is not depending on vm2 for CPU or it is not depending on uh vm2 or vm3 or vm4 for Hardware okay so that's why they are called logical computer systems they have their own memory they have their own CPU they have their own Hardware but the only difference is instead of physical server they are logical servers and who is doing this entire process your hypervisor is doing this entire process so hypervisor is a key that is dealing with your virtual machines or a hypervisor is something that is creating your virtual machines so for example it's okay if you don't understand the concept of cloud but just for your reference the same concept is followed by Amazon GitHub Microsoft or any virtual machine platforms or you know any Cloud platforms so what this Cloud platforms do is let's say Amazon what they do is they build their data centers uh let's call an area called Mumbai in India okay so let's say there is an area called Mumbai in India what Amazon does is if Amazon has a data center in Mumbai what that means is they buy or they you know they take a huge land and what they do is they install their own physical servers here okay they take all the pre and preventive care and they build a data center in Mumbai this is just for example it can be Mumbai or it can be anything okay so they have their own data center in Mumbai and what they do is they create uh sorry they install hundreds or thousands or millions of physical servers okay I'm talking about physical servers okay so just like your example.com has bought five servers or you know they just I mean in the previous example if you go back so here I said example.com has bought five servers from HP right similarly what Amazon or uh you know uh any uh cloud provider do is they buy millions of servers or they build their own millions of servers and they put them in a data center okay let's say this data center is hosted in Mumbai and now whenever a user it can be you it can be me or anybody who makes a request to Amazon and who select their reason as Mumbai okay if you go to Amazon what you can do is you can uh basically ask for a virtual machine from Amazon or AWS in general and in AWS you can select your region as Mumbai and what you can see is I require I mean I want one virtual machine or in Amazon terms we call it ec2 instance okay in general it's a virtual Mission end of the day okay you request for a virtual machine in uh from AWS in Mumbai region what happens is your request will be sent to one of these data centers and on one of these physical servers okay on one of these physical servers a hypervisor is installed in General on all the physical servers hypervisors are installed and this hypervisor will create a VM for you and it will share the required details okay this is how the world of virtual machines operate okay so the world of virtual machines operate on hypervisor whether it is Amazon whether it is Google whether it is Microsoft using uh Azure they all have their hypervisors installed on the physical servers and whenever somebody is requesting for a virtual machine or easy to instance or in in different Cloud platforms people call it in different ways but if you take a general term called virtual machines what happens is this hypervisor will give you a virtual machine from one of the physical servers depending upon the region that you have selected okay so this is how you create virtual machines if I just have to repeat this one okay let me just take a new slide perfect so here let's assume that there is a huge data center for uh from a company called Amazon or Microsoft okay this is a huge data center okay let's take one simple example that is AWS and this region is called Singapore in tomorrow's class we will do it live I'll show you how to create a virtual machine on AWS we can also do it through some scripts we'll do all the things like you know we'll create using automation we'll create using manual process everything but in today's class just understand the theory or the concept of it so AWS has their data centers in Singapore they have the data center in Mumbai okay they also have their data center in us let's say Ohio okay and in different regions okay wherever uh AWS feels that uh their customer base requires a new data center to avoid latency problems what is latency latency is to avoid like let's say I'm in India and I'm creating a virtual machine in uh Ohio and I'm creating a virtual machine in Mumbai so in comparison because I am located in India in Mumbai I'll have less less latency okay so AWS finds their potential data centers that are required and they install the data centers now let's say this is a data center in Mumbai okay and what Amazon has done is they have installed racks inside in general servers are installed using racks I mean there are rack servers there are other different kinds of servers so what AWS or the AWS administrators have done in Mumbai is they have created multiple racks and you know they have multiple physical servers here this is just for an example or your visualization in general the concept of installing a data center is very complicated but just for your reference I'm making it very simple here so let's call this as physical server one physical server 2 physical server 100. okay so these are the different physical servers that Amazon has installed in Mumbai now each of this physical server can be 100 GB in Ram and 100 core that is 100 processors so being a devops engineer what I have done is I have so today I'm sitting in Hyderabad okay and what I've done is from my personal laptop using some scripts or using a direct AWS UI that is using amazon.com sorry uh AWS not amazon.com using the AWS portal what I've done is I have requested for a virtual machine in Singapore in sorry in Mumbai region okay I have requested a virtual machine and the specification that I've requested is 10 GB RAM and uh 12 core processor let's say okay I've used some automation or I've manually I went to the Amazon UI and I've requested for this configuration so now what AWS will do is it will receive my request okay AWS received my request right and now what AWS will do is it will look for the physical server that is ideal for my uh requirements okay let's say P1 is already occupied now p100 is unused okay and AWS feels that my requirement specification uh like let's say p 100 has 1000 GB of unused CPU 10000 GB of a new CPU uh sorry unused Ram so uh this request seems to be very simple and p100 is ideal at this moment of time nobody is using it or uh you know AWS requirements are matched what it does is it will as the hypervisor that is installed on p100 okay there is always a hypervisor so the hypervisor AWS sends a request to the hypervisor to create this virtual machine and AWS sends me back this virtual machine okay what happened AWS sent me back with a virtual machine what what does AWS and IP address and all the required information to access this virtual machine okay end of the day I just have logical access to that virtual machine or a virtual access to that virtual machine physically I don't own that virtual machine even though I am paying money to AWS right let's say for this requirement I am paying hundred dollars to AWS this is just an example again I'm paying hundred dollars to AWS but I cannot go and ask AWS that where is my virtual machine I want to go and fix something in my virtual machine AWS will simply require uh reject your request saying that okay your virtual machine is installed in the Singapore data center of us but you don't have access to it because you only get to have the IP address of it and the key value pair that you have requested and using these things you can access the virtual machine that is the most that you can do so this is how the entire concept of virtual machines will work and if you go back to the initial slide what happened with devops the efficiency is increased instead of one acre land that is being wasted here that only the family that is using require half acre of land and the half acre is going on you it's similarly if Amazon did not come up with this concept okay what have you what would happen is their Mumbai data center would be at most used by 100 people right because there are 100 physical servers so they can only share this 100 physical servers with 100 teams or 100 individual user groups but instead by using the concept of virtual machine by using the concept of hypervisor what Amazon has done is instead of 100 people or 100 teams now these virtual machines can be used by millions of users that is where the hypervisors and virtual machines have improved the efficiency and the concept of servers right so this is a new leap that has happened if you go back 20 years or 30 years the concept of virtual mission was not there so everybody used to have their physical servers even if you look at your laptop or even if you look at your servers right so today on my laptop I can install a virtual machine Oracle provides Oracle virtualbox like you can install your Oracle virtualbox on your personal laptop and you can share this virtual box with other people like in your family members who are under the same who are using the same Wi-Fi what you can say is okay I'm using my laptop you can use my virtual machine both of them uh what will happen is both you and your brother or both you and other family member can use your same laptop at once they are using the virtual machine you are using the laptop so this is how the concept of virtualization has improved the regular day-to-day process I hope the concept is clear and in case you have any questions uh do put that in the comment section and as I mentioned I'll also come live once in a week so that if you have any questions that I am not able to answer through the comment section I'll definitely pick that question and I'll explain that question for you I'll answer that question for you and like every time uh there is a small request that if you know somebody who are not following our videos and if they are interested to learn devops please share these videos with them so that you know uh larger audience are benefited from these videos and if you like this video please click on the like button if you have any feedback good or bad definitely put them in the comment section I'll reply to each and every comment and finally if you haven't subscribed to my channel don't forget to subscribe my channel thank you so much I'll see in the next video take care everyone bye