I Made The Greatest Windows 11 Virtual Machine...

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today's video is brought to you by our sponsors over at raycon disrupting the electronics industry by making great sound for everyone releasing their earbuds at half the starting price raycon earbuds give you six hours of play time seamless bluetooth pairing really seamless indeed more bassiness and a more compact design for an everyday comfortable noise isolating fit i mean have you seen the pill box and comes in really nice and cute raycon offers their wireless earbuds in a fun variety of colors and patterns and even a bunch of fit options for everyone with different ears right but the best part is no dangling wires or stems god bless on that one the company was co-founded by ray j and celebrities like soup dog and mike tyson are all in raycon is a 45-day free return policy so if you don't like your purchase for whatever reason then give it back but that said i know what i'm doing this summer with raycons i'm going to head on down to the beach now that we can go outside and just listen to some good tunes while running down like sonic the hedgehog that said though i want to know what you do with your raycon purchases so head on over down to buy raycon.com some ordinary gamer and get 15 off your next recon purchase hello guys and gals me mudahar and boy oh boy windows 11. i'm making the perfect ultimate gaming virtual machine now why windows 11 well because i actually enjoy windows 11 believe it or not and no i don't have a gun pointed to my head and if you look closely i do not have a sniper rifle trained to my forehead right now so i'm going to be just fine i'm going to be okay if anything i hope the g-fuel will protect me behind but why windows 11 well in the last several days that i've been using it it's actually been running a lot smoother than i expected the system itself is more stable than windows 10 and windows 10 is already pretty goddamn stable the update process is pretty smooth pretty you know hassle free boot loop free so far and the other reality is is that the gaming has actually been a far better experience which is kind of a bit odd to me i've been noticing that my frame rates on average have been a lot higher well not a lot it depends on the game but usually when i play games like cyberpunk 2077 i'm noticing that i'm getting like six seven frames higher than i usually would which may not sound like a lot but if you're looking at an operating system to an operating system that's still an improvement and it's a pretty impressive improvement games like red dead redemption have now been consistently running above 100 frames per second for me on the absolute maximum settings at a time where i used to be playing that game at like 80 85 fps a little bit odd and then games like rainbow six siege have never skipped a beat for me even though they ran really smooth on windows 10 in some way beyond placebo the games have been running smoother for me on windows 11. now why is that windows 11 last time we looked at it i said it was basically windows 10 with a fresh coat of paint in fact most tech youtubers effectively said the exact same thing now back when i covered it i was one of the first i was the first person by the way to use a windows 11 gaming virtual machine and i played games like yakuza like a dragon and it ran really well i was actually blown away throughout my last few days utilizing windows 11 editing videos on it about how smooth and house now in this setup linus showed he used a software called unraid which is a product that you can purchase that effectively is the same thing that we have been doing just a bit more easier to pull off with it it has its own you know graphic user interface it's basically based off of linux unraid is just linux and they utilize linux to run their windows virtual machines and pass graphic cards through so unraid isn't some like cheap solution you know obviously it's very great if you just want to get these things up and running pretty quickly but i don't recall if linus actually went into this and really went and optimized this virtual machine for the best performance so things like cpu pinning huge pages a lot of these minor optimizations that end up leading to pretty tangible benefits and experiences uh is something that we're gonna do today to make this virtual machine experience even more perfect than it already is so why is it that windows 11 a developer version is suddenly doing a lot better than expected now to understand this is a developer version of an operating system meaning that whatever we've seen so far is not subject to show up in the final build at all you know as par for the course for development a lot of stuff that gets introduced can very easily be removed simply because it just doesn't work well in a final product these things go through a lot of careful quality control checks what you and i may think works absolutely flawlessly may break down badly in some other you know control tests that microsoft has done now microsoft is going to reveal all of windows 11 in like two days which is insane considering the fact that windows 10 was supposed to be the last goddamn windows now they're making 11 so whatever now because of this increase in performance that i noticed i decided okay why not make the ultimate gaming virtual machine because i feel like i have to update my vm videos a fair bit now why that's because we need to optimize these virtual machines so that they're almost impeccable for gaming so that nobody can come in between us and say muda that's a dumb way to game now i've been asked a lot of questions about mudahar you play virtual machine games do you suffer lag the reality is i never lag with virtual machines why that's because it's not vmware people have this misconception that the virtual machine i use is like virtualbox and vmware or anything of that nature those are type 2 hypervisors with no graphic card pass through the way that i game is basically creating a virtual machine for windows passing a graphic card to it so to the naked eye it basically looks like you were using windows 10 installed natively but you're not it's a virtual machine so the way that we're going to achieve this is basically creating the ultimate vm by using linux alright now in this case i'm going to use something called ubuntu now the reason i'm mentioning ubuntu in this case even though i've mentioned things like manjaro in the past or fedora or debian is that ubuntu is number one very popular i think it's one of the most popular distributions just out there by number ship market share two there's a lot of support for it and three even the stuff that i show you on arch like the archwiki can be used to alleviate and troubleshoot a lot of ubuntu's problems for as well this is just something that's going to work okay it's a very popular distribution and there's no shame in using ubuntu whether you're first-time linux you know you're trying it out or you're a professional this is a fine operating system i know that some p i know that i might be throwing hands with the community and frankly i don't care okay if you want to use something else go for it but i'm going to assume from now on every time that i do these virtual machine guides it's just going to be ubuntu and i want you to treat it like that too i'm only doing this so i can save the headache for a lot of people and myself going forward making these videos now once you get something like ubuntu the general idea is to isolate and hijack your graphic card now step number one in creating these virtual machines for gaming is to have your graphic card hijacked alright so under linux what you want to do is make sure the graphic card can be used in a virtual machine so the general idea is you can approach this in two ways if you have multiple graphic cards you can actually hijack one meaning linux can never use it and then pass that through to a virtual machine every time it's fired up and this method is one that i've shown you time and time already so the general idea is you install linux and then you go into your boot parameters you make sure intel io mmu or amd i o mmu is enabled depending on your processor once that's enabled you then run a script to make sure you can check if the iomu grouping is only exclusive to that one card you want to make sure the graphic cards are in their own groups it's okay if there's more than one or two groups uh the reality is as long as they're all in their groups without nothing else intervening you're fine otherwise you have to go into things like acs patching which isn't the biggest headache in the world but you want to make sure that everything is isolated once you've seen that it's time to get the hardware ids once you have them jotted down you can pass them through as the compute as the system is booting up in your parameters and then it will hijack those graphic cards as the system is fired up then you can create your virtual machine pass them through and bam you're done now if you have only one graphic card in your system so for instance i only have one nvidia card because this thing is a gas guzzler this rtx series and at that point all you have to do really is approach it roughly the same way the idea is that you want to be able to detach the graphic card from linux and pass it over to your virtual machine as you fire it up and then when you turn off your virtual machine have that graphic card detached and reattached to linux on the hypervisor and i also have a video for that but the idea is you get a few scripts you make sure hooks are enabled for your virtual machine software which you're going to need regardless if you're doing this and once you have your hooks enabled you can then run a script make sure it's executable and then eventually have that pass through now you're going to have to store these hooks in a very specific manner something in your etsy liberty hooks qemu folder and then like release or prepare and be all that stuff i mean i i've mentioned it in that single gpu pass-through video which i will link and it'll explain all of it but you're going to have to have your hook set up put your actual uh gpu script in there modify it a little bit depending on your graphic card uh and your computer and then hopefully if everything works right you should be able to switch between operating systems virtualized or not and have your graphic card go back and forth but i have a couple videos that you can click on and watch to your heart's content to basically achieve this and this guide is going to assume that you have a working virtual machine with a graphic card pass through because if you don't you might want to start from there and then move on to here now utilizing windows 11 the installation is generally the same okay you go on to kvm vfio you go onto libvert and you basically create a virtual machine as you would you know you give it like eight gigs of ram or however much you want to spare uh four four cpu cores just for the installation process or again however much you want we'll cover this in a bit and then you wanna have your windows 11 leaked iso or real iso if you have it somewhere and uh at that point you're pretty good now if you have a portable ssd i ended up buying one off amazon i plugged it into the system and i passed the entire ssd very easy to do all you have to do is just point it to where the where the where the hardware point is on linux like def sdd in my case and you'll pass the drive over now at this point installing windows 11 is about as easy as you know walking your grandma across the street you hit next a bunch of times you make sure it installs to the only hard drive the virtual machine can point to and lo and behold you're done now at this point you can pass a graphic card over through and that's what i did and eventually i had windows 11 loaded up as you would natively expect it full graphic card updated a few games downloaded and here is where the magic begins now at this point if you remember back when we broke the valorant anti-cheat situation which is patched within a week unfortunately i added a few kernel yeah i added a few parameters to the entire vfio xml file now this is where things get a bit interesting okay to run games like cyberpunk underneath a virtual machine will involve a bit of a headache see if you just install it like this and pass a graphic card over games like cyberpunk have been running on the system at least mine under a virtual machine at like 40 frames per second 35 what the that couldn't be right why is the game running that laggy on pretty strong hardware well that's because we've entered a situation where certain games are really really cpu heavy and while windows 11 has some performance improvements even in this scenario it's time to kick it up a little bit now from what i've understood windows 11 is a bit more friendly to virtualization at least from what it appears to be in this leaked development version so to achieve this if you look back at the video i made regarding beating valerian's shitty anti-cheat which unfortunately was patched a week after that video was posted i i basically added a few lines to my virtual machine xml file alright a couple lines that would allow me to gain access to hyper-v while these lines aren't important i added them and generally experience better performance for the most part however what was really important here was optimizing the virtual machine to use the hardware more efficiently now if you haven't figured it out 35 frames per second on a low average is definitely not good for the system i have and there's no reason virtual machine or not that cyberpunk should be its collective bridges see the reason why that's happening is because cyberpunk is a very very cpu intensive game okay incredibly cpu intensive even with the performance enhancements and the five frames extra i'm getting on windows 11 uh there's no reason why it should be running this slow and this is where we're going to be updating our virtual machine so that we can take advantage of things like cpu pinning which is an incredibly important thing to have so cpu pinning in general is basically isolating a cpu and keeping it reserved for a virtual machine so imagine how we kept our graphic card isolated when it launched we can kind of do that with cpus by basically ensuring that like four cores out of an eight core system in this case could completely be reserved that means linux cannot touch this core set but only it is just passed through entirely to the operating system this means that those four cores that are passed to the operating system are uninterrupted by linux so if you don't do cpu pinning i want you to imagine a scenario like this since you're using linux as your primary operating system the moment you fire up a virtual machine linux doesn't shut down it's still doing what it needs to do now under normal conditions linux is very good with its scheduler but when you're playing high performance games like open world titles in this case or well anything that's graphically in cpu demanding you're going to run into issues where windows is a virtual machine is going to be fighting for those cpu resources with linux imagine when you're playing a game windows will tell linux all right in a very abstract way i need the cpu space to which linux will say uh i'm processing something and since i'm the host i'm going to do i'm going to be the one using the space instead so why we're cpu pinning in this case is so that we can give windows all of its space that it needs and give linux it's one or two cores to process what it needs so when linux is doing something its processes will not interrupt with windows and vice versa now there's plenty of ways to achieve this but in order to do this we have to understand how your processor works so underneath linux if you have a terminal you can basically fire up a map if you will of your actual cpu and just to go over this map real quick what's most important in this is looking at these eight squares these squares are all individual cores that are present on the cpu now imagine if you have something like a thread ripper you'll see way more than these eight squares but this is an i9 9900k it has eight real cores but then eight logical cores so for every core there's two threads on each core so if you can look over here for instance now in this first square you should see pu p number zero and p number eight that's because of hyper threading basically where a physical core has a logical core attached to it if you turned off hyper threading it would only show you eight threads or you know just one box would have just one of these pu boxes in it now this is a terminal shell which shows you that i have 15 cpus now it's really 16 0 is counted as a number as well but what's more important is this core count so as you can see cpu 0 is tied to core 0. but then if you scroll all the way down you can see that cpu 9 or sorry cpu 8 is tied to core zero as well and if you look at it one is uh you know tied to core one but the nine is tied to core one that's because one and nine in this case are utilizing and basically on the same core so one is the physical core and nine would be the hyper threaded logical core so when you're passing through and pinning you want to make sure if you're passing say core zero you want to pass through cpu zero and cpu eight respectively otherwise you're going to reach a situation where it's not exactly a core being passed through it's half a core and that's never okay now to do this we're going to be creating two scripts okay two scripts on top of if you remember way back when we made the single gpu pass through all right again if you haven't done that you're going to be needing hooks into the system that's a very important component that'll make this whole thing a lot easier so if you don't know that watch the single gpu pass-through tutorial until i get all the way to like making hooks right but generally the idea is we're going to make a hook that'll separate these two systems away from each other when they're booted up and when you turn off the windows virtual machine linux will then use all of the cpu so that you won't just immediately you know kill linux's entire lifeblood away when you're actually using it so the way that we're going to be doing is we're going to go to nano etsy libvert okay hooks qemud and as you can see it says win10 prepare begin which you'll need the prepare folder and the begin folder in succession just because without these the hooks will not run but here you can see i have two hooks i have start.sh for the gpu capture and i have isostart.sh which is for isolation so once we hit enter onto this this is exactly what i've written system ctl set property dash dash runtime dash dash user slice allowed cpus 0 and 8. so why did i give it 0 and 8 well that's because 0 and 8 pair together to make that one core that we just saw then i do system ctl set property run time system slice allow cpu 0 comma 8 and then system ctl property runtime in its scope allow 0-8 by entering all of this when we run our virtual machine now linux will only be able to use core 0 and core 8 okay or thread 0 and thread 8 in this case which leaves the rest of the 14 threads on this process so to demonstrate what actually changed this time this is bpy top which is actually giving you a full hardware you know showcase of what's going on on the full system including linux and windows the task manager is just what windows sees so as you can see it has one socket seven cores it doesn't know two cores exist now if you look at this system monitor you can see that core one and core nine are actually running at around like five percent but then core two three four five or at like 35 26 that's because while linux is doing its own thing windows is doing its own and they're not impeding right now i'm updating the actual operating system and it spiked core one to like thirteen twenty percent so linux got to do a full system update and windows did not care so you could have been playing a game and suffered no cpu impact because of this so now if you look at cyberpunk our frame rate jumped all the way from like a 40 average to like 70 because cyberpunk is not trying to fight windows is not trying to fight while trying to process this game just cpu pinning alone is able to give these massive increases and yeah it's not bare metal bare metal would be like two three frames on average faster than what we get over here but at this point it's pretty inconsequential when you look at the benefits of making sure windows can spy be on its own scope anyways so once you're done all of that what happens when you want to just you know quit this entire well you go to nano etsy libert hooks qemud win10 all right whatever your name of the virtual machine is release all right end and then you want to go to isol cpu revert.sh this is a script that was written in and this script will say hey systemctl set property runtime user slice allowed cpu0-15 alright and y0-15 because now linux can use every thread once a virtual machine is not running it's a simple use of systemctl's properties already part of it which exist all across ubuntu arch manjaro whatever modern versions of linux that you have so what did this all do for us well it allowed us to actually gain massive performance increases underneath a virtual machine now i have done these exact same modifications to windows 10 virtual machines and windows 11 virtual machines and i've generally experienced a better use case on windows 11. for instance games like cyberpunk as we just said reach 70 frames per second mind-boggling to know that big of a performance increase could actually happen then we ended up looking at red dead redemption 2 and red dead redemption 2 was almost hitting 110 frames per second for a little bit so again mind boggling that this was happening now the other massive thing that this fixed up was a lot of stuttering if you don't do this a lot of games will stutter pretty hard okay for some reason if you don't cpu pin not massive games alright your average games like halo master chief collection will run relatively well but games like cyberpunk red dead or even monster hunter world in my case were having issues with input and stuttering because of them running underneath a virtual machine optimizing it this way made it a lot easier for people to use some optimizations that i feel like should be mentioned is for instance if you have any gaming mouse i have a logitech g600 um you got to make sure that these polling rates are actually down to like 125. i find that 250 is a sweet spot and the reason i'm saying this is in certain games not every title you'll often find an issue where like moving the mouse will drop 50 frames in a virtual machine i've had this with call of duty warzone uh i found that turning the polling rate to absolutely minimal has absolutely resulted in no frame loss so for some reason this is an issue i feel like i should mention it because i have it and so if somebody gets this exact same issue they can try this without ripping their hair out now we can do a similar performance enhancement in terms of ram as well by creating something called huge pages and you'll find a great repository for this in the archwiki but the idea behind this is basically at boot time we're going to say reserve in my case 32 gigabytes of ram untouched by linux or anything and this is dependent on how much ram you have in your system if you have something like 16 gigs maybe it's not so practical to split your ram between two operating systems who wants to use an 8 gig system at this point um there are performance improvements in a lot of areas sometimes they may be tangible sometimes they may not be tangible enough so really it's something you're gonna have to test the water switch as you go forward there is ways to actually do this by splitting the ram up as you fire up a virtual machine and have the cake and eat it too but i haven't found a completely reliable method so i'm kind of going to skip over this but i felt like i had to mention huge pages because they do offer a benefit however how much that benefit goes as far is dependent on what your use case is so anyways let's move forward what even baffles my mind is using software like cinebench to rate my system i was actually getting better performance on this system all right virtualized way better than i was expecting normally when you virtualize a system you expect to lose like five percent of your system's overall power but with windows 11 the margins got so race or thin that at this point it doesn't matter if you're using a virtual machine or you're actually using a or a bare metal system anyways the speed is basically the same anyways my i9 9900k underneath all these optimizations and windows 11 optimizations was running so smoothly that i actually think windows 11 is going to be a banger at least for me a virtual machine user in the near future because whatever microsoft has done under the hood with windows 11 is still yet to be determined and yet to come out but what i've seen so far i like and with what i liked i ended up making a pretty solid epic virtual machine and because of that i'm gonna go sit back and play cyberpunk and red dead redemption 2 with the frame rates that i should have been expecting with this system and as the light bulb goes off this video is coming to its close and ladies and gentlemen i really should get that fixed but at the end of the day congratulations we have reached a new level of virtual machine gaming one that i expect to be one-upped in the near future when it comes down to dividing this rtx 3090 across maybe four virtual machines but that'll be a separate video for a different time for now we just made the ultimate windows 11 gaming virtual machine and for what it's worth it was an absolutely fun experiment and i'm glad i got to do it before the official announcement of windows 11. so yeah we made a windows 11 gaming virtual machine pretty much matched up to near native levels before the system was even announced god bless if you like what you saw please like comment and subscribe just like if you dislike it i am out
Info
Channel: SomeOrdinaryGamers
Views: 182,617
Rating: undefined out of 5
Keywords: greatest, windows 11, virtual, machine, virtual machine, linux, gaming, windows 10 vs windows 11, windows 11 leak, microsoft, cyberpunk 2077, gameplay, vm, kvm, unraid, ubuntu, ubuntu linux, linux kvm, vfio, some ordinary gamers
Id: WYrTajuYhCk
Channel Id: undefined
Length: 25min 5sec (1505 seconds)
Published: Wed Jun 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.