Did you know this about Virtual Machines (VMs)? Kali Linux, Ubuntu, Windows 11, macOS?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- It's really important that you learn about virtualization. Doesn't matter if you wanna become an ethical hacker, you wanna become a developer, you wanna be a network engineer, or you just wanna learn about computers in general, you really need to learn about virtualization. Just like learning Linux or learning a programming language, such as Python. It's a fundamental skill that you need to get in today's job market. (upbeat music) I wanna thank Linode for sponsoring this video. Have a look at the timestamps if you want to jump to a specific part of this video. I'm covering things such as Type 1 Hypervisors, Type 2 Hypervisors. I'm showing you how to run networking devices on your computer. Now let's compare what it used to be like versus what it's like today before virtualization was developed. In this example, I've got a Linux laptop running Ubuntu installed directly on the hardware In other words, it's a bare metal installation. Here I've got a Windows 11 laptop, and over here I've got a Windows 98 laptop. In the old days, I'd have to buy a laptop like this and install the operating system on the bare metal. Same is true with networking equipment, such as this router. This is a Cisco router. We are running Cisco IOS directly on hardware Here I've got a Mac running directly on hardware. There are lots of problems with this setup. Number one, notice how many keyboards I've got. I've got for instance, four laptops here, I need four keyboards. I've got four CPUs. I've got four sets of RAM, four hard drives. Now think about the RAM or memory in this laptop. If I'm working on the Windows computer the memory in this laptop is idle, it's not being used. The same with the CPU. If I'm doing some processor intensive tasks on the Windows computer, the CPU on this laptop is idle. It's a big waste of resources, and that's one of the big reasons that virtualization was developed. Rather than having four sets of CPUs in this example we are going to pull that or put that together into a single device. Same with the RAM, same with the disk space. And then we're going to share that between the devices. Now, the software that does this is called the hypervisor. You get two types of hypervisors. Let's start with a Type 2 Hypervisor. Type 2 Hypervisors are installed on another operating system. In this example, I've got Ubuntu, Windows 11, Windows 98, Mac. Let's take that and put it onto a single computer. I've got a Windows 98 for virtual machine. What you'll notice there is I can restore a virtual machine from a saved state very, very quickly. Lots of advantages to using virtual machines. I could double click on network neighborhood as an example, and I can see that I've got a Windows 98 computer running on a Mac. The host operating system is macOS. If I look at my Mac, you can see I'm running macOS. This is a MacBook Pro. It's got this processor Intel Core i9 32 gig of RAM. What's happening is the host operating system, in this case, macOS, is sharing resources with the Windows 98 computer. Now Windows 98 doesn't realize that it's running within a virtual machine. It thinks it's running directly on bare metal or directly on hardware. - [Guest] I'm in a virtual machine? - [Instructor] (indistinct) on a Mac. - The Mac is giving resources to the Windows 98 computer. Under processes and memory, you can see 256 meg, not gig, meg of RAM was allocated to this Windows 98 computer and one processor was allocated. One of the great things about virtualization is if I wanna spin up another virtual machine, rather than buying a PC and waiting for that PC to be shipped to me, I can simply boot up a new instance of that virtual machine. I've got two Windows 98 computers running directly on my Mac. But as they say, there's more. Here, I've got Windows 11. One of the things you can do in virtualization is you can save the RAM to the hard drive of your host operating system. In other words, my Mac simply has this device's state stored on the hard drive, and I can simply resume that. You could, as an example, shut down the virtual machine. You could restart but suspending just basically saves the state to the hard drive and allows me very very quickly to bring the virtual machine back again. As an example, I could start Brave here and I could go to a website. Now, this virtual machine is using more RAM and more CPU than the Windows 98 computers. Over 8 gig of RAM is being used on this virtual machine. Four processor cores are being used, versus the small amount used by the Windows 98 computer. My Mac is also using memory and CPU to run itself. Basically we are sharing resources between all of these devices. These virtual machines are isolated from each other. We can connect them to each other, by for instance sharing them with my Mac. On Windows you'll see this as NAT, Network Address Translation. I could connect it directly to, say my local area network. In this case, I've turned off my WiFi. My WiFi is not connected, I'm connecting directly to ethernet adapter on this device. It's got an IP address, 192.168.1.71 If I open up a command prompt on Workstation Player or on VirtualBox, and we'll talk about the different hypervisors in a moment. You'll often see that called bridged interfaces. Notice in this case, IP address allocated to this device is 192.168.1.60 From my Mac, As an example I could open up a terminal and I should be able to ping you that IP address assuming that the firewall is turned off. I'll go into control panel, network and internet, network and sharing center and I'll turn off the firewall. Turn this off, not recommended, but I just wanna show you that by doing that I can now ping the Windows computer from my Mac. I've basically bridged the Windows computer onto the network. That device looks like a physical device connected to the network but it's actually a virtual machine running on my Mac. What I'll do is I'll just stop this Windows 98 computer. What I've got running at the moment is a Windows 11 computer and a Windows 98 computer. Those two are my guest operating systems and then I've got my Mac as my host operating system. What I can do as well is start Ubuntu. Here I've got an Ubuntu 22.04 LTS virtual machine. In the same way, I could start another Ubuntu. Here I've got Ubuntu 20.04 I am running a whole bunch of virtual machines or guest operating systems, on a host operating system. Here's one Ubuntu, here's another Ubuntu and here I've got a Windows 11 computer. I could also start up another Windows 11 computer. I don't know if you can hear that but my fan is starting to make a lot of noise. (fan whirling) because I'm running two Windows 11 computers, I've got a Windows 98 and two Ubuntus on the same computer. Okay, so this is a Type 2 Hypervisor. In this example, I'm using what's called VMware Fusion. There are different types of hypervisors. Before I talk about a Type 1 Hypervisor, which is what you would run on a device such as this. This is an HP MicroServer. I wanna show you that you can virtualize other types of devices as well. As an example, a router. More and more these days, network infrastructure is being virtualized. We're not just virtualizing PCs. We're also virtualizing other types of devices, firewalls, load balances, routers, and so forth. In this example, I've got a Cisco CSR router. It's running Cisco IOS XE, just another operating system. That's actually what runs on this router here, the physical router. What I can do here, and I won't bore you too much showing you Cisco stuff, is I can see that an IP address was allocated through DHEP. Show IP interface brief, and this one shows me that an IP address was allocated here, 192.168.1.7 I can ping from the one router to the other. In this example, it's not working because originally I had this bridge to the WiFi network and I shut the WiFi network down. What I'll need to do on both of these devices is set them to use the physical ethernet network 'cause I've disabled WiFi. Hopefully if all goes right I'll be able to ping from one device to the other. Let's try that again. Those exclamation marks that you see there on the Cisco device, indicate that pings were successful. If I wanted to practice networking, I would in the old days have to buy a physical router or buy a firewall to practice. Now we can simply virtualize it on a hypervisor. Now there's a long list of advantages to using virtual machines. Here's another one. On a virtual machine such as this Windows 11 computer, I can create and restore what are called snapshots. They're basically a snapshot in time of the state of a virtual machine. I can restore snapshots very, very easily. If I installed some software on this laptop and then wanted to remove it, it's a bit of hassle to go and remove that software. And then perhaps later on I wanna bring it back again, then I have to reinstall it. But on a virtual machine like this, I don't have to. At the moment, we're in this state on this current virtual machine. This is a basic install with the Brave browser. If I have a look at my virtual machine you can see that Brave is installed. But I created a snapshot where I installed a hypervisor on Windows 11 and then installed Ubuntu. So I can restore that snapshot. I won't save the current state. What you'll notice is suddenly the virtual machine changes. I'm restoring that virtual machine. What I've done here is I've actually installed VMware Workstation Player within that virtual machine which is running within the VMware Fusion running on my Mac. This is a bit like the movie Inception. - Dream within a dream, huh? - I'm impressed. - In this case, I've got Ubuntu installed within a hypervisor. This is the software that allows us to manage virtual machines. In this case, it's VMware Workstation Player which is free hypervisor software from VMware that runs on Windows as an example. You can see here, I have multiple virtual machine options available. Windows 11 is running within VMware Fusion which is then running on macOS, which is installed on hardware. You probably don't want to do it this way. You have to be really careful when you nest operating systems within operating systems. What I can do once again, is say, okay, let's go back to our snapshots and just go back to a basic install with Brave. I actually created snapshots for previous videos where I had Minecraft running on a Windows 11 computer. You can see there the Minecraft server was installed. But in this case I'll simply restore the installation with Brave, and I won't save the current installation. What you'll notice now is that will change back to a basic Windows 11 installation running Brave. Snapshots are really, really powerful because I, for instance, could create a snapshot, install some software, and let's say, I make a mistake and break my computer. I can then simply go back to the snapshot and restore that and I'm back to a new machine. I can create different snapshot paths having different functionality. You can see here the brand new Windows installation. Some cases I had Python installed, I had Minecraft installed, and I had Packet Tracer installed. These are different pods that I've taken to install various types of software and I could jump from one to the other. Snapshots are really, really powerful. A disadvantage of Type 2 Hypervisors is you've got hardware, let's say a laptop like this, and then you are installing an operating system which could be Mac, could be Linux, could be Windows. And then you're installing a Hypervisor on top of that that then allows you to install multiple virtual machines on the single device. There's an overhead running an operating system such as Windows. Windows comes with a whole bunch of extra services that you might not need in a hypervisor. You may prefer to use a lightweight hypervisor, and that's typically what enterprises or big companies do. They may decide to use a server. This is just a micro HPE server. You could obviously get much bigger servers than this, but this is fine for a little demonstration. On a device like this, a little server like this, you would install a Type 1 Hypervisor such as ESXi, very popular Hypervisor. There are a whole range of Type 1 Hypervisors and Type 2 Hypervisors. Type 1 Hypervisors that are installed in servers like this are not installed on another operating system. They're installed directly on bare metal. You install the hypervisor directly on the hardware. You don't install the hypervisor on an operating system like Windows or macOS, in this example, and then have the operating system installed on the hardware. Lots of efficiencies and lots of scalability is achieved using a Type 1 Hypervisor. But if you've got a laptop Type 2 is probably easiest way to go and the easiest way to get started. Or what you could do is host it in the cloud. This is taking virtual machines to the next level because you might not have a Type 1 Hypervisor server lying around such as this, or your laptop may not have enough RAM and memory to run all the virtual machines. You cannot allocate more memory than your device has in it or more CPU than it has in it. This laptop has a lot of RAM so that allows me to run a whole bunch of virtual machines at the same time. But if your laptop has only got, for instance, two gig of RAM or four gig of RAM, you're not gonna be able to run a lot of virtual machines. I, as an example, could run Kali Linux here and then I could run other virtual machines on this laptop because I have enough CPU and memory. But your laptop may not have that. One of the options is to run stuff in the cloud. Linode, who I wanna thank for sponsoring this video once again, are a great cloud provider. I really like what they do because it's very very easy to spin up a Linode server or virtual machine. You can use the link below to get $100 60-day credit if you wanna set up your own virtual machine in the cloud. To set this up is extremely easy. I click create Lanode I specify which operating system I want to use. Let's go for Ubuntu 20.04 LTS. I have shown you in previous videos, which I link below, how to set up Kali Linux in the cloud. Which region do I want to set it up in? I could run a virtual machine in the States or I could run it in Germany. In my example, I'll just run it in London. Typically you wanna run it close to where you are. You can go for a dedicated CPU or shared CPU. Remember on my Mac, I'm sharing the CPU with a bunch of other virtual machines. This tends to be the cheapest way to do it. That's what I'm gonna do here for this demonstration. I can give these server names such as Ubuntu1, I can give it a password. I can specify other options such as VLANs, other information, but I'm not gonna do that. I'm simply gonna click create. That's all you have to do to set up a virtual machine. I'm given an IP address of the virtual machine and I can copy that. It's currently provisioning. As soon as that goes red I'll be able to access my virtual machine. The world has moved from physical hardware devices to virtual machines, running on PCs, virtual machines running on dedicated hardware like this, to virtual machines running in the cloud that you can just spin up and have access to. I'll copy this command to SSH directly to the server, and then I'll paste that in. As soon as that's provisioned I'll be able to access the server. I need to accept the public key, put my password in, and there you go, I'm able to log in to this virtual machine. You can see that I'm using Ubuntu, Linux, in the cloud. Under my Linodes, I can see various servers that I've got, I can see whether they're running or not, and I can simply power off that server when I'm finished using it. Just note that if you're using Linode, you'll be charged for the virtual machines that you have created so shutting them down won't save you money. You need to delete the virtual machine if you're no longer using it. You can see the power of this. Physical machines to virtual machines, on hardware that we own, to virtual machines in the cloud. Let's take it a bit further, specifically looking at networking equipment where you're not just virtualizing PCs but you're virtualizing entire infrastructures. Cisco have created a product called CML. There are others out there like GNS3 or EVE-NG. They allow you to build topologies on your computer and they also allow you to run software from different architectures. Not all software can run on all devices, but QEMU, which is another type of virtualization platform, will allow you, for example, to run Cisco IOS devices on an Intel computer or run Intel images on an M1 or M2 CPU. A lot of hypervisors will not allow you to do that. You would have to run an arm image, as an example, on an M1. You can't run Windows Intel architectures on an Apple M1. But with QEMU you could do interesting things like that. In this example, I'll click add to create a new topology. What I can do here is take various types of devices. There's a CSR, which is the one that I showed you earlier, but what I'll do here is drag an IOSv router into the topology, and I'll drag a server into the topology. What you can do with these kind of technologies is connect devices to each other virtually. Rather than creating a physical infrastructure or lab you can build a whole virtual topology on your computer and you can build really complicated topologies with software such as this. As an example, I can open up a console on my server and I can log in with my username and password. If I typed uname-a, you can see that this is running Tiny Core Linux. I can build entire architectures on my laptop. What this is doing, is taking software that runs on different architectures, like a Cisco router, and virtualizing it on an Intel processor. In this example, it's running CentOS. I could run a Aruba. I could run Juniper. I could run Arista. I can run a whole bunch of networking devices. Okay, so now let's talk about which hypervisors I recommend that you use. If you're on Windows, two good options are VirtualBox, which is free. That's probably the one I'd recommend that you get if you're just starting out. Very useful, support snapshots, supports a whole bunch of options. You can copy from your virtual machine to your physical device and so forth. One of the things you're gonna want do is copy text from one operating system to another. Let's say text on Mac, and I'll make that a bit bigger. I can copy that. And then here I'll start Notepad and I can paste that in. Or I can take text on Windows, copy that, and then go onto my Mac and paste it on. VirtualBox supports all that type of functionality for free on a Windows computer. If you're starting out, I would get VirtualBox. You can find it by going to virtualbox.org and then you can download it. I'll link a video that I created previously below where I'll show you how to set this up, and I'll also create updated videos, showing some of the functionality available with VirtualBox. Another option is to use VMware Workstation Player which is free, but VMware have kind of crippled it, it doesn't have as much functionality. But if you can pay for it, VMware Workstation Pro is better. I find that VMware works better when you're doing what's called nested virtualization, where you are putting operating systems within operating systems and you need those operating systems to have access to the CPU. If you're running CML or GNS3 or you doing stuff where you're running operating systems like Cisco or Aruba within QEMU, which is running within a hypervisor then I found that generally Workstation Player or Pro from VMware's better. But if you just wanna start out and you're learning about virtual machines, then get VirtualBox. On a Mac it gets a bit more complicated. You can run VirtualBox, but I've found that people have optimization issues with that. I've generally had better results with VMware Fusion. VMware Fusion is also free on a Mac. If you've got a Mac, and this is where the line's blur now, if you've got a Mac that's Intel, VMware Fusion is fine but if you've got a Mac M1 or M2 you probably want to get Parallels. The problem with Parallels is it's paid for software, but it's the best at the moment. If you want free software, you can look at UTM. A lot of people have found that UTM works okay. It's not as good as Parallels. VMware have released their VMware Fusion 22H2 Tech Preview. You can download this for free but it's preview software. It may not be perfect. If you're really into virtualization you may prefer to get a server like this or much bigger server and then run ESXi. What are your thoughts? What do you think? Have I missed anything in this discussion about virtualization? I in the past have always preferred VMware but I found that VMware are not always the best these days. So VirtualBox may be a better option especially if you're starting out. What do you think? Let me know in the comments. I'm David Bombal and I wanna wish you all the very best. (upbeat music) (mouse clicking)
Info
Channel: David Bombal
Views: 240,022
Rating: undefined out of 5
Keywords: virtual machine, vm, windows 11, windows 10, windows 98, macos, ubuntu, linux, virtual machines, esxi, vmware, qemu, hpe, install ubuntu, linux tutorial, virtual box, kali linux, virtualbox tutorial, install kali linux, virtual pc, linux on windows, linux environment, virtual machine windows 11, virtual machine tutorial, virtual machine windows 11 on mac, virtual machine mac, install ubuntu alongside windows 11, install ubuntu on virtualbox, windows macos, kali linux mac, gns3
Id: yHT4kq36PE4
Channel Id: undefined
Length: 19min 50sec (1190 seconds)
Published: Fri Sep 23 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.