The BEST Way to Make Virtual Machines - Virt-Manager

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i've gotten a lot of youtube comments all telling me all about virtualization specifically linux virtualization i don't know what this means i'll print i'm going to pretend it's how do i run virtual machines on my linux machine well i'm happy to say for decades this has been remarkably easy to do there's just many different ways of going about it but i'm going to focus on the best way in particular i think everyone can agree this is objectively the easiest and most performant way to do so all right and it's vert manager virtual machines are all about having a separate computer that you pulls resources from your real machine really the best way to think about it is think of it like as a computer within your computer i think that's the best way to explain a virtual machine to someone and there are many types of virtual machine software so like everyone knows things like virtualbox and vmware workstation and parallels there's all sorts of them but today i want to focus on work manager for one key reason verb manager is probably is not only free but probably the better performing out of all of them at least for for linux users anyone who's tried to use a virtual box knows you have to install the guest edition cd just to get like copy paste to work in your virtual machine properly and then vmware wants you to in parallels want you to cough up money just to do basic things with their programs no no no parallels want you to cough up money on a subscription basis so they're even better stop it get some help and then work manager is has direct unlike all these other programs uh has direct integration into the linux kernel yes they're that special invert managers uh is backed by red hat everyone's favorite corporate linux corporate entity and they actually have a full guide on their website explaining in detail how to run and use a manager and virtualize linux distributions on red hat server so anyone who uses stuff like red hat server or whatever you probably know this better than i do vert manager is essentially a front end for all the command line stuff that you would do if you were using like using it on a server right so it's primarily targeted i would say towards desktop users right because if you let's say you have an internal spice server and you're trying to list in spice server which is the server which you use to connect everything you can connect local ip addresses to your to your server you just need to configure them right and that's and you know that's the big hump that verb manager has to overcome or all the configuring them but once you get going using vert manager especially if you're on like a debian based system is remarkably easy like there's very very little upkeep you don't have to do anything crazy uh you just and then if you're on if you're on another district you might have to put in some extra work right so if you're using anything other than debian or ubuntu you might have to put in a little extra work and that's partially because they don't a lot of other package managers don't configure these things to give the end user who's probably a developer who knows what they're doing a little more uh freedom to do what they want with their server right so uh so for example i'm going to use this guide right because uh the this fedora guide actually helps a lot if you ever have issues come back to this fedora guy there's a link in the description go follow it this one guide tells you practically everything you need to know about how everything works and how what to do if you're having problems so for example on red hat distros there's actually a group list for it it's advert sudo dnf install at virtualization and then you just do that and it will magically install everything you need this thing ignore this this you might only need to do this using fedora server but if you're using desktop desktop linux you never have to do this i've never had to touch this at all and then you need to start and enable the service if you're on debian this is done for you by apt but if you're using another distro you're gonna have to do this yourself so if you're using fedora or arch linux or sousa you're going to have to do this yourself now then add your user to the group this is to deliver group make sure you're in the lib group and then once you do all of that you need to log out and log back in again and then you can get going right so what do you so what do you do so you know do everything you need to do in your terminal get everything you need and then go right and then what you can do is once you do that you can just open vert manager like you would so like if you have like you know your start menu or whatever go click on that you'll get there right they make an icon for you right and this is a behold this this is all the virtual machines i have i actually have a lot probably have more than normal people and it's not because of youtube or anything i just have them because i have them okay i i like to have every like major operating system at my disposal within reason of course it's like fine wine you need to have every every uh every tasting of fine wine in your cellar the real benefit of vert manager is this ui here has not changed in a million years so you can use this and it's going to function exactly the same as it does across every line no matter what linux destroyer you're using right so how do you how do you get started right so pretend all of these aren't here right let's see let's ignore all these what do you do what do you do if you don't have any virtual machines installed my guess is press the plus button exactly so you press the plus button and then i'm helping and then this window will pop up and you're presented with a bunch of options so for example uh you can do local install so this is if you have an iso image or a dvd but you also have network install so if you want if you know something like arch linux or gen2 support network installs right you can use this to actually do a network install of disk drive your choice you can also import uh disk images right so if you have a img file is it is it img yeah well there's img files but there's also things like for so for example i might do cover this in the future the linux distribution hunix will actually distribute to you maintainers will actually provide you a raw keemu image for you to down install yourself and they actually have a full guide on various linux distros on how to install and how to to apply their keemu image into your distro it's actually pretty comprehensive so if you want more resources on how if you ever get if you really want more resources all this other stuff didn't help you uh the whoonix wiki actually has a really great guide on how to go through all of this so uh if i hop back to the virtual machine here so i'm just gonna go off of iso images because i assume that's how most people get their linux just isos you know uh you know you can always down you all everyone you always your own way to get your linux isos i don't know about you but i'm always torrenting my linux isos by default what they do here is they actually have a pool and this is where this default pool is where all of your virtual machine images are stored so by default it's slash var slash lib slash live images and that's where they dump all of your images right um so what you might need to do is you might need to add a pool right and a pool is where so to protect the security model of your system you're not allowed to add other folders in here which are not allowed to touch uh your virtual machines this is done for your protection okay especially for people who run servers what if there's a virus that could possibly try to use this to escape because they're using a server with a gui these pools are created so that they use spiced the spice protocol to transfer files uh to the virtual machine system so that everything is navigated across the galaxy right so using space again like what we did earlier what's the first thing you do you hit the plus button right and then what you can do here is you can name it whatever you want and then you can add in the folder of your choice this can even be a folder that you just dump all of your iso purchases in right and then you just click finish and that's actually what i did so this pool right here i just named it pool i'm uncreative but you can see here i actually have various other linux distributions installed you do actually legitimately have a lot of isos oh these are all checksums ignore those oh those okay um but so let's so let's pick something here right so for example let's say i wanted to install i don't know the latest version of zuban 2 of 2.2 what am i saying the latest version of fedora xfce because this is a common build that i use for a lot of my virtual machines right and because this is in a folder so you can see this is in uh my home folder and it's in the isos folder right so this is the one that i'm going to use just click on it and then click choose volume what i will try to do is you'll see here it tries to guess what distro you're using uh you don't have to actually be precise here but um and if it doesn't detect it like it didn't here you'll notice it didn't even detect it here so if you just type in like fedora you'll see here fedora 36 i think this is the correct one so you just click on that you can click on whatever you want but like if you want the best experience this just helps picking good defaults for your configuration right so it's best to be accurate with this as much as you can so just click next and then you can see here you can out choose how much ram you want to allocate and how much cpu cores you want to allocate because i'm recording i don't want to dedicate a lot of cpu cars but because i'm extra and special i'm going to give it uh 8 gigs of ram because i'm special that way because you have that ram dispair and then you can create a special disk size so the default for fedora is 20 gigabytes but if you want to add more feel free to add more and these up to your discretion you can also choose to have it store again in a pool the pool of your choosing so if you want to store all of your liver images in your home folder feel free to do that but i'm just i just use the default location some people choose prefer to do this because it's in their home directory and it's easier to interface with you can't actually run any commands in this directory right which is again for your own protection there's a reason why they don't do it you don't want to give an attacker complete access to your root directory that would be awful well so let me show you what this actually looks like right so i'm just going to zoom into this terminal here so what i'm going to do is i'm actually going to show you what happens if you what libra tries to do to protect you right so what you need to do is if you do ls and then what i'm going to do is i'm going to do slash var slash lib slash liber and then you'll notice when i do images right and if i press this notice this it says ls cannot open directory permission denied and it's because i am doing this as my standard user i am not doing this as my root user vert manager is trying to protect you so this is one of the reasons why you can't do this i understand if you want to do do whatever you want but understand this is why you use the default folder so what are their permission levels for that directory it's for the libert user only right and the root user right okay so that's for your own protection so something bad in case something bad happens and then you can see here you can enter the name so i'm just gonna say let's call this youtube make it easy and then you can configure your customization reports and i actually recommend this uh there's a lot of in optimal things at the beginning so uh let let me go run give a quick run data on this i'm not going to go through all this but i'm just going to try to explain how this works all right so the first thing that i would do is uh notice here if you go to cpus um don't copy your whole cpu configuration all right this is partially to help make the virtualization process smoother and this is more true of linux than it is of windows so like it but if you're on window you're trying to emulate windows through keemu you might want to still do this right so what i always do is i always change this to do host pass through that way it's not directly pulling your cpu right i just this is just something i do right i don't know why what does host pass pass through do it it's i actually don't remember it passes through the host yeah it just passes through the host if you do host model it just tries to clone your host model but it doesn't actually like use it per se it's it's not really complete so that's why i do host password right second thing you can do is memory so if you change your mind if the ram allocation you did earlier you can see it you can see i have 32 gigs of ram and you can just give it whatever the heck you want um and then here's this thing or a tablet yes i don't know why they do this virtual input for touch pads um i don't have a touchpad i'm just going to get rid of this so this is not going to be checked by default i recommend everyone go through this by default it's probably set the qxl the qxl driver to maximize your performance you want the vert i o driver the vert i o driver is a superior driver right and then after that you're pretty much good to go uh you have to click apply and make sure you apply all your changes and then click this button right here to begin installation right and then what this is going to do is it's going to begin the installation and you can see here this is a fedora install you can see you can full screen it so you hover over at the top here you can see there's this little menu you can full screen in on full screen it you can also freeze the virtual machine so that's the pause button and you can also force it off or reboot it because sometimes you might need to do this and then on this little this little two double screens here this is for snapshots and you can use this to save a snapshot of your virtual machine to rewind it back in time right so i'll give a demonstration of this but this is pretty afterwards so this is pretty much what you'd expect from you know your standard virtual machine this is pretty normal for virtual machines as virtual machines go you can see it's starting to boot up now it's probably going to take a little longer than usual because it's only got one core there's only one core and you can see the fedora logos which means it's booting up right why don't you press escape what i think it's escape so you can see if you ever click on it and your mouse gets stuck so notice how my mouse just disappeared if this ever happens to you do control alt j and then what that will do is that will free your control you can do control alt g and that will free your mouse um this is a tr i got worried about this really early on but you need to do the for your mouse but as you can see take a look at this it's a live image but it's a fully functioning fedora virtual machine um this is running out for the live image and it's not oh and you're using x xfce okay yeah this is the xfce spin so as you can see i mean i was going to say it was like you don't have desktop icons in fedora by default no you don't but as you can see it's working just fine so i'm just going to power this off for now because i think we're done with the that's just how you and then you would just proceed through installing linux like you normally would right i'm just gonna force that off here right and that's pretty much about what you'd expect right but let me actually show you a template that i actually use and i might release this in the future you can see here i've had to update this numerous times so this is uh one of my templates right so what i recommend doing is the reason why i have all these distros here is they're actually all just templates right so i just copy them on the fly and then i can just use them for some disposable if i want to do some disposable computing or web browsing or if i want to test out an app that i don't i'm not exactly familiar with and for all you nerds out there you can test out the window manager of your choice and not have something go wrong with your main machine when you do it so you write all your configs and a virtual machine and then you transfer them to your real machine right that that's that's what that's the smart way of doing it don't test it on your main machine test it in a virtual machine first then bring it to your main machine and see what happens right and that way you don't have to worry about trying to uninstall all kinds of crazy dependencies because you can just trash the virtual machine right but let me give you an example an example here right so notice this virtual machine is clean and undone right so let me power this off and i'll show you how snapshots work right so if you want to get snapshots to work right so if you go to the remember click on this little screen icon it's the end right here right and then what you're going to want to do is you want to click on this plus icon right here right at the bottom and then you'll see it lets you create a snapshot i'm just going to name this default right you'll notice it creates a snapshot i prefer to do this when it's powered off generally for some reason this is not just manager this is every virtual machine software i've used it always seems like it takes a long time to pull a virtual machine that's actively running and that's possibly just a limitation of the times so simply we'll have to live with that so treat that as this is that's a blank slate for this virtual machine right so let me show we'll show what this looks like right so this is pretty much what one would expect from a virtual machine but let's actually show some changes on what this actually might look like on how the snapshot runs so let me try to do some things in this virtual machine and show what my look likes right so the first thing that every virtual machine that you because not all of them installed like fedora will install this by default but if you're installing another linux distro they're not or like that isn't fedora or opensuse they're not going to do this for you so you're going to have to know how to do this right so you're going to need the package and it's always this name this is the same as arch linux and debian or whatever you're going to need the spice uh if i can actually spell the spice vd agent virtual desktop agent you're going to need this package right so if i do sudo dmf install spice pd agent right password and then what this is going to do is you'll see here it's well i actually the way i have this configured is it's downloading it's checking fedora's repos right now um but you need to make sure you have this package installed this package essentially allows you to copy and paste from your virtual machine and the beauty of this is this isn't as convoluted as vmware and virtualbox's solution this is just something that universally works across all of linux you don't need to have to install virtual boxes awful guest additions you can just you can just copy paste like magic so let me show show what this let me try to show what this looks like right so i'll open a terminal here because this is how i function right and let me just open bim right actually let's open this bash script that i've been working on it's probably side of my shelf so let's open this bash script that i'm working on right you can see here there's a lot of uh random my animate list because i'm a nerd this is what i i'm a weeb and this is what i work on right so let's say i want to copy a line here so i'm just going to copy and i have neovim configured so that i copied directly from my clipboard right so if i let me say i just want to copy this line here this line right here so i'm just going to copy that line it's just y y but it doesn't matter you can do this will find out a text editor browser doesn't matter whatever you copy from it takes your system clipboard and this works on both weyland and xor right so if you and then watch this if i if i right click and then paste notice how this code this html code actually gets pasted directly in here and that's and i click cancel there but if you actually just want to paste and click paste boom you pasted it right look you can even notice it got the little unicode stars like it's it's actually pretty good so like don't be afraid to take advantage of this i mean this tech and technicality uh for the the paranoid out there having guest additions does compromise your vm because this allows potentially allows the virtual machine to essentially detect what's on your clipboard right so but for most potentially pass a virus through a footboard right but for most use cases that shouldn't be a concern concern for people right so that's a this is having the spice agent lets you do that things like copying copying and pasting but here's one of the other cool things like virtualbox and like vert manager one of the cool things that this does is this lets you transfer files right so one of the things here so let me show you how what this looks like so i have right here you'll see here in my gui file manager i haven't found the way to do this in the command line i'll find out how someday um but and here i have i'm using the gui file manager you can use whatever gui file manager he wants works if you're using dolphin or thunder or nautilus or whatever file manager you use right just just make sure it's a gui file manager right what you can do is you can actually drag and drop documents from your computer no matter what they are right so right here i have apple's security white paper they release this like a couple times every like once or twice a year once or twice a year and then you what i'm going to do is i'm actually going to drag and drop this into the vm you'll see when i hover over it there's this little plus over my cursor and i'm just going to click there and then you can see here look at that the document was magically transported to my computer right that's actually a remarkable amount of integration and it's this is because it has direct integration for linux kernel right you won't get this the same kind of seamless experience that you would get if you were using something like uh vmware workstation or virtualbox right and this this when you if you're a linux user and you're using like virtual like virtual machines seriously consider verb manager there's a lot of power to give you and it works pretty much identically to what one would it at least to what one would expect to running and viewing programs like you know on your computer like they're especially for like testing out like linux distros like doing running windows programs or like there's and there's all sorts of more cool stuff you can do that i don't have the money or resources to do like gpu pass through running like like or like whatever like there's all sorts of cool great things you can do and it really does put a lot of this other these other like programs of shame especially on linux like keemu probably is the goal like is the gold standard and what better way to use it than use something like like vert manager to actually take advantage of all of these things right and you can see here another thing that i didn't notice but i think some people might have noticed notice how the cursor between my my virtual machine and my desktop here is seamless right that's another nice little tweak that uh vert managers spice agent the spice protocol does for you right the seamless mouse and mouse and clicking animation that you get when you when you move between your host machine and your virtual machine right but notice here so let's actually now let's finally let's top it off let's show the snapshot in action right so i'm going to turn off turn off the virtual machine here right and remember i pasted in that apple pdf onto my desktop right so let's roll back the snapshot right so i'm going to click on the snapshot that i created just now right and then i'm going to click on this play button right here right and what this play button is going to do is it's going to say are you sure you're going to run snapshot this snapshot but this is going to do it so basically what it's going to do is anything that was dumped on here is going to basically be removed and blasted off of my computer and is going to be replaced with how this virtual machine was before i made all those changes right so i'm just going to say yes and you'll see a little loading menu here and what that's going to do is that's actually going to replace uh the current snapshot right so to test and see if this works right what you're going to have to do is you're going to first boot up the virtual machine and you'll see here it looks you know kind of looks about the same so far right but then once you boot up the moment of truth uh once i boot up into the desktop i should not see the apple pdf and lo and behold here we are at the desktop and there's no apple pdf which proves that the snapshotting did its work so what if you didn't what if you wanted to at least temporarily save changes to a snapshot is it possible to do that yeah you would have to overwrite the snapshot right so um you well you can just make multiple snapshots too but like you can't really overwrite them you would have to just create another one right so like you can cr and this is i mean you're kind of limited this way another one so you can see here i have a snapshot that's currently running one right and you can just create that and this would be like a new blank slate for youtube so if you i don't know you were doing something to the to the apple pdf and you had to i don't know go off to work or something so you wanted to shut down your computer so you wanted to suspend the current situation that you had going on could you you would create a new system like this and then because it's this is essentially suspending my session right right creating a new duplicate of what is currently there right and then i would run the snapshot and then would reopen the running vm with this with this state right okay and this is true of all other virtual machines all the other that should be clear all of the other virtual machine software like verb manager rip manager is the only one like virtualbox and like vmware do this too so it's about what you'd expect um but that's pretty much vert manager or nutshell like that's at least as a desktop user that's what i would recommend doing right virtualbox on linux is super jank if you're using debian it's even more jank right it's awful like if you're using vmware it's not as bad but like it's still pretty bad like and you also have to pay up money i mean i know they have to make their money but like come on it's vmware they use max they don't use anything else but this is my firm manager is so cool you can just use this to yeah you're what you can do of a computer essentially becomes boundless once you understand what you can do through a virtual machine and that's what's that's what makes this so special right so you want to and again to your point right if you want to replace a snapshot you can just throw them away right so if you click on this little trash can icon here this actually deletes the snapshot so that's how that's how you do it but that's vert manager right it's really once you get set up it's especially if you're on debbie and distros it's super duper easy like because debian sets up everything for you right once debian and ubuntu will set this up for you and it will work great like once in yeah you might have to do some little extra tweaks here and there if you're running like anything other than like a debian based distro but for the most part it works pretty well i strongly recommend trying to learn learning how to at least use reverb manager to to a basic degree right i this is this is see this is the first youtube video run by youtube comments leave a comment down below what you want to do with your virtual machine and click the like button so that vmware can kiss my butt [Music] and parallels in parallels in oracle catch you later we'll see you nerds next week
Info
Channel: Trafotin
Views: 8,252
Rating: undefined out of 5
Keywords: kvm, qemu, virtualbox, vmware, parallels, virtual machines, how to install virtual machine, try linux, virt-manager tutorial, virtual machines on linux, kernel-based virtual machine, type 1 hypervisor, oracle virtualbox, test linux distros, testing linux, gnu linux, virtual machine tutorial, virtual machine manager, gnome-boxes, virt-manager linux
Id: m4cHMIMc0Cs
Channel Id: undefined
Length: 27min 6sec (1626 seconds)
Published: Fri Jul 08 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.