Open DanialPahlavan opened 1 day ago
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@DanialPahlavan for what you're proposing IOMMU
is required. Run (get-vmhost).iovsupport
and if it returns false
you're out of luck! If true
then you have what's needed already for a setup you described above.
@DanialPahlavan for what you're proposing
IOMMU
is required. Run(get-vmhost).iovsupport
and if it returnsfalse
you're out of luck! Iftrue
then you have what's needed already for a setup you described above.
@elsaco Thank you for the response. I've had experience enabling IOMMU in Linux, and I’ve already made sure that all relevant BIOS settings are enabled on my system. The key issue here is that while these capabilities exist for Hyper-V in Windows, the same level of support doesn't apply when using Linux as the guest OS. There are some tricks to enable this in Windows, but unfortunately, they don't extend to Linux environments.
I've successfully used IOMMU to run both Windows and Linux, passing through the GPU to each. However, I cannot achieve the same results on Windows with Hyper-V that I can with KVM. My core idea is for Hyper-V to support GPU passthrough and near-metal virtualization for both Linux and Windows VMs seamlessly. This would allow full hardware utilization and enable Linux to run with near-metal virtualization, similar to KVM.
Many users face difficulties due to graphical issues, and when graphical software is installed via WSL, it disrupts Windows' organization, cluttering the Start menu. Having a Hyper-V structure that provides near-metal virtualization for both Linux and Windows would dramatically improve workflows for developers. Heavy applications could be run more efficiently, and machine learning engineers could benefit from GPU passthrough, allowing them to execute models without facing Windows-related limitations. The result would be higher performance, especially with graphical workloads. Ideally, the system could even allow GPU resources to be reassigned back to Windows without needing to restart, enhancing flexibility and productivity.📈🚀
Is your feature request related to a problem? Please describe. As a researcher, I rely heavily on Windows due to its rich ecosystem of software that's invaluable for my work. However, I find Linux much more comfortable for development. I've tried running Linux on a Windows emulator, but the experience wasn't satisfying. This led me to dual-boot both Windows 11 and Ubuntu. Unfortunately, I encounter issues when trying to run graphical software on Linux via WSL, even with WSLg; it lacks the polish and stability of a full Linux boot.
Describe the solution you'd like I suggest enhancing Hyper-V to allow Linux VMs to fully leverage dedicated graphics hardware, similar to KVM. This would enable a near-metal virtualization experience, allowing full utilization of hardware resources while maintaining a Linux desktop environment within Windows. This setup would keep everything organized under Hyper-V. Moreover, installing graphical applications via WSL clutters the Windows Start menu, disrupting its organization. An optimized Hyper-V setup would offer a unified, efficient development environment without needing to dual boot.
Describe alternatives you've considered I've considered and currently use dual booting as an alternative, but this requires frequent system restarts, which is disruptive to my workflow. Another alternative is using WSLg, but as mentioned, it lacks the stability and organization needed for a professional development environment.
Additional context Enhancing Hyper-V to support GPU passthrough and near-metal virtualization for Linux would revolutionize the way we utilize Linux on Windows. It would eliminate the need for dual booting and make tools like VS Code seamlessly integrate with the full Linux desktop environment. Windows would shift to performance mode when running such VMs, minimizing resource overhead and acting as an efficient host. This would enable simultaneous use of tools like Photoshop on Windows while running a full Linux development environment.