Virtualization on Linux, Intro to KVM with Virtual Machine Manager

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone Scott with cyber scribe org and in this video I'm going to show you how to set up virtualization on Linux with KVM so if you already know virtualization you probably know VirtualBox and VMware Player VMware Workstation so what KVM is is that is a similar solution built into Linux and when I say built into it I mean if you have say fedora this is a fedora system if you have a fedora system are probably Debian 2 or sent OS or Red Hat when you install the system itself it has the option to add virtualization as you install the system now remember you can't do that with VirtualBox or VMware so that's what I mean how it's almost built-in kind of and if it's not built-in you can just check your check the packages for it I think sent to us it would be um group up install you know install virtualization platform tools that kind of stuff so would you just check out Google for what packages you need to install for your virtualization or what group of packages you need to install it's not that difficult and it's really just it's already installed here so I'm not going to do this but it's just a simple matter of entering this command if you didn't do it as you installed your system one thing you need to do to check if your processor can handle the virtualization is go to LS mod grep KVM okay and you see i have k vm underscore intel i have an intel core i7 processor and that is the kernel module for the virtualization if you don't have that you know if you have an AMD processor though then it would be k vm underscore AMD if you didn't have that then check your motherboard settings because you might have to in the bios go in there and change it where you allow virtualization now what you do is there's a couple different ways to do the virtualization and that terminal way for it is vir SH and there's as you can see a lot of stuff let me just scroll a whole bunch of stuff you can use this for scripting it's really good but that's a little bit beyond our scope just be aware that that's there we're going to use virt-manager and that is the friendly graphical interface for it and what we have here is I didn't now note I didn't make any changes beforehand or anything like that this is just out-of-the-box virtualization so your localhost that's the QEMU that's your emulator for all this stuff and connection details what I just want to show you is just a couple things you can do before you start setting up your system and it's set to auto connect automatically you can do set up your virtual network so right now it's just set for 192 168 1 22 I can change that and I can make different networks I can do different subnets and all that stuff and have it connect you can configure storage pools and things like that here and that's about it network interface is not much there don't worry about it you don't have to worry about any of this stuff if you just want to make a quick quick virtual machine but be aware that those options are there and all it is is just a matter of going through and following the prompts so that's just what we're going to do quick and easy and I'm just going to use an ISO images an ISO image and you can also go to browse local and go to your local file system I'm just going to choose that my operating system is Linux and because sent to us is a clone of Red Hat that's how we're going to do that now be aware that you can change the CPU and the memory after you install the virtual machine so if I say to now and I say no I don't need to I have up to 8 available because I have a quad core which is 2 threads on each core so I can go up to 8 now you know what let's do that with the help not necessary but we're just going to try it memory just say 1024 you can like I said go up and down with this stuff be aware though if you are if you're if you have like say 8 CPUs and then you install your virtual machine you get a whole bunch of stuff running on there you say you know what now I'm going down to one CPU well that might be an issue because you're you know it depends on the stuff that you got going if you feel really loading that machine that might not be able to handle it same thing with the ramp your system might become unstable so just kind of use common sense when you're doing this stuff I'm not going to go to eight and let's just go to to eight is not necessary for what we're going to do but the same thing like I said with the ramp just common sense and the disk we're just going to go down to five and that's it and just change the name and take a look here you have your image is going to go into var libe libvirt images and then red hat that was just the name here q cow too is your virtual virtual disc extension there and that's what that stuff is so let's just finish and we're just going to start the machine that's what's going to start going right now and we'll get started and I'll just show you some other things as this goes I'm not going to walk you through the whole install process I mean it's just a question of hitting enter enter enter a bunch of times so that's not what I want to show you but let me get let's just get to the first thing okay now I want to I'm just going to wait for this screen to change size because it's going to happen or resize to VM okay you can do that let's bring it back up all right so I'm going to start installing it now but now I like where we're at okay so you can see right here you have the graph the computers this virtual machine is running okay so you can see it running there you can see the graph of stuff but I can toggle between the hardware details of the system and the console itself so just be aware that if you if you have something and you want to check say this is running really slow you want to check the memory maybe this is where you do it now remember you can't really change this stuff as it's running you would have to shut it down but it's nice to come over here and look and that maybe take notes and see what you need to change okay I'm going to go through with this just install it and I'll come back when it's ready to go and we're back and you can see the package installation has completed it's got to do a couple more things take a look at the CPU graph and it's going to fall off pretty quick and just keep an eye on that as I as I show you this other thing but that you can see that packages are being installed and it's going to be leveling off not leveling off but dropping off there you go right there one thing though is snapshots now this is one of the nice things about virtual machines is you can basically save your whole image configuration at any point with a snapshot so what you do is if you're working on a system and you say ok this is good I know this is good and it works but I need to make some other changes what you do is you go you take a snapshot of the good working configuration make your changes then if it works great if it doesn't go back to the snapshot it's one of the real nice things about virtualization so here the installation is complete we're going to reboot and just take a minute to do that and after that diet we will be done so let me just come over to here for a second let me just change this real quick but you can see over here you have open it's already open so that's why and that's why these are grayed out because this is open here you see how these these buttons are working and these buttons are greyed out that's because you have it right here okay so there you go you're in the system now what you can do is if you have if you're using just a graphical command-line interface here there's no there's no X server or anything like that then you can just view and just resize to VM because you know you're not really going to be needing a full screen for just a command-line interface like this and that's it and like I said you can reboot shutdown do these things force off this is like pulling your you know the power plug out of the wall so advisable not to do that but as you can see here it's the computer started up right at that peak right there and then now it's running very low not much doing so that is it so I'm just going to shut the Machine off but yeah that was your first install of a virtual machine with KVM and that's it it's going to shut off there and as you see here it shut off right there and the CPU usage graph goes away and you're all done that's it and it's it's really easy and you can play around with the stuff you can break stuff and with snapshots you can save your good configurations and try to find workarounds in other ways and things like that so a couple of the reasons why virtualization is is pretty cool and that's all I have and stay tuned for future videos
Info
Channel: CyberScribe.org
Views: 163,307
Rating: 4.7810946 out of 5
Keywords: Kernel-based Virtual Machine, GNU/Linux (Operating System), Virtualization (Software Genre), KVM, CentOS, Virtual Machine Manager (Software)
Id: rZhMeQjpcrw
Channel Id: undefined
Length: 10min 6sec (606 seconds)
Published: Tue Sep 30 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.