Interested in Setting up VM on Linux

Hello,
I am new here but not totally new to Linux. I have been dual booting Linux with Windows off and on since 1999 and have built my own gaming/workstation PCs since 2002. I am not a developer so for much of this time I have been just an average user but I have picked up a few things. For the past year I have been using Linux, (currently Linux Mint) as my primary OS and run Window 10 Pro mainly when I want to play games from my Steam library that I have not gotten running on Linux or to run Solid Works. I am interested in learning how to set up a VM running Windows with hardware pass through on a new Intel NUC but I am not really sure where to start.

I purchased an Intel NUC about a week ago and have Windows 10 Pro installed on a Samsung 1TB 860 Evo m.2 SSD and if possible I would like to set this up with Linux running a Windows VM. Here is the model number and hardware specs for the NUC I purchased.

Intel NUC model# NUC8i7HVK
Intel® Core i7-8809G Supports Intel SSE4.1, Intel® SSE4.2, Intel AVX2 and Intel Virtualization Technology for Directed I/O (VT-d)
Intel HD Graphics 630 Radeon + RX Vega M GH graphics
G.SKILL Ripjaws Series 32GB DDR4 2400 ram
2 1TB Samsung 860 EVO M.2 SSDs

I saw a video about setting up a VM on Skylake on the Level 1 YouTube channel, would that work for this NUC? I also was wondering if there are any text based guides for doing this because as good as videos are I find it easier to learn new things by reading.

If doing this will work on a NUC I plan on installing installing Linux on the second 1TB 860 SSD and intend on using the Intel HD graphics on Linux with the Vega graphics being passed through to Windows. If I am able to configure this PC with a Windows VM would I need to reinstall Windows or can the VM be pointed to the drive where it is located?

Any assistance with directing me to the correct information as well as any other advice that you could offer will be greatly appreciated.

Regards,
ZophiasDad

Since you are looking for a guide, it would be helpful if you posted the distro and version you are intending to use as a host. PCI passthrough is somewhat distro specific for the initial setup.


It is possible to use the current windows install in the VM. Just use the entire disk. There are examples available in various places.

I would not recommend using the real install in a VM right away. Make a 40-80gb virtual disk get set up and to make a known good config. This will avoid any licensing issues with windows and SolidWorks due to multiple hardware changes in the process of getting the VM working.


Linux Mint is close enough to Ubuntu to be able to use Ubuntu guides. Make sure to use guides created or updated within the past year, and preferably within the past 6 months.

For reading, I’ll make another post right after this with some links.


As for doing it on the NUC specifically, it uses basically laptop hardware(for parts that matter for passthrough, ie mobo, cpu, graphics)

This can create some extra hoops to jump through or make it impossible to use passthrough depending on some hardware details.

But, you can’t know unless you try it, feel free to post here if you get stuck.

This is the page on the forum with links-
https://forum.level1techs.com/t/the-vfio-and-passthrough-one-stop-shop/129897

Two things on the link above-

  1. Absolutely take a look the Arch wiki page
  2. Take a look at the disk passthrough explanation

A guide for Ubuntu 18.04, should work great for Mint.
https://github.com/saveriomiroddi/vga-passthrough

A guide for 17.04, still applicable but no need for installing a bleeding edge kernel in most cases when using a newer OS.
https://forum.level1techs.com/t/ubuntu-17-04-vfio-pcie-passthrough-kernel-update-4-14-rc1/119639

A guide that works for selected laptops on how to setup pci passthrough
https://gist.github.com/Misairu-G/616f7b2756c488148b7309addc940b28


Hopefully, that is enough reading for a while.

Sorry I forgot to mention that I am currently using Linux Mint but I am seriously considering changing to Arch. Actually I am willing to use which ever distro would be the best one to accomplish this task. The only thing I prefer is any distro that officially supports the KDE desktop which is the main reason I am looking to drop using Mint because as of their vs 19 have stopped supporting KDE. I am also seriously considering building a Gentoo system but am not sure if I want to deal with everything being installed as source and having the compile times that this requires. Also if I am unable to get this working on the NUC I will be building a new desktop in the next couple of months. I just have not decided on if I am going to build a Rizen 7 or a Threadripper system and I know that I will be able to do this on the new PC. I also have a mini iTX Skylake system that I can also use now, it has an MSI MB, 32GBs of GeSkill ram, i76700K and 3 one TB SSDs along with a GeForce 1080 and I also have a new 1080Ti still in its box that I can use. I suppose I want to attempt this on my new NUC just because it is my newest toy and an interesting form factor.

I would recommend Arch/Arch based distros for PCI pass-through for two good reasons.

  1. The Arch Wiki page for setting it up is excellent.
  2. There is an ACS patched kernel in the AUR.

The second point only really applies if you don’t have good IOMMU isolation by default. But if you need to ACS patch, this is a big plus.

There are also compiled kernels with the acs patch available for Ubuntu. Possibly Fedora too, though don’t quote me on that.

If going with Arch, I would recommend either stock Arch or Antergos if you want an installer.

Thanks for taking the time to reply to my post and for your suggestions as well as the links. I will read up further before I begin. I will come back and give an update with respect to my success or failure to get this up and running.
Regards,
ZophiasDad