WEBVTT 0:00:03.260000 --> 0:00:08.020000 Hello and welcome to this video titled an overview of hypervisors. 0:00:08.020000 --> 0:00:13.220000 In this video I'm going to introduce you to what hypervisors are and no 0:00:13.220000 --> 0:00:15.120000 this is not about your supervisor. 0:00:15.120000 --> 0:00:16.880000 This is about a hypervisor. 0:00:16.880000 --> 0:00:21.400000 We'll talk about type 1 hypervisors, type 2 hypervisors and I'll show 0:00:21.400000 --> 0:00:25.240000 you some examples of both. 0:00:25.240000 --> 0:00:28.740000 All right, so what is a hypervisor? 0:00:28.740000 --> 0:00:33.600000 Well, in a non-virtualized environment, just take your typical laptop, 0:00:33.600000 --> 0:00:36.300000 your typical server, your typical PC. 0:00:36.300000 --> 0:00:41.080000 Your operating system, whatever it is, Windows operating system, Mac operating 0:00:41.080000 --> 0:00:45.740000 system has exclusive access to the physical hardware. 0:00:45.740000 --> 0:00:49.680000 So your operating system is what tells the CPU, hey, I need you to perform 0:00:49.680000 --> 0:00:50.700000 a function for me. 0:00:50.700000 --> 0:00:54.640000 Your operating system says, hey, RAM, here's some information I need or 0:00:54.640000 --> 0:00:56.720000 I need to pull some information from you. 0:00:56.720000 --> 0:00:59.460000 Your operating system has access to all of that. 0:00:59.460000 --> 0:01:05.060000 In a virtualized environment, there can be multiple operating systems 0:01:05.060000 --> 0:01:07.280000 on a single physical server. 0:01:07.280000 --> 0:01:13.440000 You can have a physical server that's got Linux, Ubuntu, Microsoft, Cisco, 0:01:13.440000 --> 0:01:15.760000 iOS, all sorts of different operating systems. 0:01:15.760000 --> 0:01:20.680000 And the hypervisor is yet another operating system, but the hypervisor 0:01:20.680000 --> 0:01:25.980000 is an operating system that sits between the hardware and these various 0:01:25.980000 --> 0:01:28.220000 guest operating systems. 0:01:28.220000 --> 0:01:34.060000 So we would say that the hypervisor is hosting the virtual machines. 0:01:34.060000 --> 0:01:38.340000 That's why we call the hypervisor the host operating systems and the various 0:01:38.340000 --> 0:01:43.260000 virtual machines, whatever they are, Windows, Cisco, iOS, Linux. 0:01:43.260000 --> 0:01:47.220000 Each one of those individual operating systems is what we call a guest 0:01:47.220000 --> 0:01:48.960000 operating system. 0:01:48.960000 --> 0:01:55.060000 The hypervisor has access to the physical hardware of the host and provides 0:01:55.060000 --> 0:02:00.280000 access to a set of emulated hardware for each virtual machine. 0:02:00.280000 --> 0:02:04.740000 And it does this in a way that's transparent to the guest operating system. 0:02:04.740000 --> 0:02:09.920000 So for example, if I have a virtual machine that is Windows, for example, 0:02:09.920000 --> 0:02:13.320000 let's say I have a virtual machine that's a Windows 10 desktop virtual 0:02:13.320000 --> 0:02:18.420000 machine. That virtual machine will think when it's performing a call to 0:02:18.420000 --> 0:02:24.280000 the CPU or performing a call to memory, it will think Windows on that 0:02:24.280000 --> 0:02:29.100000 virtual machine Windows will think it has access direct access to the 0:02:29.100000 --> 0:02:30.500000 CPU, to the RAM. 0:02:30.500000 --> 0:02:33.220000 But in reality, it doesn't. 0:02:33.220000 --> 0:02:38.800000 Those requests it's making actually go to the hypervisor, another operating 0:02:38.800000 --> 0:02:43.480000 system that's controlling and manipulating and scheduling everything. 0:02:43.480000 --> 0:02:47.540000 And then that hypervisor will have to say, okay, hold on from microsecond. 0:02:47.540000 --> 0:02:51.200000 Actually, won't tell Microsoft, hold on, I'm going to take your request. 0:02:51.200000 --> 0:02:56.260000 But right now, I've got another VM over here that I sent his request to 0:02:56.260000 --> 0:03:00.820000 the CPU in a nanosecond when the CPU is done with him. 0:03:00.820000 --> 0:03:04.420000 Now I'll take your request and send it to the CPU. 0:03:04.420000 --> 0:03:08.700000 So each virtual machine has no idea that there are other virtual machines 0:03:08.700000 --> 0:03:13.880000 that are sharing the same physical resources, the hypervisors and control 0:03:13.880000 --> 0:03:19.060000 of all of that. So a definition we can see here is that it's a process 0:03:19.060000 --> 0:03:23.120000 that separates the computer's operating system and applications from the 0:03:23.120000 --> 0:03:25.540000 underlying physical hardware. 0:03:25.540000 --> 0:03:30.980000 Hypervisors are typically implemented as software and it maximizes the 0:03:30.980000 --> 0:03:35.080000 efficient use of the hardware in the actual host system. 0:03:35.080000 --> 0:03:38.200000 And it keeps the virtual machines separated. 0:03:38.200000 --> 0:03:40.200000 So this is what it looks like. 0:03:40.200000 --> 0:03:45.580000 So here we have a couple of virtual machines, guest OS, maybe virtual 0:03:45.580000 --> 0:03:50.920000 machine one is Windows, maybe virtual machine number two is a Cisco iOS 0:03:50.920000 --> 0:03:57.220000 router. And then we also have our base operating system, which is our 0:03:57.220000 --> 0:04:01.900000 hypervisor. Now, our guest operating system is going to make some calls 0:04:01.900000 --> 0:04:03.780000 for physical resources. 0:04:03.780000 --> 0:04:05.920000 Maybe one of those calls is for the CPU. 0:04:05.920000 --> 0:04:10.780000 Maybe another call is to direct something to the virtual screen, whatever 0:04:10.780000 --> 0:04:15.860000 it might be. The second VM could also be making some calls at exactly 0:04:15.860000 --> 0:04:21.180000 the same time. Well, clearly if those calls are for the CPU at exactly 0:04:21.180000 --> 0:04:26.940000 the same time, the hypervisor can't connect to the physical CPU and send 0:04:26.940000 --> 0:04:29.340000 it multiple instructions all at once. 0:04:29.340000 --> 0:04:31.680000 So it has to schedule these. 0:04:31.680000 --> 0:04:35.360000 So the hypervisor is actually what connects to the physical resources 0:04:35.360000 --> 0:04:41.820000 and makes those resources available to the VMs. 0:04:41.820000 --> 0:04:46.220000 The other thing I'll say about this is that each virtual machine only 0:04:46.220000 --> 0:04:52.800000 sees the amount of CPU, RAM and hard disk drive space that has been allocated 0:04:52.800000 --> 0:04:54.860000 to that virtual machine. 0:04:54.860000 --> 0:04:58.700000 So for example, when you're creating a virtual machine in the first place, 0:04:58.700000 --> 0:05:00.420000 there's a lot of steps that are involved. 0:05:00.420000 --> 0:05:03.940000 For example, when you create a virtual machine, it's done the hypervisor. 0:05:03.940000 --> 0:05:08.360000 So the hypervisor is what gives you the GUI or the command line to create 0:05:08.360000 --> 0:05:10.660000 virtual machines. 0:05:10.660000 --> 0:05:13.000000 And so when you're creating virtual machines, you'll have to specify things 0:05:13.000000 --> 0:05:16.900000 like, okay, what's going to be the operating system of the guest of the 0:05:16.900000 --> 0:05:21.260000 virtual machine will be Windows, will be Linux, will be Cisco iOS, what 0:05:21.260000 --> 0:05:25.540000 will be. Then you'll also have to specify things like, okay, how many 0:05:25.540000 --> 0:05:29.240000 CPUs will be allocated to this virtual machine? 0:05:29.240000 --> 0:05:34.320000 Because maybe in your physical box, you've got, you know, eight sockets 0:05:34.320000 --> 0:05:38.800000 and each socket has four cores in or capable of multi-threading. 0:05:38.800000 --> 0:05:43.560000 So you've got some variations here as far as how many CPUs and how many 0:05:43.560000 --> 0:05:46.640000 virtual CPUs are available to each virtual machine. 0:05:46.640000 --> 0:05:47.740000 You'll have to plug that in. 0:05:47.740000 --> 0:05:49.760000 How many CPUs do you need? 0:05:49.760000 --> 0:05:52.980000 How much memory do you need each virtual machine to have as far as like 0:05:52.980000 --> 0:05:54.280000 RAM is concerned? 0:05:54.280000 --> 0:05:56.600000 You'll plug that in as a number as well. 0:05:56.600000 --> 0:06:01.100000 Now once you do that, let's say for example that we tell the virtual machine, 0:06:01.100000 --> 0:06:08.240000 hey, you've got a hard disk space of two gigabits, let's just say. 0:06:08.240000 --> 0:06:13.240000 Well, even though the physical host might have a terabit hard drive, the 0:06:13.240000 --> 0:06:14.500000 virtual machine doesn't know that. 0:06:14.500000 --> 0:06:17.820000 You told the virtual machine, you get two gigabits, so that's what he 0:06:17.820000 --> 0:06:21.600000 sees. That's how much memory he thinks is available. 0:06:21.600000 --> 0:06:25.920000 He does not have visibility to the actual physical resources. 0:06:25.920000 --> 0:06:28.380000 Only the hypervisor can see that. 0:06:28.380000 --> 0:06:32.600000 Now there's two different types of hypervisors. 0:06:32.600000 --> 0:06:35.700000 The first one I want to talk about here is what's called a Type 1 hypervisor. 0:06:35.700000 --> 0:06:39.540000 This is also called a native or bare metal hypervisor. 0:06:39.540000 --> 0:06:44.140000 This runs directly on the host's hardware. 0:06:44.140000 --> 0:06:49.680000 For example, this will be a situation where you buy a server without an 0:06:49.680000 --> 0:06:50.580000 operating system. 0:06:50.580000 --> 0:06:54.120000 You would go and you'd say, okay, let me buy a server with this amount 0:06:54.120000 --> 0:06:58.440000 of CPU, this amount of RAM, maybe this graphics card. 0:06:58.440000 --> 0:07:02.660000 Then just like you would normally load Linux as an operating system or 0:07:02.660000 --> 0:07:07.300000 maybe you load Windows Server as an operating system, instead you would 0:07:07.300000 --> 0:07:12.320000 buy a Type 1 hypervisor and load that as the operating system. 0:07:12.320000 --> 0:07:16.720000 This provides a direct interface between the virtual machines and the 0:07:16.720000 --> 0:07:17.900000 hardware resources. 0:07:17.900000 --> 0:07:21.360000 Some examples of this are Citrix Zen. 0:07:21.360000 --> 0:07:24.600000 This is actually an open source Type 1 hypervisor. 0:07:24.600000 --> 0:07:27.380000 It doesn't cost you anything to use this. 0:07:27.380000 --> 0:07:32.040000 Oracle has one, actually a couple. 0:07:32.040000 --> 0:07:36.680000 Microsoft has their Hyper-V and a very popular one is VMware. 0:07:36.680000 --> 0:07:40.400000 They have something called ESX and ESXI. 0:07:40.400000 --> 0:07:43.880000 There's also KVM which is built into Linux. 0:07:43.880000 --> 0:07:44.860000 Here's an example. 0:07:44.860000 --> 0:07:47.660000 Here's a screenshot of a Type 1 hypervisor. 0:07:47.660000 --> 0:07:52.520000 This happens to be the screenshot of VMware's ESXI. 0:07:52.520000 --> 0:07:56.500000 Once you load ESXI, this is the GUI. 0:07:56.500000 --> 0:07:57.160000 It would give you. 0:07:57.160000 --> 0:08:00.360000 From here, you can build your virtual machines. 0:08:00.360000 --> 0:08:01.940000 You can see how they're doing. 0:08:01.940000 --> 0:08:03.100000 You can manipulate them. 0:08:03.100000 --> 0:08:05.060000 You can turn them on or turn them off. 0:08:05.060000 --> 0:08:10.320000 This is the base operating system that you load onto the physical hardware. 0:08:10.320000 --> 0:08:14.000000 This is a Type 1 hypervisor. 0:08:14.000000 --> 0:08:18.800000 You might say to yourself, but Keith, I need to build a virtual machine 0:08:18.800000 --> 0:08:25.240000 on my laptop. I don't have the resources to go out and buy a physical 0:08:25.240000 --> 0:08:29.060000 server. I wish I could, but all I've got available to me is a laptop. 0:08:29.060000 --> 0:08:32.840000 This laptop is already running some software. 0:08:32.840000 --> 0:08:36.840000 It's already running Windows or it's already running Mac. 0:08:36.840000 --> 0:08:39.520000 For example, let's say Mac. 0:08:39.520000 --> 0:08:41.640000 It's already running the Mac operating system. 0:08:41.640000 --> 0:08:45.880000 Yet, I want to load an application on here that's a Windows-based application 0:08:45.880000 --> 0:08:48.140000 that doesn't run on Mac. 0:08:48.140000 --> 0:08:49.940000 How am I supposed to do that? 0:08:49.940000 --> 0:08:54.120000 That's where you would use something called a Type 2 hypervisor. 0:08:54.120000 --> 0:08:59.240000 This is what's called a hosted hypervisor because the hypervisor itself 0:08:59.240000 --> 0:09:05.260000 does not have direct access to the physical memory, CPU power, all that 0:09:05.260000 --> 0:09:09.800000 stuff. There's already another operating system, your base operating system 0:09:09.800000 --> 0:09:11.380000 that's already running. 0:09:11.380000 --> 0:09:17.300000 A hosted hypervisor or a Type 2 hypervisor runs on top of conventional 0:09:17.300000 --> 0:09:20.840000 operating systems as another application. 0:09:20.840000 --> 0:09:23.400000 It still provides you this separation. 0:09:23.400000 --> 0:09:29.440000 Once you have a Type 2 hypervisor, for example, VMware Workstation, VMware 0:09:29.440000 --> 0:09:34.680000 Player, you can see these here are some examples of Type 2 hypervisors. 0:09:34.680000 --> 0:09:39.600000 Once you load this, let's say you use VirtualBox as an example. 0:09:39.600000 --> 0:09:43.060000 Here's an example of what VirtualBox looks like. 0:09:43.060000 --> 0:09:49.000000 I'll show it to you right here. 0:09:49.000000 --> 0:09:53.520000 I'm using Mac. This presentation is being done on a MacBook. 0:09:53.520000 --> 0:09:57.000000 You've got your typical Mac background here. 0:09:57.000000 --> 0:10:00.620000 I downloaded Oracle's VirtualBox. 0:10:00.620000 --> 0:10:04.120000 The great thing about VirtualBox is that it's free. 0:10:04.120000 --> 0:10:06.260000 This is a hypervisor. 0:10:06.260000 --> 0:10:09.760000 It was downloaded as another app, so it's running as just another app 0:10:09.760000 --> 0:10:12.560000 on top of my Mac operating system. 0:10:12.560000 --> 0:10:14.400000 This is a special app. 0:10:14.400000 --> 0:10:17.920000 This is a Type 2 hypervisor because once I've got Oracle's VirtualBox 0:10:17.920000 --> 0:10:21.920000 running, now I can create VMs inside of it. 0:10:21.920000 --> 0:10:25.500000 For example, you can see here I've got some Windows VMs. 0:10:25.500000 --> 0:10:30.120000 If I start up this Windows 7 right here, this will actually start up. 0:10:30.120000 --> 0:10:31.280000 I'll actually go ahead and do it. 0:10:31.280000 --> 0:10:34.340000 I don't know how long it's going to take, but let's just see what happens. 0:10:34.340000 --> 0:10:41.760000 Once I start up my Windows 7 VM, then I'll actually have, right here, 0:10:41.760000 --> 0:10:47.540000 it's starting up right now, a Windows 7 laptop you could think of running 0:10:47.540000 --> 0:10:51.360000 inside of my MacBook. 0:10:51.360000 --> 0:10:52.860000 This is a virtual machine. 0:10:52.860000 --> 0:10:54.280000 Good, it works. There we go. 0:10:54.280000 --> 0:11:01.680000 Now I've got Windows 7 and once Windows 7 boots up, I could run my Windows 0:11:01.680000 --> 0:11:04.420000 applications inside of here. 0:11:04.420000 --> 0:11:10.220000 Now there's pros and cons to both Type 1s and Type 2 hypervisors. 0:11:10.220000 --> 0:11:12.760000 Let's start with the Type 2s since that's what we're looking at right 0:11:12.760000 --> 0:11:18.340000 here. The Type 2 hypervisor is nice because, number one, many of them 0:11:18.340000 --> 0:11:22.900000 are free. VirtualBox is free. 0:11:22.900000 --> 0:11:29.720000 You've still got your base operating system like my Mac operating system 0:11:29.720000 --> 0:11:32.900000 that I can do all sorts of things with that, even if I choose not to use 0:11:32.900000 --> 0:11:34.300000 VirtualBox at all. 0:11:34.300000 --> 0:11:41.620000 The downside to a Type 2 hypervisor is you've got now one more layer of 0:11:41.620000 --> 0:11:46.920000 abstraction. What I mean by that is that whatever application I have running 0:11:46.920000 --> 0:11:51.880000 here inside of this Windows virtual machine. 0:11:51.880000 --> 0:11:58.100000 Let's say I start up Google Chrome in here. 0:11:58.100000 --> 0:12:00.680000 When Google Chrome starts up, what's it going to do? 0:12:00.680000 --> 0:12:02.860000 He's going to ask for some resources. 0:12:02.860000 --> 0:12:06.120000 He's going to ask for some like RAM memory for an example. 0:12:06.120000 --> 0:12:07.100000 What's going to happen? 0:12:07.100000 --> 0:12:11.840000 Well because this is a Type 2 hypervisor, when he requests RAM memory, 0:12:11.840000 --> 0:12:16.580000 that Type 2 hypervisor VirtualBox is going to have to make the request. 0:12:16.580000 --> 0:12:18.640000 Where's that request going to hit? 0:12:18.640000 --> 0:12:21.260000 It's going to hit my Mac operating system. 0:12:21.260000 --> 0:12:25.160000 Then my Mac operating system in turn will have to access the physical 0:12:25.160000 --> 0:12:28.120000 RAM to give it back to VirtualBox. 0:12:28.120000 --> 0:12:31.120000 We've got several layers of abstraction here. 0:12:31.120000 --> 0:12:35.480000 It can cause your virtual machines to run a little bit slower to not quite 0:12:35.480000 --> 0:12:37.720000 as be as efficient. 0:12:37.720000 --> 0:12:42.380000 When you're talking about virtual machines that need a lot of CPU, the 0:12:42.380000 --> 0:12:48.400000 need to access memory very quickly to read and write to memory, a Type 0:12:48.400000 --> 0:12:52.880000 2 hypervisor might not be the best scenario. 0:12:52.880000 --> 0:12:58.580000 Instead, a Type 1 hypervisor, which we saw an example of that right here 0:12:58.580000 --> 0:13:05.880000 in VMware's ESXi, this is more efficient because a Type 1 hypervisor has 0:13:05.880000 --> 0:13:09.080000 direct access to your physical resources. 0:13:09.080000 --> 0:13:13.180000 There's no other operating system underneath this that has to pass through 0:13:13.180000 --> 0:13:18.160000 first. Type 1 hypervisor will get you better performance. 0:13:18.160000 --> 0:13:20.220000 It'll give you better scalability. 0:13:20.220000 --> 0:13:24.400000 The downside though is a Type 1 hypervisor, that is the operating system 0:13:24.400000 --> 0:13:28.480000 that's installed right on top of the physical hardware. 0:13:28.480000 --> 0:13:32.000000 You're not going to be able to take your MacBook or your typical Windows 0:13:32.000000 --> 0:13:36.880000 laptop, strip off your Mac operating system, strip off your Windows operating 0:13:36.880000 --> 0:13:41.640000 system and install VMware's ESXi on top of that instead. 0:13:41.640000 --> 0:13:43.160000 You won't be able to do that. 0:13:43.160000 --> 0:13:46.380000 So with a Type 1 hypervisor, typically that means you've got to go out 0:13:46.380000 --> 0:13:47.840000 and buy yourself some hardware. 0:13:47.840000 --> 0:13:51.820000 You have to buy yourself a server with a lot of memory, a lot of CPU, 0:13:51.820000 --> 0:13:56.640000 install the Type 1 hypervisor on top of it, and now whatever VMs you create 0:13:56.640000 --> 0:14:01.260000 inside of there will be a lot more efficient, a lot faster than the same 0:14:01.260000 --> 0:14:05.600000 VM if it was running inside of a Type 2 hypervisor. 0:14:05.600000 --> 0:14:12.900000 So that concludes this section on hypervisors and the differences between 0:14:12.900000 --> 0:14:14.700000 Type 1s and Type 2s. 0:14:14.700000 --> 0:14:16.160000 I hope you found this enjoyable.