Yes and  no.

I asked The Unreliable Robot, and it said:

Comments from actual humans suggest it's just barely possible (:-)) The hard parst are things like getting pass-throughs to work for video cards, etc.   Alas, those are machine-specific, so it probably requires human intervention.

--dave


On 9/15/25 11:55, Mauro Souza via Talk wrote:
It's more complicated than you think.

Secureboot oversimplified: the boot record must be signed by someone, and the signature is checked by the TPM. If it fails, the OS does not load. The VM cannot interface with Secureboot on behalf of the guest OS and it won't load.
Disk Encryption: on Windows, Bitlocker needs to talk to TPM directly so it can get the disk encryption keys. Again, the VM-host cannot do it on behalf of the guest (AFAIK, I may be wrong).
Hardware: some can be sent straight to the VM, but not everything. The emulated ones are not the same as the real ones, so you will need drivers for those. Windows may complain that your license was for another system because the current one is very different.

If you don't mind making this an one-way process, DISK2VHD (from Microsoft) can convert your non-Bitlocker Windows installation from physical hardware to a VHD that can be loaded on Hyper-V or qemu later. Performance isn't great but works. If the idea is converting an installation and running games on it later, it's like running on hardware from 3-4 generations ago.

I tried creating a guest with raw disk access instead of a VHD a long time ago (Windows 7 IIRC), and it worked. Once. Booting Windows on the real disk later killed it.

Mauro
https://www.maurosouza.com - registered Linux User: 294521
Scripture is both history, and a love letter from God.


On Mon, Sep 15, 2025 at 12:02 PM CAREY SCHUG via Talk <talk@lists.gtalug.org> wrote:
reminder again, this is to make it easier for a windows person to install linux but still have access to all their windows programs without having to boot back and forth all the time.  try the linux version of some application, and compare it side by side with the windows version.  Heck, even plug in two keyboards and have like two computers.  Or with symmetry, boot windows and still have their full gaming abilities there, plus transition to linux for all the compute and database activity.


> On 09/15/2025 9:30 AM CDT Lennart Sorensen <lsorense@csclub.uwaterloo.ca> wrote:
>

> Is it allowed to make the requirements that the OS being moved can not
> be using secureboot, disk encryption, and various other things that
> would probably make putting it into a VM impossible?  Probably need to
> disable suspend to disk since being woken up on different "hardware"
> than you went to sleep on might not go well.

--ok on secureboot, I'm still confused enough to not understand

--i assume for disk encryption you mean full disk encryption. it seems to me (and I could be wrong) transparent encryption should be ok.

--since I think there are (built in or add-on?) schemes for pushing a running os to disk and migrating it to different hardware for the purpose of nonstop operation, it should be just as easy for that other hardware to actually be a virtual image (I think that was commonly done on other hardware in the 1990s)

And for the option of having a second disk so each disk is original, that secure boot and full disk encryption should still work.  maybe need to have a third physical disk to share space between the operating systems?


>
> But if you disable all of those, and assuming the VM can emulate the
> same device types as the real hardware (fairly likely in most cases),
> then it should be doable.  I do remember many years ago having the
> ability to boot native or in a VM for some OS installation.  I don't
> remember why we tried it.

>
> UEFI is the firmware of the system.  Not something you copy.  The boot
> partition can be shared between OSs.

how would that work if each os had it's own dedicated physical disk?

would there still only be one uefi, even if booting off the other physical disk?
>

Nice to see the reply coming from the original hotbed of virtualization...university of waterloo

Carey


> On Mon, Sep 15, 2025 at 08:10:19AM -0500, CAREY SCHUG via Talk wrote:
> > A linux distro that instead of setting up dual boot, will automatically make a virtual copy of the boot partition and bring up the original OS in a virtual machine.  The preferred configuration would be with a dedicated second display (since they are so cheap and universally available), but if only one display is available, it could create a generic virtual display a bit smaller than the host machine's display.  It would be an option whether the VM would be brought up at every boot or only upon a simple command request.  Another option would be with a second disk installed, so the original operating system's disk is left unchanged (or perhaps the partition shrunk to make room for a shared data partition, in which the original boot partition would have to be virtualized to protect the space removed from that operating system's exclusive control).
> > 
> > when I asked simple ai-search, i was told such did not exist yet, and it would be difficult to run gaming in the VM, but I don't care if gaming will run there.
> > 
> > Even cooler, with a second disk installed, would be to boot either OS (either disk) native, and automatically bring the other one up virtual...
> > 
> > "standard" process:
> > --shrink original primary partition to make room for linux
> > --make partitions as desired and install linux in the new area
> > --create disk image of boot cylinders/partition table, modified to not include linux and end where it starts
> > --if desired, (not sure of details) duplicate  virtual images of UEFI for linux or the original os, or make additional real partitions.  I don't think they can share them, can they?
> > --put linux boot into real boot cylinders
> > --concatenate the virtual disk of the original boot cylinders with all of the other original OS partitions into a virtual disk used for booting the original OS in a virtual machine.
> > 
> > Any naysayers saying "can't do that" or "too hard" will get my usual refrain...
>
------------------------------------
Description: GTALUG Talk
Unsubscribe via Talk-unsubscribe@lists.gtalug.org
Start a new thread: talk@lists.gtalug.org
This message archived at https://lists.gtalug.org/archives/list/talk@lists.gtalug.org/message/C4HMEFLVX47BDSGT3PYGJBUSYAMUSNG6/

------------------------------------
Description: GTALUG Talk
Unsubscribe via Talk-unsubscribe@lists.gtalug.org
Start a new thread: talk@lists.gtalug.org
This message archived at https://lists.gtalug.org/archives/list/talk@lists.gtalug.org/message/DCJ76CXI6ZIBXTIIZ2HXLP7VXTWMCGT5/
-- 
David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb@spamcop.net           |              -- Mark Twain