Folks, is there a straightforward way to run a windows VM on a linux host, with all the VM's data sitting on a physical drive?

like a dualboot, but one OS inside the other

My idea is to add a linux distro to my PC on a fresh drive, and keep the current win10 setup more or less untouched

If I realize I need anything from the Windows system, I'd like to be able to fire up a VM with the old OS, grab *the thing* and move on, instead of shutting down linux and switching over completely to the other OS

bonus points if I could use the windows system through both a VM or a proper dual boot, e.g. for gaming (until I've had a chance to move all my games over properly)

I basically wanna Soulkiller my current PC 

@Sirs0ri Not sure if straight-forward or not, but…

if the hard drive for Windows is on a controller on its own that can be passed through to the VM using PCI passthrough (something like "Windows on a SATA controller, but main OS is on NVMe, then just pass the entire SATA controller to the VM", then a qemu kvm VM could use that as the storage device. That way the Windows install could be both bootable to metal as normal, or be brought up in the VM.

The difficulty with this of booting in VM vs booting against metal is that the license/activation key is going to get thrashed because the hardware configuration is different. I've seen others find ways to mitigate it, but haven't tried it myself.

@Sirs0ri I can dig up some links/docs when I get home, but it _is_ something entirely do-able.
@ktnjared I'd appreciate that!

@ktnjared the more I think about this, the more I feel like windows is just not gonna like switching between a virtualized setup and bare metal at all

That's exactly the situation where I'd hope that Bitlocker kicks in, for example. I'd be happy to turn that off (since this pc isn't going anywhere and bitlocker doesn't do a lot once the pc is running), but I wonder what else is gonna break

Licensing is likely to cause issues like you mentioned, and I'm almost expecting driver problems from switching between a visualised and actual CPU/GPU

@Sirs0ri Apologies for disappearing there. Had a PTSD anxiety incident and became useless for a few days. :/

There will be driver... confusion going back and forth. Things like AMD or NVIDIA control panels will probably get cranky.

I hadn't even thought about Bitlocker - I haven't had a machine that it's been installed on for years. It'd definitely need to be disabled for the VM to be able to read the disk.

If you have other software that uses the hardware to identify machines for licensing (Adobe and Autodesk come to mind), those will likely suffer issues as well.

@ktnjared no worries! Thanks for getting back to me, I hope you're doing better :)

So basically it sounds like I have to turn off bitlocker and then I could just try it and see what breaks 😁

I don't think I'm using anything licensed to that specific hardware except for windows itself, so with a bit of luck, the drivers won't be too broken and everything could work