Ifyou want to use GPU on host too you should make sure only apps you want will use gpu and those apps will get killed before starting vm.
So make UDEV rule to make GPU be owned by some custom group and start apps with this group permissions for example with sudo -g .
AMD gpu seems to unbind from host while some apps are using it (and kill those apps) but done that way reattaching not always works.
I figured one would have 3 basic options when setting up a gaming vm.
Use two gpus, passthrough your input devices and output to a different monitor(-input).
Use Looking Glass (but the fact, that audio comes from a different spice-device freaks me out)
Use one gpu, passhtrough your input devices (my favorit option)
By that I mean, that I would prefer something more lightweight than VM, because Windows is big, but if full VM is best option, then having multiple applications in VM is easy. And I remeber seeing some magic with VMs, that allow them run apps directly as single window, but at the time, it was limited to single application from a VM. I really wanted to get an sanity check before trying to implement it.
IGpu should be enough for video, IDEs, text editor, and internet browser (I hope) so it can be default. I think I need real GPU only for games, and one other application, that needs windows anyway.
I did not know anything about UDEV, but by quickly looking I think I should be able to figure that out.
Because I think I will use it only for games, I do not think unbind while application is running should be an problem.
Resizable bar is needed for more and more games, and is enabled by default now.
Why would I need to change the bar size before starting VM? My understanding is that with passtrough Windows will get full view of the GPU.
Connection both GPUs to the monitor seems fine, and audio also passes trough GPU to the monitor. Can you please elaborate on those 3 options? Why is 3 your favorite? Do I understand it correctly that in case 3 you are not able to access any application on the host, while the VM is running? (because the GPU is exclusively given to the VM)
Windows can be a bit iffy at times. It could lead to troubles where there should be none, if you run different vms from the same windows install. Why even bother with setting up multiple vms, if you boot off the same storage device? I cant see any benefit to such setup.
Running option 3 is less involved. I dont have to switch input devices or output devices. I dont have to deal with audio latency. Usually i run the vm when i want to game. I dont need access to the host while gaming. Also my main GPU is available while in Linux. Usually in a dual gpu setup the gpu for the vm cannot be used under Linux.
Oh my mistake did not state it clearly, I did not mean it as an install drive, but games and data drive, they would have separate "C:" (windows) drive, but the game storage would be the fast NVMe attached directly to VM.
My current understanding is quite the opposite, that with single GPU you need to run VM, install things like browser to a VM, because there is no way to get back to host to check something on the internet, and after closing the VM do some semi automatable magic to attach th GPU back to the host, without seeing anything on the screen. While dual GPU setup allows to (de)atttach the main GPU freely while seeing what you do all the time. Can you please explain why this is not the case?
If you want access to the host while running a dualgpu setup you would have to have additional input/output devices which you dont passthrough to the vm, a kvm-switch, use looking glass or come up with a more involved setup.
My idea was that some games work trough proton, so would not require VM to run, and for that the GPU would need to be used in the host OS, or do you think it would be better to run all windows applications in windows natively?
Me and my friend like to play a game called "Red dead redemption 2" but sadly his PC is pretty weak and that's why he doesn't want to play anymore. Yesterday we came up with a solution. My PC is pretty high-end and I thought, that I can maybe "split" my PC into 2 by using a VM software and a remote desktop sharing software like Teamviewer or Chrome remote dekstop. On the way I ran into a lot of problems.
First I used Virtualbox but there were VRAM limitation there which were capped at 256 MB VRAM which is not enough for Red dead redemption 2. Later I looked into using Vmware but sadly found no particular information on VRAM. By the way I also found out that there is a really good Remote Desktop Software named Parsec which is really good supposedly but after I installed it on Virtual Box it said that it needed a more powerful graphics card, because Virtualbox only register an integrated graphics card into the VM.
After some research I found Windows Hyper-V and this YouTube tutorial: =aZtuiLYnb_g where the guy in the video posts a link to 2 scripts that automatically when executed in PowerShell give your VM a good graphics card. I automatically though that it Hyper-V has no VRAM but I'm not sure so that's my first question.
Later I had problems settings up Hyper-V because the network connection didn't work and either my host PC didn't have connection to the internet or my VM. I also tried all sorts of combination with private, internal, external network on Hyper-V. And that is my second question. In the end I gave up and came here.
To summarize all I just want a balanced performance and quality gaming experience for my friend on a VM. The idea is that I download the game twice basically and he logs on to his account and plays from there via remote desktop share.
This very much seems like its possible in theory, thats one of the reasons VMs have been designed, to share computing resources rather than dedicating an entire machine in a server farm if it isn't necessary.
Video transmission in stream form is additive with key frames, different story but thats how people watch movies online and that uses video files that have been preprocessed. Streaming does something similar.
There are ways to render opengl on a remote machine and display them locally, opengl was originally built to contain this ability, but for your specific rather niche requirement, I don't think that will help.
In short because the use-case is limited and would not likely be something this generation of tech user would need (in the old days someone probably thought up this exact scenario and then abandoned it), likely there is no end to end product available for it.
You could just assume your machine is buff enough to handle all of this, but RDP is mostly used for tech concerns and/or developers accessing their work machines from home for example, its not meant for low latency graphics tranmission at a high frame rate.
Then use Remote Desktop Services (RDS)(formerly Terminal Services) over local network. They provide remote connections to Windows installations over which you can run applications on a remote machine! Which would be your powerful computer and are ofter powerful servers in organizations. But normally inside the same building and for Office applications. This is why multiple sessions are enabled by default in server versions of Windows.
If you've succeeded locally and not already had enough fun, you could still try to connect via internet. But be aware this bears security risks and probably won't perform well as explained in the previous answer.
I recently built a new server with Unraid. The main purpose of this new server is to use as a storage device for all of my media. I currently have over 100 GB of videos for my YouTube channel taking up space on my main computer and that is without keeping the source videos.
I really didn't want another computer sitting in my office as I already have a mini gaming PC that I put together but has been sitting gathering dust under my desk for the last 18 months since I got my Steam Deck.
It was from reading through the Unraid forums that I realised that I could set up a Windows virtual machine, pass-through the graphics card and I would have an on demand gaming machine that I could access remotely.
As a busy family man my evenings are spent with my wife on the couch and quite frankly after 8 hours of sitting at my desk I don't fancy doing the same for a gaming session. The Steam Deck has been a godsend for this. I can turn on my Steam Deck and play a few games sitting on the couch while she watches TV or plays her own games on the Switch.
However, even though the Steam Deck is great for many games, there are quite a few that it struggles with. The Steam Deck even though can play AAA titles, isn't really designed for it. Even if the game plays, the fans will be going like crazy, it gets hot and the battery will be empty in under 2 hours.
For these games, I now have a Windows VM with near bare metal performance that I can install it on. I then have Sunshine installed on the VM, and Moonlight installed on my Steam Deck, so I can stream them remotely. The performance is fantastic with no noticeable input lag and because the Steam Deck isn't doing any heavy lifting, the battery lasts 5 - 6 hours.
As an added bonus I can now play some Windows only games that aren't supported on the Steam Deck like WRC 10 and Riders Republic. I also bought Forza Horizon 4 Ultimate when it was on offer from the Microsoft Store that I haven't played since getting my Steam Deck. There are also some games that just can't be played without a keyboard and mouse which I can now steam to my laptop.
I originally had the 500 GB SSD in a cache pool with another 250 GB SSD. However, given I wanted to dedicate 500 GB to the VM for games, it made more sense to just pass through the SSD directly to the VM.
For the 500 GB NVMe drive, I have a 300 GB vdisk assigned as additional game storage. The vdisk on the NVMe is significantly faster than the SSD, so I use this for any games that are slow loading (I am looking at you WRC 10).
In addition to the above storage I also have one of the shares on my array mapped as a network drive in the VM. This is where I transfer games that I rarely play or have no noticeable performance issues loading via a samba share.
3a8082e126