Website Guide: christitus.com/windows-inside-linux Setting up QEMU in Linux: christitus.com/vm-setup-in-linux/ Past QEMU Install Video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Kq849CpGd88.html
i would realy like to se how you set up vm for gaming. I have tried it from before never worked out, and also it was something to with cpu to connect to the vm
Good video, I am old school and i like mail, please stop beating on it, its a good app. Tried doing this with virtual box several years ago it was a real mess
@@nicholaswjamrock Yeah I understand many like the minimal design and how they made mail. I'll try to keep the hatred out for it. I generally hate most UWP design and Microsoft Store Apps in general, but mail is one of the best in that category.
Wow, you included some steps and recommendations that I never would have thought about, frankly. I am definitely going to build a Windows 10 VM using QEMU/KVM. This was really informative.
Really looking forward to a video on GPU pass-through. For Windows gaming specifically. Level 1 Techs had teased doing one and referenced using Looking Glass but nothing ever seemed to come of it.
Look at poor shamed computer by ordinary gamer. I based my vfio rig on it and work like a charm. But I don't understand why he doest use virtio qcoe drives instead of whole disk..
For truly great VM performance on KVM/QEMU, configure CPU pinning and set the host and guest to run on different cores. Also, GPU passthrough will allow for full baremetal graphics performance and hardware accelerated graphics performance. Obviously you'd need multiple GPUs to be able to passthrough a GPU physically, but it works great (allowing for gaming with baremetal performance on the VM). You CAN run with a single GPU, but then you have to close out the linux window manager when launching the VM (using hooks scripts), but it still gives you the benefit of a virtual windows VM and linux hypervisor running in the background. I've been running this way for months and prefer this over baremetal installations.
Can confirm. Subdivided a 13900k into four windows vm each with GPU pass through. Each runs faster than i7 8700 and has GPU acceleration Cpu pinning is the only way to really utilise cpus with non homogeneous cores for vm
FYI, one should set up CPU topology manually in the VM settings page since virt-manager (or QEMU) assigns one socker per vCPU core but Windows 10 Pro only supports 2 sockets. So if you don't set up topology manually, Win 10 only sees 2 CPU cores.
@Kyle Miller According to a Reddit answer, the frequency is controlled by host CPU policies. By default, the frequency should go up when running CPU-intensive tasks. You could use a system monitor like bpytop to check CPU load and frequency on the HOST.
Nice timing on this video! I've been a long time Windows user and have been dabbling with Linux in recent months. I'd like to switch over fully, but I'm also an avid gamer. I wanted to set up a Windows VM with GPU passthrough to accommodate that, but it can be tough finding the info you need. Looking forward to the next video on this.
@@kytv9000 It's viable for sure and I have used it. I like the Windows VM for the sake of ease of gaming/modding and for use of apps not available on Linux for which I have no alternative. I know I could dual boot, but I think the VM is cooler.
What you're explaining about your setup of fully accelerated Windows and Mac with a full Linux enviroment just sounds like a perfect PC solution for every type of task!
I haven't bothered with Windows at home in so long that I never thought about these settings. This is some really good info and could be a good option for those who are making the switch to Linux but can't completely let go of Windows yet.
Exactly my situation. Knowing the bottlenecks and workarounds in default VM installs is always useful, even if I'm just testing look-and-feel before Linux distro hopping.
You are awesome Chris! I was thinking about trying something like this on my rig as I built this thing for Gaming / graphics editing. I wanted to get on Linux full time and use Windows as a gaming VM. Can't wait till you put out the Video on Passthrough to the graphics card. This whole guide has helped me understand how the process should work.
Went out and bought an SSD drive today (way cheaper than they were 2 years ago I see) as Windows would not install on an empty partition. Well worth it as instead of the minutes my VM used to take to start up, mine is also starting now in 15 or 20 seconds. Thanks these tips really made it usable again.
Love this. Can't wait to see your video passthrough tips. I have a Hades Canyon running Linux and I've yet to successfully do video passthrough on it no matter what guides I follow. Your video may not help my particular situation, but more info is always good.
Thanks for doing this video Chris - it's a real help. I've wanted to replace Windows entirely with Linux, but there's a few programs I just can't do without and no real alternative on Linux at present. But I've struggled getting Virt-Manager working on Linux and only used Boxes because it was so much easier to use. I'll give Virt-Manager a go again and see how I go. Cheers
@@gorgnof Not particularly. I'm still dual booting. However I'm a little more wiser about virtual machines. What I've learned: - Each VM has their own idiosyncrasies. - Some Linux distros seem to work better on certain VM's - You still need to basically copy your working files to the virtual drive and then back again or you risk corruption. - Nowadays with an SSD, it really doesn't take that long to just dual boot back into Windows for those couple of tasks - Windows still sucks huge donkey nuts
This could be much better! Use a LVM pool, add a VirtIO SCSI controller and attach the storage to that. That way you don't need dedicated hardware but you get pretty much bare metal hardware. Also, EFI secboot is a piece of cake using libvirt! :)
One video showing how optimize for games would be great!! Since i switched to Linux about 3 years ago i rarely play Killer Instinct (game i like a lot but i don't play anymore because i need to dual boot everytime i want to play) and this games is a Microsoft Store one. hehe. Thanks for all the content you make by the way!
Coming Soon, I just bought a 5700XT used mining card to passthrough to vm's (mainly doing it for MacOS as I want to use Final Cut Pro inside a VM), but should be able to show the Windows side of this as well.
@@ChrisTitusTech Do you only have 1 brand of card, or do you have both nvidia and AMD? I have a 1660 super, but when i replace the card with a 5500XT, and start my display manager, I only get a flashing cursor, i tried removing nvidia drivers and replacing them with AMD drivers, that didn't work, i tried the hybrid drivers, and those didn't work either. I would ultimately like both cards in my system, but I can't get the AMD card to display anything besides a tty. I also have the same problem with my integrated graphics, only my nvidia card works, no display from anything else.
@@ArawnFR With my nvidia card i get output fine, with drivers, but i only get a tty with my igpu, or the AMD card, with or without prop drivers, or noveau drivers.
I feel like this could've been done better, there's a difference between optimizing a completely virtualized system vs passing through large portions of your host hardware and you could've made that much more clear. For most people not trying to game on their VMs you don't need 8 cores and 10GB of RAM to make a functioning and decently performant Windows VM, you can get away with much less than that with a SPICE display, the Virtio Drivers and the Guest Agent.
You could/should have made the storage in the 1st example virtio based, which performs way better than the generic SATA controller. You just have to load the driver during the install. If you're going to pass physical disks though, I think its considered better practice to use '/dev/disk/by-id' because /dev/sd* can sometimes shift around.
That's exactly what I did. This should be higher. Also you don't need to dedicate the entire hard drive you can do this with a single partition as well. One problem I have is windows detects my ssd as hdd and I haven't been able to fix this. 'winsat formal' should trigger a change but it does not fix. (this happened with installing to .qcow on ssd as well) I disabled defrag in the mean time.
When you did the comparison I think you should have left RAM & CPU exactly the same during both tests so that you were comparing the differences only between qcow2 & raw disk. In addition, the qcow2 file test should have been done on the exact same hard drive as the raw test.
Chris, you most probably don't read this but... You have a GREAT CHANNEL; I really enjoy what you are doing. Just one thing. In the corporate world, we still have 5%-10% of OS running on bare metal. There are many use cases where that is still required. Or where the technology don't work with VMs.
Love it!!!! I'm a VirtualBox user and my problem is I run VirtualBox on old laptops with not a lot of "horsepower". lol Anyway, it's good to know about these tips. Thanks for posting!!!!
Yes please make this whole category as a whole series of optimizing VMs and choosing + configuring storage machine type bios type all that for each type of VM
I was watching Son of a Tech for crypto and your video was recommended afterwards. I did not know I needed you in my life. I have been binge watching your videos--so informative. I love you.
Oh my god thank you, I've been scouring the internet for literal years looking for the right way to set up VMs, always leading to dead ends and me going "well I don't really need windows that badly anyways" while hyperventilating copium xD Big, BIG thank you 👍
Yaaa 🎉!!! I just updated my Omen 17 laptop and can set up a virtual windows to run Scrivener!!! I had Windows 10 when I first opened it, so now I will have to run Powershell to get my product key from the Bios. I am sure it’s hiding there.
Hi Chris or anyone that is interested, you can skip the black "hi" screen by pressing ctrl + shift + delete or with ctrl + alt + delete; and opening task manager.
My VM setup actually have me start VMs from my login screen and pass through my amd gpu to my VM, when i shut down the VM i am back at the linux login screen, there is also a windows 10 VM running in the background at all times meaning my MacOS VM and windows11 VM and steamOS VM can access it through moonlight if i need to play a windows only game that is on that VM. i would love to show you that setup someday 🤣its kinda crazy PS: newest macOS also has support for RX 6600XT and i think any cards above that
Using RDP and remoting into the VM is also a lot faster because Windows has optimizations for running over network connections and offloads some of the rendering to the client, which benefits from the host's GPU capabilities. So things like moving windows around and opening menus is much snappier. QXL is great but on anything past Windows XP, it's a display-only driver so all the rendering is done in software and taxing on the CPU. RDP bypasses a good chunk of that, but there's just no way to get good video acceleration on Windows without some form of GPU passthrough (be it full passthrough, or GVT-g or SR-IOV). QXL with 3D acceleration for Linux VMs on the other hand is awesome, basically as smooth as running natively. Can even run games! (Although OpenGL only for now, Vulkan is still WIP).
Thanks Chris. I’ve been toying with the idea of getting an amd 9 7950x and a nasty new gpu and running windoze as a guest for gaming. Now that I know it’s possible I wanna go all in on the one Linux box to rule them all!
This is a great guide, thank you! How do you recommend sharing a directory between the host and guest? None of the options I've found have been great (samba, experimental virtio-win drivers, NFS, just use VirtualBox)...
Samba is pretty straightforward. I bridged my Ethernet connection with nmtui and now my vm is using my LAN. I just enter my samba share without problems, and with my other windows machines in my house too. it's very good because I have my things on my main linux server to distribute to the rest of windows and linux pcs
recently for fun i set up W7pro as a VM on my Windows 10 box, (5800 Ryzen) i chose an NVME as storage. it was setup real fast AND running nearly bare metal speed.
I enjoyed your video, though exactly how relevant it is for a machine that's already 14 years old is anyone's guess. Your point about hosting an OS directly on the hard drive is definitely a good one, it's what I did to access my current Windows Vista and XP partitions from within the WinXP vm (yes, I did get it activated). In addition, virtio drivers for WinXP are a little harder to get, as the current virtio drivers only support as far back as windows 8. Additionally, I don't have 30GB of space to spare for the WDKs that building from source seems to require. Again, thanks for the video, you have plenty of good tips when using modern machines for virtual hosts.
Thanks for the video. Really simple. I am quite interested about the dual graphic card setup. Not only the installation, but the hardware selection too.
Butter R fast! 🤣. BTW this is great, well layed out and explained! Went to sub and was already subbed must of seen something a while ago I liked and didn't come accross you again till I searched out windows inside linux, today. Anyway appreciate the effort you put into this! Very helpful.
Chris, Irecently found your channel. As a PC Technician troubleshooting Windows professionally for 11 years and heavily steep in hardware configurations, I say, it's a rarity to find a youtuber that knows, in detail, what he or she is talking about. Anyway, my interest here is possibly leveraging your intimate knowledge to determine the minimal Linux support needed to run qemu, with and without virt-manager. If the challenge sounds fun to you, would you do a video on that setup" perhaps on Arch?
So I play all my games through a vm with my gpu passed through and I'm here to tell you there are many things wrong with this video: 1) First off the screen cap of win11 vm was plenty slow 2) The initial prompt where you put in cpus and ram does not actually allocate cpus properly. You need to do that manually. So just put the ram amount in and continue. 3) Ensure you select configure before boot ALWAYS 4) You need to goto CPUs section of the vm config and manually set the cpu topology according to your cpu. 5) You don't need a dedicated drive to get good performance but it is the best option. I run my vm off a raw image which is in my ssd. Plenty fast for gaming. 6) Qcow2 itself isn't too bad either. If all you need is a convenience vm then ensuring your vm image is on an ssd and your cpu properly allocated is more than enough. These tips are only for getting a vm for standard workloads up and running. Gaming would require a bit more work.
Great video Chris, very informative. Soon enough I dont have to use my work computer at all, the only thing holding me back in Linux is the vpn we are using at my company, not working natively on linux yet. This might fix that, thanks
I have not been able to pass through any real data drives for my VMs to access the data. Using the standard Install of a VM does not auto pass through any devices but seeing a real data drive is actually more important to me than seeing a real GPU... Maybe I just need to see it done myself. A simple easy to follow video like the one above . ... Its great that you are thinking of doing a GPU Pass through but I like to see it done for other real hardware like data drives. Printers these days are pretty network friendly so a bit easier since VMs do get internet access but there are always exceptions where someone isn't using a network to communicate to the printer... Is local not network access to a printer possible as well? Cameras? virtualization has been the bane of my existence. I just don't think or do things the way the VM managers do things ... that said.... Ok. Yes graphic card pass through is nice but virtual gpu work pretty good... but when I want a full operating system I want the system to see my other REAL hard drives.... You look online and there are tons of videos on setting up Virtual Hard drives...(I figured that out pretty easy). I want my Virtualized OS to see my REAL hard drives that I have data on that I want to use... I don't want Samba or Network drive..... Just physical local access to my data drives that are not USB..... Is it possible to pass through real hard data drives through to the VM. I don't want to do a bunch of copy to usb and then access the usb with the content.... I figured I can pass through a graphics card why not the sata drives.... I'm probably missing something but some videos and help online have tried but the explanation isn't clear and some info is just too focus on people with very tech savvy knowledge . I did get some info that talked about real drives as drive 0, drive 1, drive 2, some how I'm suppose to interpret which drive to use which doesn't match how Linux or Windows name /see their drives. Just need a simple video that explains the process even if you can't pass through a real data drive explain why we can't and possible alternative way for the VM to access that data on a real drive...
Yes please do the GPU passthrough. I live in Linux and use Virtualised Windows. However the problem is running Ableton Live 11, it lags a bit. I found that VMware didn't suffer the same as KVM.
my little tip will be if your virtual machine manager is slow try make it full screen and make the resolution in the vm match the host screen resolution
Looking at this and 15 min being a long install time reminds me of my first computer that my dad got for me from some garage sale for $50 in 2006. That thing had Win XP installed on it but it was from like 1996 so XP ran about as fast as a slug. I took me like 4 hours to install XP on it. Had absolutely no idea what I was doing
Lol your first changes to the W10 machine are exactly the same things I always do to a freshly installed W10 machine. Also the debloat is the next step I always do ;)
Awesome video, now I know why it was slow damn slow, last time I did this. Be interesting to see GPU pass through and gaming. Have you looked into Looking Glass project?
OK Chris, trying to work through this. I think I got the QEMU part done (the copy the commands links are very helpful). The directions on your "Setting Up Windows Inside Linux" kind of broke down at the "Optimizing Windows VM" part. Directions are kind of sketchy there. What am I supposed to do? The GitHub page is quite confusing.
I have a problem with software that requires opengl 3.3 to run. Do you know a way to make this work? Been searching for a solution the whole day, but can't find one
The only problem i usually have on my network with non school vms is that my windows xp instances are slow to switch from one or the other from the machine theyre running on. Theyre running on virtualbox on windows 10. These were the only vms that were hard to get running on my antsle. The physical machine now has 380gb of hard drive in 2 drives, and 2gb ram. Thats pretty good performance for those specs.
qcow2 works fine with virtio drivers installed and virtio chosen as the bus type for storage. It's not really a fair comparison when you run a qcow2 with SATA on a mechanical drive and compare it to directly passing through an SSD. Also there's a bug in virt-manager that improperly assigns CPU cores. It's always a good idea to manually assign cores/threads. To really optimize, you could also allocate hugepages and pin the CPU. You might want to look in to looking-glass if you're building up a system with GPU passthrough. It's possible to use evdev or a KVM to switch IO/displays between machines, but looking glass removes that hassle.
Thanks for the video as it helped a lot. I ran into an issue with the guest agent saying disconnected even though the settings were the same as in the video
Did this help - Yes and no. I only have one SSD on this laptop so I can't use a differetn disk. But this shows me that how i've setup my windows VM's in the past is the best I can achieve on a single disk system. I think the missing piece for many people is the Virt IO and QUEMU guest agent tools installed. I'd like to see you expand upon windows options that can/should be disabled to be good guest OS, one I always do is turn off file indexing.
with that said before when I used UNRAID - I 100% installed windows on it's own SSD with graphics passthough and it was amazingly fast, like bare metal speeds.
Passing through a disk using drive letter is dangerous. i.e. /dev/sdc. You should pass-through using id or uuid. i.e /dev/disk/by-uuid or /dev/disk/by-id .Sometime in the future /dev/sdc may be mounted to a different disk and you will format it or corrupt the files. Disregard this warning until it happens to you.
Depends on what you are measuring. All VMs come with some characteristics inferior to running natively. A lot depends on the context the VM is within such as what other VMs etc the resources of the server are shared with. Many graphics heavy things such as games are not going to run as well in a VM. If the VM is in the cloud good luck running a desktop GUI on that at all.
you could significantly reduce setup times for windows using unattended script AND do an image that already includes all your virtio drivers and other things.... probably cut that install time down even more.
I enjoyed the video. Help me to understand: is Linux better hardware-wise than a PC? I know that depends. But, I've been a PC guy for over 30 years. I'd like to branch into Linux, but not sure where/how to begin. So with this video, your goal is to make Linux your base, then have VMs for PC and Macs?
Basically, yes to all. If you want to branch into Linux, though, I'd advise you to try different distros and desktop environments first in a VM. There's a whole world of them, and they all are great for something, you only have to find the one that fits your needs. For destop environments, check KDE if you're used to windows, but if you're on a laptop, Gnome is the way to go. For distros, I like Fedora very much. I use Nobara right now, which is Fedora optimized for gaming out of the box. Manjaro is a good one for trying Arch, and finally, Zorin OS is a good distro "for grandma". If my mom can use it, anyone can. Those are the ones I can vouch for. Have fun.
Looking forward to see a dedicated gpu for this VM that you have presented with pci passthrough. Is hard to set up and I am very curious about the settings you will use. From what I know the biggest drawback is that you gonna need a dedicated physical monitor for this solution. Looking glass big sucks from what I read...I currently have a centos7 server at home running two kvm vms with ubuntu and is fine but the next step is to have linux on my desktop pc with kvm pci pass through for running a windows VM very near to bare metal experience. I will definitely watch the next video of yours related to this! Thank you, great presentation!
If you have two inputs on your monitor you don't really need two, just switch back and forth from inputs or if you already use dual monitor just set one up to switch. Works like a charm :)
Additionally, despite popular belief, virtualbox is faster than qemu/kvm, at least for windows. Some technical details available about why, e.g on stackoverflow etc(in short, qemu optimized, and faster, on servers, but contrary when graphics concerned, because various optimizations and different implementations virtualbox employs). Personally I noticed around 30% faster startup of a certain slow starting gtk3 app, when running in constrained 2 core, 2gb win10 guests, kvm obviously enabled for qemu too.
Keep old Win10 isos. I found that M$ keeps removing old disk drivers from the W10 iso posted on the website. A newer iso couldn't install W10 due to "no disk driver" for my old laptop. Thanls God I found a flash drive with an older W10 iso in my drawer!