How to do gpu passthrough with existing Windows install?

Hi. Since I've finally acquired a second gpu, I want to do a gpu passthrough to a Windows VM, but all the guides I've read have you installing on a clean system. I already have a Windows/Linux dual boot setup, and really don't want to have to backup/reinstall everything. How would I go about virtualizing my Windows partition?

physical to virtual migration is not something you should really do. a clean install really is the best option

KVM will let you use an existing disk or partition to boot from. That being said, Windows is very fragile and last I tested the OS (W10) under KVM, making small changes to guest configs could easily cause it to never boot again. I found that it was particularly sensitive to changes in hyper-v flags.

If you really want to try it, I recommend making a backup if you care about the data. Otherwise, don't bother. Just do a fresh install.

this guide should help.
http://www.serverwatch.com/server-tutorials/using-a-physical-hard-drive-with-a-virtualbox-vm.html

you could also use back-up software like acronis to make a disk image which would be a little easier to work with not to mention safer.

Guess there's no way I'll be getting out of anything except a complete reinstall sigh. Better head over to Best Buy to snag a external drive to back my stuff up on.

I would ask what is your Linux version you are using? theoretically the current setup should have no bearing on your ability to create a KVM with hardware pass through on your Linux partition as long as you have the necessary space and hardware, but there are lots of other considerations to ponder before just wiping your drive, give us a idea of your hardware list and the GPU you will be passing through and we might be able to save you some heartache.

I have an MSI 970A-G46 with a FX-6300, an R9-260x, and a GTX 960. I'd like to passthrough the 960, so I know that eliminates everything except KVM. I'm running Ubuntu 15.10, but wiping that partition wouldn't be an issue. I should probably get a secondary drive to run Linux anyways.

You would be so much better off passing through the 260x but that is just my opinion, I would highly suggest a separate HD for your Linux install but I would also recommend you use a different Linux distro like OpenSuse or Fedora, Ubuntu IMHO isn't the best or easiest distro to accomplish a hardware pass through on, but I know others have done it.

The MB and CPU should be fine, the 6300 will let you pass 4 cores to Windows while leaving 2 for the host, you'll want a minimum of 16g of RAM depending on which Windows OS you'll be trying to satisfy along with a second NIC, then you'll have a very good chance that sharing the sound card will cause latency in the guest system, you might be able to live with that depending on what your doing.( I did for about 6 months before adding a USB sound card for the guest)

The reason I mention passing the 260 instead of the 970 is that Nvidia will cause you a little extra effort to get it to work in a virtualized environment and it is a slight performance hit to do so, not really a big deal, and depending on what your trying to accomplish the 260x might be just fine...if your planning on gaming then you'll want to really think about doing this because a dual boot like you have might be your best solution.

Of course this is just my opinion.

Whoops, typo. I meant 960. Yeah, but no point in using the much more powerful 960 for my Linux desktop, and then gaming on a 260x. I much prefer Linux for software development, and I really can't get VMWare or Virtualbox to perform fast enough to make that a viable option. Maybe an SSD would help?

The 960 is doable, it just requires extra effort and will send you further down the road to a different distro, while the "roots" of what you want to accomplish with hardware pass through is the same in all Linux distros the roads you take and the number of pot-holes and land-mines change from distro to distro along with each kernel version, obviously the later the kernel version the more built-in support for KVMs but every publisher does their own tweaking to the basic kernel, it's that tweaking that either makes it easier or harder to build a KVM with hardware pass through.

The thing about software virtualization like Virtual box is that it is a 100% virtual environment so there is a lot of over head that has to be handled and running Windows in that type of environment requires a lot of horsepower to get acceptable performance and it still has it's limitations such as programs that require direct hardware access like games, and most design software, Windows for most of its existence has been perfectly fine with giving up control to just about any program that acts like it wants control of a piece of hardware, to work Windows needs hardware pass through if your going to run it in a virtual environment and do design work or play games.

To give you a example I have a friend who just switched to Linux (Mint) and is running Win 7 in virtualbox and is using Adobe photoshop to edit and enhance pictures and it works just fine for him with the exception of some filters that when opened cause the instance to crash, myself I use Photoshop running on Win 7 in a KVM on top of Fedora and I can repeat what he is doing and never have a crash, but to go a little further I can create artwork in Photoshop from scratch and he cannot, Photoshop is one of those programs that will work in a virtualbox but it wants direct access to the video card for some tasks, you can fool it sometimes but most often you cannot and it will crash or just simply error out.

My point is that the overhead is huge in a virtual environment and even the fastest SSD or HD will only add so much to the speed at which tasks are performed, the fault is you are creating instances out of thin air and expecting software to behave, in a lot of cases the resources are spread too thin between the host system and the virtual instance that it's a wonder how either remains stable and in fact sometimes they don't....lol A KVM with hardware pass through eliminates some of the virtual overhead because you are giving the KVM physical hardware that the host system never sees or touches thus freeing up some of that overhead that virtual hardware requires.

I'm not sure I explained that well enough, programs like Virtualbox are great and have many many uses, but they have limitations, granted the commercial virtualization software is a lot more robust but it too pails in comparison to a KVM with hardware pass through for doing the tasks that require direct hardware access, but the bottom line in any virtualization is the underlying physical hardware you are running the host and guest concurrently on, if you only have enough hardware to run one of them then the experience of running both together will be way less than desirable.

Sorry for the wall of text....and once again this is just my opinion.