Virtualizing an existing OS

I am curious if the following is possible, I believe someone mentioned it before here on the forums but I can’t seem to find the post.

I have a linux box (Arch) on one SSD and Windows 10 on another SSD. Both drives have their own EFI sectors are are able to boot independantly of each other. Can I turn my windows drive into a kvm with hardware passthrough inside Linux and still have windows drive be able to boot outside of the hypervisor as well if I wanted to?

Thanks in advance…

Yes, just need to use OVMF (UEFI) BIOS instead of SeaBIOS.

I have done that with the PCI passthrough stuff but windows kept complaining it wasn’t activated because it was in a virtual machine. When I booted it on bare metal it said it was activated.

Not a real issue, just a bit annoying.

Probably detects some kind of difference in the hardware if I had to guess.

This is a bit of a workaround… but you could try signing in with an MS account on bare metal, which makes your activated key attach to the account. Then sign into it in the VM, then you should be able to switch it back to a local account.

Don’t quote me on this working though.

That’s basically what I did. I think I’ll just nuke it though, haven’t booted it up in months.

As your OS’s are on different SSD’s it would be very simple to virtualise Windows 10 by passing through your whole Windows drive as a Virtio device.

1 Like

also that’s strange about the licence key… I was expecting that problem when I set my Windows VM up, but to my surprise, it just worked.

I’ve even booted it on bare metal since virtualisng it and it didn’t complain.

May I ask what version of Windows 10 you own?

Plain old Home, I’m not paying $200+ for something I only boot up one every few months. The licence only allows for one installation though, must think the virtual machine is a different computer.

If I understand your question, you’re trying to convert a hard drive installation to a virtual machine?

Several people make tools for this, from what I understand, including Microsoft.

I would use Microsoft’s tool to convert it to a Hyper-V/VMware image, and then use RedHats tool to convert it to KVM.

https://technet.microsoft.com/en-us/library/dn873998(v=ws.11).aspx

https://access.redhat.com/articles/1351473

It’s not strange because when you virutalize windows it doesn’t have info about the hardware like it once did, CPU’s mobo, etc.

Windows takes all the serial info about your components, and uses that as a hash and attaches it towards your license key, so if you ever have a large hardware change/upgrade (mobo replacement), then you have to reactivate windows.

Not that it doens’t do this constantly, just when you first installed it. So if you first installed it as a VM then you wouldn’t have reactivation issues.

just crack it that’s what I do
I like trilogy 4.2 it’s a bit outdated but it works and I know what it’s doing

AFAIK on UEFI installations part of the data used to verify your windows activation is stored as part of the EFI / acpi tables.

See SLIC and MSDM table. So one would have to clone the relevant parameters into the virtual machine to fool windows 10’s activation.

See below for an idea of what’s going on.

It might work for you:

https://forums.fedoraforum.org/showthread.php?298236-Libvirt-Fedora-20-Windows-8-1-OEM-UEFI-Oh-My!

Not quite, I would like to keep the windows drive bootable. At the same time, I would like to use that drive to boot the OS as a VM inside of Linux.

It’s either-or, mate.

Can you not paasthrough the Hard Drive via IOMMU?

I believe Wendell did that during his ~3 hour stream of passthrough

because this is an existing install, maybe. but if you can get the license attached to a microsoft account it ought to work both ways. i don’t have experience with that personally, though.

that’s not the issue here; windows would still see different “hardware” when virtualized. though passthrough would potentially give better disk performance, once everything is working.

hmm, I will have the check that video out

no, it would not.
the license is generated based on your hardware, all you do when you register/link new install with your MS account is link that machine to the account and store the generated value in the account, so if you need to reinstall the windows on the same machine you can just download the ISO, install it and when asked login with your MS account to validate the activation. you can, or at least you could in the past, move the license to another hardware but you need to contact MS for that and explain why you want to do that.

at work I run 20 MS machine and when we moved to windows 10 I had to call MS twice for that as I tried to batch clone to save time and it would not allow me to activate on several machines at once. so just said [email protected]## and did the whole install/setup on each.

very easy using new DELL machines as they have the skus embedded into BIOS so install is a self activating on first boot.

Yeah you can do this. This is exactly how I have mine setup. The only caveat is when you switch between VM and bare metal you will get a “Setting up/Detecting new hardware” screen on boot. If your are getting license key issues with this the only suggestion I have is to get a Windows 10 Pro upgrade however that could be costly.

See this link.

https://forums.fedoraforum.org/showthread.php?298236-Libvirt-Fedora-20-Windows-8-1-OEM-UEFI-Oh-My

Read it. Understand it. It covers everything about this.