Virt-Manager Is The Better Way To Manage VMs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Woo!

👍︎︎ 2 👤︎︎ u/SomniumMundus 📅︎︎ Mar 24 2020 🗫︎ replies
Captions
in the two-plus years that I have been doing this YouTube channel you guys have seen me create hundreds of virtual machines on camera and one of the questions I get the most is why do I use VirtualBox for my virtualization why don't I use KVM or VMware or whatever it is some other virtualization method other than VirtualBox and the reason is is because all of them kind of work all of them kind of don't work I've just gotten to the point now where I just stick with what's kind of been working for me for years now VirtualBox it's kind of like distro hopping you know you're never gonna find the perfect distribution you're never really going to find the perfect hypervisor you know you're gonna have problems with VirtualBox you're gonna have problems with virt-manager you're gonna have problems with VMware you're gonna have problems with everything that you try so I've kind of just settled in with VirtualBox mainly because I've actually seen VirtualBox over the last 10 or 12 years get really good when I first tried VirtualBox it was a complete clown show and now it's gotten to the point where it's really good and one of the reasons why I use VirtualBox is because it's kind of the virtualization program that most people use to run desk top operating systems such as Desktop Linux many Linux distributions make sure that their distribution actually runs correctly on VirtualBox because they know so many people are going to try their distribution inside VirtualBox so that's another plus so since you guys have been asking I figured why not I've used it in the past let me quickly install virt-manager here get it up and running and let me show you how to create virtual machines using virt-manager so the first thing you need to know if you're new to something like virt-manager is we're gonna have to install several different programs to make this thing work this is not like VirtualBox where you install VirtualBox and VirtualBox works no you have to make sure that you have KVM QEMU libvirt virt-manager maybe a few other things going on on your system depending on the district you're using I think the place we should start is in the arch wiki we're gonna read a few different arch wiki pages what we're not gonna read them but I will link to several arch wiki pages in the show description because you guys you may want to read them so KVM what is KVM that is the kernel-based virtual machine that is the hypervisor that is built directly into the Linux kernel that is why so many of you guys asked me about KVM as opposed to VirtualBox this because KVM being built directly into the Linux kernel it's already there and theoretically virtual machines using KVM should run faster than those VMs that use something like VirtualBox because again KDM is built directly into the Linux kernel it should get much closer to native performance you need to make sure that your machine actually has KVM enabled make sure it supports KVM if you read the arch wiki it gives you a line here you can paste in the terminal just to make sure that your machine actually supports KVM the next thing we want to talk about is QEMU now when people talk about KVM and QEMU they usually talk about them together it's because you really need both right so what is QEMU well according to their about page QEMU zone about page it is a generic and open-source machine emulator and virtualizer qemu it can use other hypervisors like the Zen hypervisor or KVM which we're going to use with it and it uses CPU extensions for virtualization and once again when used as a virtualizer qemu achieves near native performance by executing guest code directly on the host CPU and that's why you're getting close to native performances because you're kind of almost running natively anyway now you're going to have to install QEMU on your system so sudo apt install QEMU i'm assuming on Debian and Ubuntu based distros on arch you can do a pacman - capital S QEMU to get QEMU installed the next thing you're gonna need is libvirt libvirt is a collection of software that provides a convenient way to manage virtual machines basically what what this is is what what it says is a collection of software to manage virtual machines but it enables us to use graphical virtual machine managers because we don't want to use qemu as a command-line application that is actually what QEMU has it has a command-line interface which is fine for professionals in the industry because they're typically installing headless servers virtual machines on headless servers and they're doing everything at the command line anyway but for desktop users right we're gonna want a graphical client to manage our virtual machines so you need to make sure libvirt is installed because that's the collection of software that would make any graphical client and work and then you want to actually install a graphical client and the one most people are going to use is virt-manager and that's the package is actually vert - manager now vert manager is not the only client that works with libvirt there are others I'm sure you guys have heard of genome boxes it's one of the standard genome utilities it is also a front end to live vert KPM qemu it's a little bit simpler of a program so it's very easy to use but it doesn't have as many settings and stuff as virt-manager virt-manager is a little bit more put together it's more powerful program so that's the one I'm going to use today now I mentioned we're gonna have to install a few things to get this working I showed you all those various arch wiki pages all those programs that we have to make sure they're installed and enabled let me show you this in action though let me bring up a terminal and let me zoom in here and the first thing it recommended is kvms built directly into the kernel make sure you have kvam enabled and make sure your machine supports KVM so you need to run this command again this was found in that arch wiki page for KVM run that command and it'll tell you whether you are good or not in my case I am fine KVM works just fine on my machine then I needed to install a few things that were not on my system so I did with yay - capital S or pseudo Peck man - capital s on or CH I needed qemu because it's not automatically installed on most distributions you have to install it then I needed virt-manager which is the GUI front-end that we're going to be using and then I also needed this particular dependency EB tables and that is some kind of Ethernet bridge software some kind of Ethernet bridge program that I guess virt-manager or QEMU needs so anyway I needed that to make this work and then give it the root password but you know what I've already got it installed on my system so I don't have to do that then you need to enable a diamond called libvirt D you do this of course with system D just like you know any other background process that you want to always be running in the background so you do sudo systemctl enable live vert D and I've already enabled that so I actually don't have to run that and then once you enable it you need to sudo systemctl start libvirt need to actually start that process running and then once you do that you need to make sure that your user is a part of a group called libvirt D and I would just use user mods sudo usermod space - capital G for groups we need to add us to the libvirt D group new a and then your username which is DT in my case and that adds DT to the group libvirt D for not a member of that group we're gonna have a problem with virt-manager alright now once you've got all of that you should be ready to go so if I launched Virtanen it's asking for a password for our policy kit I should have mentioned that - let me login here so policy kits if you're using a standard desktop environment you don't have to worry about it one's already built-in if you're running standalone window managers like I run tiling window managers you need something like LX session or something like that running let me pull up the arch wiki page real quick pull up their policy Kip page Paul KITT you need one of these programs running I typically install LX session on all of my minimal window manager only installs you could install something else again if you're running a desktop environment a traditional desktop environment don't worry about it you've already got one installed and running let me get back to the desktop and this is virt-manager and let me do the about virt-manager 2.2.1 it is powered by libvirt why check out the license here see what kind of license it is licensed under the GPL version 2 now when you first open virt-manager for the first time yours will not have these two VMs that I already have I created two VMs just to make sure this thing is working I created one the traditional way by actually just attaching an ISO and then installing a distribution I also created one by converting one of my existing VirtualBox virtual machines over to virt-manager I will show you how to do that in a second let me show you the more traditional route here so you would go up here to file new virtual machine and how are we installing it and you have some various options such as choose the ISO image you could also do Network installs there's also the option of importing an existing disk image now the existing disk image for virt-manager is cue Cal so it's these virtual machines that end in dot QC o W I don't have any of those on my system all of my existing virtual machines or VD eyes which are the VirtualBox virtual machines so anyway I'm gonna do a local install with our ISO click forward and then it's gonna ask about our ISO we need to go find one like it browse on my local machine and somewhere in my downloads here I'll just pick any you know I've got the pop OS 19:10 here for example I could click that it says do we want to automatically detect from the installation source what the operating system is it looks like it's already figured out that it's pop OS so we're with that because of the last time I created a virtual machine I chose four gigs of RAM and two cores on my CPU it looks like it's chosen that again for me which is fine that's typically what I go with its wanting to create a 25 gigabyte virtual machine disk that is pretty big for a Linux install I could probably get away with about 15 gigs but you know for purposes of this I will do the 25 gig install oh we could play around with the network connection here but it looks like whatever the default is works just fine so I'm not gonna mess with that and then I'm gonna finish and it says virtual network is not active would you like to start the network yes it's creating the domain and oh it already automatically launched let me move this out of the way and this is pop OS booting off the live eye so I'm not actually gonna go through the installation here but I was just showing you how to create these virtual machines if you still have this window up here you will see pop OS has running up underneath it and you are actually getting a grid here a little graph that's showing you CPU usage let me drag that back out of the way in the virtual machine window itself you have some different options here such as run pauls shutdown migrate delete the VM you can also change the way this view is taking place and then you have some various key bindings you could use as well you do have a full-screen button here but you can actually make the VM fullscreen did you see the little pop down in the center here let me see if I can get it to go away but I can bring it back up but just throwing my mouse in that center screen there and then I could choose leave full screen there are key bindings to to go full screen and exit full-screen let me kill this VM so I'm going to choose shutdown and wait for systemd to shut down should have just told it to force stop it which is the brute force just kill it no matter what it wants to do yeah and says guest is not running so let's quit I got quit out of manager altogether when I chose quit though they launched virtual manager again it's gonna ask for passwords so virt-manager is pretty simple to create vm's you know it's not complicated the complicated part is getting everything installed and enabled to use virt-manager there is a lawnmower across the street somebody's mowing their yard I hope that's not bleeding through the microphone if it is I do apologize guys now let me show you how to convert an existing VirtualBox disk image a VDI over to the cue Cal format that virt-manager uses because I have probably 1520 VirtualBox VM is created and I don't want to have to just delete all of those VMs and then reinstall invert manager know you can convert them very easily so let me pull up a terminal here me make sure my terminal has focus here and clear the screen here I'm gonna zoom in let me show you the command you need to run you want to run something like this this was the command that I ran to create this a boon to 2004 VM I had already had it as an existing VirtualBox disk image of VDI so I run sudo space qemu - image so again qemu really is a command-line interface program space convert - if VDI so it's saying convert to the format VDI or are from the format VDI overtook you Cal - which is the format that virt-manager uses and this is my VirtualBox disk image and I'm converting that and placing it here I know it looks like a long convoluted complicated command it's actually not I will link actually to that command in the show description for those of you that will need it because I problem you've been using virtualbox forever and a have a ton of VMS already installed in VirtualBox you're probably gonna want to convert them and they convert just fine let me open up the aboon to VM here just to show you that this thing actually did and hit play here I'm gonna fullscreen it and the VM has finally loaded the screen resolution is a little off didn't I do my awesome window manager video in this VM I forgot about that yes I did now the screen resolution is a little weird but the one thing I have noticed let me run ex-ranger something different about vert manager as opposed to VirtualBox and VirtualBox I always had to pick a screen resolution other than 1920 by 1080 my monitors are all set to 1920 by 1080 but I never had 1920 by 1080 as an option inside VirtualBox when I ran X render it's almost never I either had to go with something smaller like 1680 by 1050 was typically what I did or I had to fight with trying to get guest permissions to work and I don't like that I just don't have that kind of time anymore but your invert manager you know we have 1920 by 1080 as an option let me just middle click the mouse to copy that little wenneck strict there I hope those of you new to Linux middle click on the mouse copies in Linux we don't use control-c and control-v just middle click the mouse button so that is really cool so the VMS are very responsive they seem to work just fine of course my beams in VirtualBox I didn't have issues as far as performance but again virt-manager because it uses KVM which is built into the kernel these beams are supposed to perform better and then things like VirtualBox so let me kill this VM here I'm going to drag the main virt-manager window here and you see a boom to 2004 running if I right-click on it I'm gonna go to shutdown this time I'm just gonna force it off I don't want to wait for system D to run all to stop jobs and everything and then we're just gonna quit out of virt-manager so that is just a brief look at virt-manager will I start using virt-manager as opposed to VirtualBox well since I went to the trouble of installing it I probably will for a little while again I've used it in the past went to VirtualBox went back to virt-manager went back to virtualbox like i said they all work and at the same time they all have problems occasionally like you'll have a problem with a VM it just doesn't run right at all in VirtualBox you'll install it invert manager it works fine then you'll install a different operating system and verb manager for some reason it gives you problems you'll install it in VirtualBox and it runs just fine there's no perfect solution I some of you guys have been asking me about VMware I'm never going to try VMware so you guys can quit asking about that it's proprietary software it's a horrible company VMware the company has actually been sued before for violating the GPL so I'm not interested at all in VMware I know some of you guys will I have to use it because I you know I miss this admin we use it at my work I have to use it as my job that's great I don't have to use it so I'm not going to use it if you guys have to use it use it but it's for me for normal desktop users especially VMware really is not something anybody is probably going to use just to check out operating systems on their desktop VMware is much more you know enterprise level of software anyway not that virt-manager or VirtualBox couldn't also be used in a professional capacity they are oftentimes they are but VMware again is proprietary software and when there's good free solutions out there like both VirtualBox and virt-manager yeah I don't expect a video on VMware ever on this channel now before I go I need to thank a few special people I need to thank the producers of this show Michael Mitchell Chris DJ Donnie Dylan George hello Nate lambda I Marie Rob Sean and Willie these guys they are my highest tiered patrons over on patreon without these guys this episode about virt-manager wouldn't have been possible show is also brought to you by all these other names are seeing on the screen all these fine ladies and gentlemen that helped support my work over on patreon without these guys this episode you just watched wouldn't have been possible this channel wouldn't be possible do you'd like to support the channel consider doing so you'll find me over at patreon just look for distro tube alright guys peace
Info
Channel: DistroTube
Views: 177,614
Rating: 4.9073682 out of 5
Keywords: linux, gnu linux, virtualization, virtual machine, hypervisor, kvm, qemu, libvirt, virt-manager, virtualbox, vmware, gnome boxes, kvm qemu, libvirtd, virtual machine manager, oracle virtualbox, convert virtualbox, linux virtual machines, virtual machine performance, kvm qemu libvirt, arch linux, ubuntu, test linux distros, try out linux
Id: p1d_b_91YlU
Channel Id: undefined
Length: 20min 6sec (1206 seconds)
Published: Tue Mar 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.