WEBVTT 0:00:03.040000 --> 0:00:07.840000 Hello and welcome to this video titled Virtualization Demonstration. 0:00:07.840000 --> 0:00:12.480000 In this case, I'm going to show you how to create a virtual machine with 0:00:12.480000 --> 0:00:17.600000 a Type 2 hypervisor and how you can do basic networking of tying two virtual 0:00:17.600000 --> 0:00:21.520000 machines together within that Type 2 hypervisor. 0:00:21.520000 --> 0:00:24.840000 So let's get right to it. 0:00:24.840000 --> 0:00:29.600000 So in this example, the Type 2 hypervisor I'm going to use is Oracle's 0:00:29.600000 --> 0:00:34.040000 Virtual Box. This is something you can easily do on your own as well because 0:00:34.040000 --> 0:00:36.680000 Virtual Box is free to download. 0:00:36.680000 --> 0:00:42.300000 Now in my particular case, I'm using a Macbook, which is running Mac OS, 0:00:42.300000 --> 0:00:45.020000 but Virtual Box is also supported in Windows. 0:00:45.020000 --> 0:00:47.800000 So if you have a Windows-based laptop, you can easily download this and 0:00:47.800000 --> 0:00:49.300000 run it yourself. 0:00:49.300000 --> 0:00:54.480000 So just do a Google search for Virtual Box and you'll be able to find 0:00:54.480000 --> 0:00:56.480000 it and download it. 0:00:56.480000 --> 0:01:02.620000 Now the next thing about Virtual Box, or I should say about creating a 0:01:02.620000 --> 0:01:06.180000 virtual machine, is you have to ask yourself what kind of virtual machine 0:01:06.180000 --> 0:01:08.180000 do I want to create. 0:01:08.180000 --> 0:01:12.400000 So another thing you can do for free is you can create a virtual machine 0:01:12.400000 --> 0:01:18.080000 of an Ubuntu desktop because Ubuntu is free to download. 0:01:18.080000 --> 0:01:34.200000 So if we just go to Google and type Ubuntu download right here, Ubuntu 0:01:34.200000 --> 0:01:38.700000 .com and you can download for free. 0:01:38.700000 --> 0:01:42.120000 So I'm going to use the 18.04 version. 0:01:42.120000 --> 0:01:44.780000 I've actually already downloaded this so I'm going to skip that stuff, 0:01:44.780000 --> 0:01:46.540000 but you can just download it right here. 0:01:46.540000 --> 0:01:50.200000 So just download it to your download folder or your hard drive or wherever 0:01:50.200000 --> 0:01:54.360000 it is. And so the steps to create a virtual machine are pretty simple. 0:01:54.360000 --> 0:01:59.820000 So here we would start by clicking on Tools. 0:01:59.820000 --> 0:02:03.040000 And by the way, as we can see, this is a layer two hypervisor. 0:02:03.040000 --> 0:02:08.300000 I should say a Type 2 hypervisor, Type 2 because it's operating on top 0:02:08.300000 --> 0:02:10.660000 of my existing software, my Mac. 0:02:10.660000 --> 0:02:13.020000 I would click on New. 0:02:13.020000 --> 0:02:15.860000 I could give it any name I want, but I'm just going to give it some descriptive 0:02:15.860000 --> 0:02:20.500000 name. Ubuntu test VM1. 0:02:20.500000 --> 0:02:25.460000 Okay, I'm just going to leave the machine folder to its defaults. 0:02:25.460000 --> 0:02:30.320000 The type here, well Ubuntu is Linux based, but you can see here you would 0:02:30.320000 --> 0:02:31.980000 choose which one is appropriate. 0:02:31.980000 --> 0:02:34.640000 So I'm just going to keep it with Linux. 0:02:34.640000 --> 0:02:38.460000 And it defaults here to Ubuntu 64 bit. 0:02:38.460000 --> 0:02:42.520000 Now you might say, but Keith, I don't know if it's Ubuntu 32 bit or Ubuntu 0:02:42.520000 --> 0:02:44.860000 64 bit I should select. 0:02:44.860000 --> 0:02:46.940000 Here's the great thing about this. 0:02:46.940000 --> 0:02:51.340000 If you make a wrong selection, the worst that's going to happen is your 0:02:51.340000 --> 0:02:55.500000 VM won't start. When you try to start up, if something will mess up, it'll 0:02:55.500000 --> 0:02:58.300000 give you an error message, but it's not going to hurt anything because 0:02:58.300000 --> 0:03:01.300000 it's all contained within this hypervisor. 0:03:01.300000 --> 0:03:04.080000 So let's just start by doing Ubuntu 64 bit. 0:03:04.080000 --> 0:03:06.900000 And if it turns out that it doesn't work, we'll just come back and we'll 0:03:06.900000 --> 0:03:08.400000 change that later on. 0:03:08.400000 --> 0:03:18.040000 No big deal. All right, now if we go to the website where we downloaded 0:03:18.040000 --> 0:03:25.740000 that, Ubuntu download. 0:03:25.740000 --> 0:03:30.240000 Okay, so it says right here, it says you should have a two gigahertz dual 0:03:30.240000 --> 0:03:32.240000 core processor or better. 0:03:32.240000 --> 0:03:37.360000 Now if we were talking about a type one hypervisor. 0:03:37.360000 --> 0:03:46.320000 So for example, if I was to go into ESXi, which is a type one hypervisor, 0:03:46.320000 --> 0:03:50.020000 a bare metal hypervisor, that's another name for it. 0:03:50.020000 --> 0:03:54.620000 If I was to create a new virtual machine, it's right here, where it says 0:03:54.620000 --> 0:03:56.720000 create register VM. 0:03:56.720000 --> 0:04:02.740000 If I was to click on that, okay, so I'd select one of these things here, 0:04:02.740000 --> 0:04:05.040000 create a new virtual machine. 0:04:05.040000 --> 0:04:09.420000 I'd have to select what version of software, so I'm just going to, I'm 0:04:09.420000 --> 0:04:12.000000 not going to go through all this here. 0:04:12.000000 --> 0:04:16.740000 If I just want to get to a certain state, why don't we just do, yes, and 0:04:16.740000 --> 0:04:19.220000 we'll just do Linux. 0:04:19.220000 --> 0:04:27.600000 And down here, we'll do, oh, I don't know, just pick one, 64 bit, doesn't 0:04:27.600000 --> 0:04:35.080000 matter. So what I want to show you is next, right here. 0:04:35.080000 --> 0:04:39.700000 So because this is a type one hypervisor, one of the options it gives 0:04:39.700000 --> 0:04:45.400000 us is CPU. Now this is sitting on a real physical server that has multiple 0:04:45.400000 --> 0:04:51.200000 cores, multiple threads, multiple sockets, and so I can choose how many 0:04:51.200000 --> 0:04:54.840000 CPUs I want, how many cores per socket. 0:04:54.840000 --> 0:04:58.060000 That's one of the things I have to select. 0:04:58.060000 --> 0:05:05.180000 But in a type two hypervisor, like VirtualBox, remember VirtualBox itself 0:05:05.180000 --> 0:05:09.180000 does not have direct connection to the CPU and the RAM and everything 0:05:09.180000 --> 0:05:15.700000 else. Mac does, my Mac OS X is my actual underlying software, my underlying 0:05:15.700000 --> 0:05:20.760000 operating system that has the physical connections to my CPU, my RAM, 0:05:20.760000 --> 0:05:25.180000 whatever. So my type two hypervisor, which is sitting on top of that, 0:05:25.180000 --> 0:05:30.700000 it doesn't give me the option to specify how many CPUs in my Mac book 0:05:30.700000 --> 0:05:34.160000 is going to consume, because it can't control that. 0:05:34.160000 --> 0:05:37.100000 The Mac OS sitting underneath it can control it. 0:05:37.100000 --> 0:05:42.760000 So I've got a lot less flexibility here when defining my virtual machine. 0:05:42.760000 --> 0:05:47.460000 So in this case, pretty much the only thing I can select is how much memory. 0:05:47.460000 --> 0:05:53.260000 And if we look at, if we go back, I'm not sure why I got rid of that, 0:05:53.260000 --> 0:05:56.780000 so, boom two download. 0:05:56.780000 --> 0:06:00.760000 So I can't really control this. 0:06:00.760000 --> 0:06:04.300000 All I have to do is hope that my physical laptop or my physical Mac book 0:06:04.300000 --> 0:06:07.880000 has this type of processor better, but I can't control this. 0:06:07.880000 --> 0:06:14.100000 It says that this VM is going to need at least four gigs of RAM and 25 0:06:14.100000 --> 0:06:16.740000 gigs of free hard disk space. 0:06:16.740000 --> 0:06:23.160000 Okay, now in a type one hypervisor like ESXi, these are things, all three 0:06:23.160000 --> 0:06:25.040000 of these, I would configure. 0:06:25.040000 --> 0:06:30.000000 How many CPUs and the configuration of the CPU, how much RAM and how much 0:06:30.000000 --> 0:06:36.080000 disk drive. In a type two hypervisor like VirtualBox, I have no control 0:06:36.080000 --> 0:06:41.100000 over the CPU, and I have very little control over the hard disk drive. 0:06:41.100000 --> 0:06:46.900000 As we can see here, pretty much all I have control over is the RAM and 0:06:46.900000 --> 0:06:52.380000 told me I needed four gigs, so I'm going to bump this up to four gigs. 0:06:52.380000 --> 0:06:55.600000 There we go, 4,096. 0:06:55.600000 --> 0:06:58.000000 All right, let's just go ahead and create. 0:06:58.000000 --> 0:07:04.380000 All right, now here's giving me a little bit of information, so as far 0:07:04.380000 --> 0:07:08.680000 as creating a hard disk drive, I can allocate some memory. 0:07:08.680000 --> 0:07:12.060000 I'll just let default to 10 gigs in this case. 0:07:12.060000 --> 0:07:18.420000 Create. Now because this is a virtual machine fundamentals course, there 0:07:18.420000 --> 0:07:22.160000 were a lot of options there that I sort of skip past, which are more advanced 0:07:22.160000 --> 0:07:26.580000 options when it comes to learning about virtual machines and the architecture 0:07:26.580000 --> 0:07:28.180000 of those virtual machines. 0:07:28.180000 --> 0:07:31.780000 I just want to show you the basics of creating an Ubuntu virtual machine 0:07:31.780000 --> 0:07:35.020000 here. All right, so here it is. 0:07:35.020000 --> 0:07:41.160000 It is done. Now, you might notice, nowhere in here did it ask me to specify 0:07:41.160000 --> 0:07:43.980000 where the operating system is. 0:07:43.980000 --> 0:07:48.340000 I know I've downloaded it in my downloads folder previously, but watch, 0:07:48.340000 --> 0:07:53.720000 so when I start this up, it should actually tell me. 0:07:53.720000 --> 0:08:01.840000 Here we go. So this is where it says, okay, you haven't told me to do 0:08:01.840000 --> 0:08:05.540000 Ubuntu, but you haven't told me where the actual operating system is, 0:08:05.540000 --> 0:08:08.740000 I'm supposed to run inside this virtual machine. 0:08:08.740000 --> 0:08:10.540000 So I'm just going to select it. 0:08:10.540000 --> 0:08:17.900000 It's in my downloads folder, and there it is right there. 0:08:17.900000 --> 0:08:21.560000 So that is what I downloaded from the website. 0:08:21.560000 --> 0:08:29.420000 So I'll just select that, and that should be all that he needs. 0:08:29.420000 --> 0:08:32.820000 And so now Ubuntu is starting up. 0:08:32.820000 --> 0:08:41.100000 Okay, so as just as if we were loading Ubuntu on a physical machine, we 0:08:41.100000 --> 0:08:42.600000 have to go through a lot of the same steps. 0:08:42.600000 --> 0:08:44.740000 So I'm just going to install it. 0:08:44.740000 --> 0:08:48.020000 It's free. It doesn't require any licensing or anything. 0:08:48.020000 --> 0:08:50.060000 I'm going to let default to English. 0:08:50.060000 --> 0:08:56.180000 Continue. Normal installation. 0:08:56.180000 --> 0:09:05.400000 Continue. Okay. It says the computer currently has no detected operating 0:09:05.400000 --> 0:09:10.080000 systems. So remember, that's not talking about my actual MacBook because 0:09:10.080000 --> 0:09:12.700000 clearly I have Mac OS X on there. 0:09:12.700000 --> 0:09:15.600000 What this is talking about is within this virtual machine. 0:09:15.600000 --> 0:09:18.640000 This is a brand new virtual machine that says, hey, I don't see an operating 0:09:18.640000 --> 0:09:23.720000 system on here. That's fine because I want you to install Ubuntu on here. 0:09:23.720000 --> 0:09:27.200000 So I'm just going to leave it to the default here of erase disk and install 0:09:27.200000 --> 0:09:34.460000 Ubuntu. Continue. 0:09:34.460000 --> 0:09:38.380000 We'll just let it default to my time zone. 0:09:38.380000 --> 0:09:41.400000 And I will just say Keith. 0:09:41.400000 --> 0:09:45.760000 Pick a username here. 0:09:45.760000 --> 0:09:48.300000 Pick a password. 0:09:48.300000 --> 0:09:51.460000 We'll just do I-N-E-1-2-3-4. 0:09:51.460000 --> 0:10:00.780000 I-N-E-1-2-3-4. Continue. 0:10:00.780000 --> 0:10:05.040000 And now it's going to take a couple of minutes to finish this process 0:10:05.040000 --> 0:10:07.440000 as it's downloading the files and creating the VM. 0:10:07.440000 --> 0:10:10.640000 And as soon as it's done, I'll be right back with you. 0:10:10.640000 --> 0:10:15.200000 Okay. So our installation of our Ubuntu VM is done. 0:10:15.200000 --> 0:10:17.160000 It's asking us to restart. 0:10:17.160000 --> 0:10:20.700000 This should be a pretty quick process here of restarting. 0:10:20.700000 --> 0:10:27.600000 Okay. Our Ubuntu VM has restarted. 0:10:27.600000 --> 0:10:29.900000 Now it's asking me for my login credentials. 0:10:29.900000 --> 0:10:33.540000 I-N-E-1-2-3-4, which I previously set up. 0:10:33.540000 --> 0:10:42.900000 Sign in. And it will come up here in just a moment. 0:10:42.900000 --> 0:10:44.580000 And there we go. 0:10:44.580000 --> 0:10:50.880000 So now we have Ubuntu running as a VM on top of Mac OS. 0:10:50.880000 --> 0:10:54.580000 All right. Next, we don't care about these various features. 0:10:54.580000 --> 0:11:02.820000 Now the next thing I want to show you is how you can have networking between 0:11:02.820000 --> 0:11:05.040000 your virtual machines. 0:11:05.040000 --> 0:11:09.500000 Now if we were creating multiple virtual machines in a Type 1 hypervisor 0:11:09.500000 --> 0:11:15.100000 like ESXi, we'd have the capabilities of a virtual switch or a V-switch. 0:11:15.100000 --> 0:11:19.200000 And we would configure the ports on that V-switch much like we would configure 0:11:19.200000 --> 0:11:22.580000 ports on a real switch connecting to real hosts. 0:11:22.580000 --> 0:11:27.440000 Now in VirtualBox, because this is a Type 2 or otherwise called a hosted 0:11:27.440000 --> 0:11:33.140000 supervisor or hypervisor, we don't have a virtual switch. 0:11:33.140000 --> 0:11:36.460000 But we can perform some of the same types of things. 0:11:36.460000 --> 0:11:42.700000 So notice here in this VM, I just created. 0:11:42.700000 --> 0:11:47.580000 It came up with a wired NIC. 0:11:47.580000 --> 0:11:49.020000 Now this isn't something I gave. 0:11:49.020000 --> 0:11:51.540000 This was just a default. 0:11:51.540000 --> 0:11:55.340000 And I'm going to go ahead and shut this guy down for a moment. 0:11:55.340000 --> 0:12:00.820000 Power off because you can't really change the settings of a virtual machine 0:12:00.820000 --> 0:12:03.760000 while it's up and active. 0:12:03.760000 --> 0:12:09.220000 All right. So here we go. 0:12:09.220000 --> 0:12:15.860000 And notice if we go into settings, okay, settings and network. 0:12:15.860000 --> 0:12:21.280000 By default, it gave that VM a virtual adapter called adapter number one 0:12:21.280000 --> 0:12:24.180000 connected to NAT. 0:12:24.180000 --> 0:12:29.260000 That's the way VirtualBox allows this VM to connect to the outside world. 0:12:29.260000 --> 0:12:32.480000 So I don't even have to do anything to provide outside world connectivity 0:12:32.480000 --> 0:12:36.080000 for this particular virtual machine. 0:12:36.080000 --> 0:12:41.240000 But what if I want this virtual machine to talk to another virtual machine 0:12:41.240000 --> 0:12:44.580000 running at the same time? 0:12:44.580000 --> 0:12:48.120000 So I want to provide a direct point -to-point connection between them. 0:12:48.120000 --> 0:12:54.820000 For example, I've got Ubuntu desktop here and I've got Ubuntu test VM1. 0:12:54.820000 --> 0:12:58.980000 How would I connect those two guys directly together within my virtualized 0:12:58.980000 --> 0:13:04.840000 environment? Well, how I would do that is I would go to settings, network, 0:13:04.840000 --> 0:13:08.440000 and I would add a second adapter. 0:13:08.440000 --> 0:13:12.200000 Which would look like this by default. 0:13:12.200000 --> 0:13:16.560000 I would enable it and I would select exactly what says right here internal 0:13:16.560000 --> 0:13:21.780000 network. Now this means this is an internal virtualized network within 0:13:21.780000 --> 0:13:30.020000 VirtualBox. I would give that network a name like KeithNet. 0:13:30.020000 --> 0:13:42.420000 All right, now I go to my other VM settings, network, adapter two, let's 0:13:42.420000 --> 0:13:46.300000 enable it, connect that to an internal network. 0:13:46.300000 --> 0:13:49.400000 And I get to choose which network do I want. 0:13:49.400000 --> 0:13:52.400000 I'm going to choose KeithNet that I already created. 0:13:52.400000 --> 0:13:57.040000 So now both of these VMs are going to have two network adapters. 0:13:57.040000 --> 0:14:00.280000 Adapter number one is going to be their NAT adapter which gives them access 0:14:00.280000 --> 0:14:05.800000 to my physical net card on my MacBook so they can get outside world access. 0:14:05.800000 --> 0:14:10.240000 In addition to that, both these VMs are going to have a second virtual 0:14:10.240000 --> 0:14:12.100000 net called adapter two. 0:14:12.100000 --> 0:14:17.240000 That second virtual net is going to be internally connected to KeithNet. 0:14:17.240000 --> 0:14:19.940000 And that's what's going to allow them to talk to each other. 0:14:19.940000 --> 0:14:23.160000 So let's go ahead and power this guy up right here. 0:14:23.160000 --> 0:14:28.800000 Start while we're doing that. 0:14:28.800000 --> 0:14:34.640000 So bring him over here. 0:14:34.640000 --> 0:14:37.240000 Let's power up the second one. 0:14:37.240000 --> 0:14:52.780000 Start. All right, so I'll log into my first VM here and try to remember 0:14:52.780000 --> 0:14:55.460000 what my password was that I set up for him. 0:14:55.460000 --> 0:15:12.240000 Log into that. Log into my second Ubuntu VM right here which was INE 1234. 0:15:12.240000 --> 0:15:16.520000 And now if we go up here and we click on the network settings, we can 0:15:16.520000 --> 0:15:18.040000 see we're connected. 0:15:18.040000 --> 0:15:25.040000 Click on wired settings. 0:15:25.040000 --> 0:15:28.560000 All right, so it's kind of different just from this. 0:15:28.560000 --> 0:15:32.300000 It's kind of difficult to see which one is connected to my NAT and which 0:15:32.300000 --> 0:15:35.540000 one is connected to the network settings. 0:15:35.540000 --> 0:15:41.540000 KeithNet. But a quick way I can do that is if it was connected to NAT, 0:15:41.540000 --> 0:15:58.780000 then I should have an actual IP address from my corporate network. 0:15:58.780000 --> 0:16:01.800000 Okay, let's just forget about, I have to install something on there to 0:16:01.800000 --> 0:16:03.180000 get that to work. 0:16:03.180000 --> 0:16:12.920000 Let's just do this. 0:16:12.920000 --> 0:16:17.400000 All right, so this one here is wired previously before this video. 0:16:17.400000 --> 0:16:22.240000 I gave it a static IP address of 444444.2. 0:16:22.240000 --> 0:16:24.720000 So I just know that's the one that's connected to KeithNet. 0:16:24.720000 --> 0:16:37.200000 If I go over here to my other VM, wired settings, select the second net 0:16:37.200000 --> 0:16:41.520000 card, IPV4, and give it a manual address. 0:16:41.520000 --> 0:16:46.140000 Let's just say in the same network, 444444.3. 0:16:46.140000 --> 0:16:53.860000 Just making that up as an IP address. 0:16:53.860000 --> 0:16:57.560000 All right, a lot of times you have to shut off the net card and turn it 0:16:57.560000 --> 0:17:02.740000 back on again. All right, so if this worked, if these two virtual machines 0:17:02.740000 --> 0:17:10.620000 are actually on the same internal network, I should now be able to ping 0:17:10.620000 --> 0:17:14.820000 them. They should be able to ping each other. 0:17:14.820000 --> 0:17:22.060000 Let's find out, ping, 444444.3, and I can. 0:17:22.060000 --> 0:17:27.460000 So my first Ubuntu VM on the left is now successfully pinging the second 0:17:27.460000 --> 0:17:32.760000 Ubuntu VM on the right, and that's all internal to VirtualBox. 0:17:32.760000 --> 0:17:37.580000 It's not actually going outside on any real physical network at all. 0:17:37.580000 --> 0:17:44.680000 So that concludes this video demonstration of just how easy it is to create 0:17:44.680000 --> 0:17:47.420000 virtual machines. 0:17:47.420000 --> 0:17:53.060000 Thank you for watching, and I hope that you found it to be useful.